#emacs

generated UTC: 2022-12-24 22:06
latest data: https://clojurians-log.clojureverse.org/emacs/2022-12-24
messages: 18208
pro tips:
* Double click on text to filter by it. (doubleclick + cmd-f for extra points).
* Click on date to keep day visible regardless of filter.
* Click on time to keep hour visible regardless of filter.
#2015-08-1909:37bozhidarwill do#2015-08-1909:46joelkuiperFor those interested in giving Evil a try without Spacemacs … take a look at my dotfiles 😉 https://github.com/joelkuiper/dotfiles/blob/master/emacs#2015-08-1912:35magnarsHello folks :)#2015-08-1914:06plexusHello @magnars! 👋#2015-08-1914:37sdegutisGo Emacs! amirite?#2015-08-1916:54roryHmmm. Just updated to latest CIDER 0.10 snapshot and now I'm getting
Symbol's function definition is void: clojure-project-dir
when I try to jack-in from within a project's root directory (say, have project.clj or a source file open)
#2015-08-1916:54roryanyone seen this recently?#2015-08-1916:55roryI guess I should ask @bozhidar ? 😉#2015-08-1917:18sdegutisGonna upgrade clojure-mode for the first time in 3 years, wish me luck!#2015-08-1918:02sdegutisAnyone here ditched paredit in favor of smartparents?#2015-08-1918:02sdegutisThe first paragraph on its page https://github.com/Fuco1/smartparens makes some bold claims about how it supersedes paredit and a few others.#2015-08-1918:12crisptrutskidoes anyone in here use an atreus with emacs? i’m just getting going with this little guy#2015-08-1918:13crisptrutskifinding the C-n C-p (and esp. the paredit cousins) quite uncomfortable, wondering what other bindings people have come up with#2015-08-1918:13crisptrutskiand heard that smartparens is easier to rebind, so sort’ve joining @sdegutis query path#2015-08-1918:21sdegutis@crisptrutski: I used to, I bought the first pre-assembled atreus, but it broke and I don't know how to fix it#2015-08-1918:21sdegutismaybe i should sell it on ebay#2015-08-1918:21sdegutisor mail it back to phil#2015-08-1918:21crisptrutskii’m sure you could send him pictures and he’d give you good instructions to fix simple_smile#2015-08-1918:22sdegutisI think it's just a circuit needs resoldering but I ain't got no time to figure that stuff out.#2015-08-1918:22crisptrutskithis was my first time soldering, found it really relaxing 🌴#2015-08-1918:22crisptrutskialthough guessing it’s less fun without a pcb#2015-08-1918:23sdegutisI got into bookbinding instead but don't tell phil cuz I gonna make him a secret book as a thanks for this atreus#2015-08-1918:23crisptrutskidid you use it with emacs though? find hovering on “n” and “p” really painful (maybe i shouldn’t hover when in “navigation mode” though)#2015-08-1918:23crisptrutskimaybe i need to lose my vim ticks or just swallow evil#2015-08-1918:23crisptrutskihaha#2015-08-1918:24sdegutisnah#2015-08-1918:24sdegutisused it for like 2 days or so then it broke#2015-08-1918:24crisptrutskii had 1 bad diode on mine, took 2s to fix#2015-08-1918:25sdegutismakes me really really sad every time i remember about it. i should probably avoid channels that could remind me of atreuses.#2015-08-1918:25crisptrutskiwow, that escalated quickly 🏃#2015-08-1918:59plexusnow I remember why I never got onto smartparens#2015-08-1918:59plexusmy glob you can read a book and still don't know how to slurp the next sexp#2015-08-1919:00plexusanyone know how I can just make it slurp/barf on M-right/M-left? That's really 99% of what I need it for#2015-08-1919:01plexusso, with | being the cursor: (foo |) (bar) ; M-right ==> (foo (bar))#2015-08-1919:08plexusok so seems what I want is M-x customize-group smartparens, then tell it to use paredit bindings#2015-08-1920:28bozhidar@rory: this function is in clojure-mode; you’ll have to update it#2015-08-1920:28bozhidargenerally it’s always a good idea to update cider and clojure-mode together#2015-08-1920:28bozhidaras from time to time I make changes which involve them both#2015-08-2009:41rory@bozhidar: thanks very much, that solved it instantly. I'll remember to keep clojure-mode in sync from now on. Thanks again!#2015-08-2011:54jonpitherQuite like the idea of moving nrepl-client outside of CIDER https://github.com/clojure-emacs/cider/issues/1225#issuecomment-132964461, seems like a good move#2015-08-2011:54jonpitheroops, should've posted that in the cider chan#2015-08-2012:30bozhidar@jonpither: yeah, we’ll get there eventually#2015-08-2012:31bozhidarlately I’ve been working slowly in this direction#2015-08-2012:31bozhidaras it’s the first step towards supporting Clojure 1.8 socket REPL#2015-08-2012:32bozhidarmost likely in the end, the nrepl-client will be a pretty compact package and all the connection management logic will go into CIDER#2015-08-2012:32bozhidaras it will be more or less the same for nREPL and 1.8#2015-08-2012:32bozhidar(with different adapters, of course)#2015-08-2108:23jonpitherHmm https://orgmode.org/worg/org-contrib/org-choose.html#2015-08-2108:23jonpitherWondering the best way of managing ideas in an org (rejected, maybe) that kind of thing. Whether to use straight up ORG properties, or that mode above#2015-08-2108:55jonpithervm, add this at the top of your org: #+TODO: TODO DONE MAYBE REJECTED#2015-08-2109:03jonpitheror, (setq org-todo-keywords '((sequence "TODO" "INPROGRESS" "|" "DONE" "REJECTED")))#2015-08-2315:59nblumoeDoes anyone know a way to only get the last return value in the results of org-babel for Clojure? Here is an example how it behaves:
#+BEGIN_SRC clojure
    (defn foo [x] (inc x))
    (foo 2)
    #+END_SRC

    #+RESULTS:
    : #'user/foo3
I would only want to have "3" in the results. No luck so far with the headers, like :output etc.
#2015-08-2316:06nblumoeInterestingly this behaves differently for emacs-lisp for example:
#+BEGIN_SRC emacs-lisp
    (+ 1 1)
    (+ 3 4)
    #+END_SRC

    #+RESULTS:
    : 7
#2015-08-2408:46bozhidarguess you should ping org-babel’s team#2015-08-2408:46bozhidarseem you’re getting the result from the first form in the block#2015-08-2415:46nblumoewell it's the result from both forms. or from all forms more generally#2015-08-2415:46nblumoebut I guess you are right. seems to be a bug to me#2015-08-2416:34whacked@nblumoe: hit a similar thing many years ago, don't know if it's the same thing#2015-08-2416:35whackedbut it was reporting the second-to-last return value#2015-08-2416:35whackedso i stuck a random const, like 1 at the end as a workaround#2015-08-2416:57nblumoethanks @whacked. this does not seem to be the case anymore. however, I really need to have both, the results and the code in a clear way as I am exporting both. would be a bit weird to have some random const in every code block! 😉#2015-08-2417:06whackedah sorry, the second-to-last return value on its own line is what i meant#2015-08-2417:07whackedbut i guess that still doesn't apply? I tested it on a haskell block and it sort of still happens#2015-08-2417:08whackedand yes, I was digging through some old org files and they are peppered with random consts on the lines before #+END_SRC#2015-08-2507:28bozhidarah, yes#2015-08-2507:29bozhidartotally missed that the 3 was appended to the var#2015-08-2507:29bozhidarthat’s really odd#2015-08-2507:29bozhidarusually all returns values but the last are discarded in similar interactions#2015-08-2512:58luk3thomasI'm new to emacs, switching from vim+tmux. Can anyone recommend a plugin for saving emacs sessions? I'd like to preserve my frame layout when I switch from buffers.#2015-08-2512:58luk3thomasI've looked around and there seem to be several plugins that do just that. I was wondering if anyone had good experience with a plugin in particular?#2015-08-2513:04jeffh-fp@bozhidar: nice to hear you on the Cognicast (just got around to listening to that one)#2015-08-2513:06bozhidar@jeffh-fp: simple_smile#2015-08-2513:06bozhidarI’m always happy to speak about CIDER (and Emacs in general)#2015-08-2513:07bozhidarI’m even happier when someone actually listens to what I’ve said (which doesn’t happen that often) simple_smile#2015-08-2513:59mitchelkuijpersPff my emacs freezes every 30 minutes, anyone tips howto debug it?#2015-08-2514:56nblumoe@luk3thomas: I only had bad experiences with the packages I tried ;(#2015-08-2514:57nblumoehowever, those issue were mostly related to having the sessions sync across multiple machines#2015-08-2514:57nblumoeending up with too many conflicts as I tend not to close emacs ever facepalm#2015-08-2514:58nblumoe@jeffh-fp: @bozhidar indeed. I enjoyed that episode, too. thanks @bozhidar !#2015-08-2514:58luk3thomasah, bummer. yeah I'm not sure if I am trying to force vim+tmux onto my new emacs config. I find it annoying that I'm constantly losing my buffers when I switch to another file#2015-08-2514:59nblumoehm, when I read this again, I think I got you wrong. I thought about persisting sessions when stopping and starting emacs. not sure about the buffers on file change, sry#2015-08-2519:39wunschHi there, this is an x-post to #C03S1KBA2 so my bad but… When I use Emacs+Cider and I call C-c C-x to refresh the project, for some reason I lose access to the pprint fn. Anyone know why this is?#2015-08-2520:00mlbatemamitchelkuijpers: There's always the time-honored binary search. Verify an uncustomized emacs doesn't freeze, then enable chunks of your config over time#2015-08-2608:12mitchelkuijpers@mlbatema: thnx I started running emacs as a daemon again and that seems to fix it somehow#2015-08-2801:37sashtonWhen I try 'M-x cider-jump-to-var' on Java classes, I just get: "No source location". In this case I was trying to navigate to clojure.lang.RT. Is there something I'm missing?#2015-08-2801:56robertothe source ?#2015-08-2802:01sashtonDo I have to attach the java source manually? If so, how is that done? I'm coming from intellij which will do it automatically for clj and java sources#2015-08-2802:02robertoyeah, not sure. Maybe it is done by specifying it in the deps. I have never tried to navigate to java source, so I’m speculating.#2015-08-2802:03robertobtw, if you have access to intellij, I would recommend using cursive.#2015-08-2802:03robertoyou would be much more comfortable there#2015-08-2802:03sashtoni've used it for a while, but wanted to try out emacs#2015-08-2802:03robertoI would guess you have to tell lein to include the source#2015-08-2802:03robertonot sure how that is done#2015-08-2802:04roberto:java-source-paths#2015-08-2802:04robertoyou need to add that#2015-08-2802:04roberto
defproject my-project "0.0.1-SNAPSHOT"
  [...]
  :java-source-paths ["src/java" "test/java”])
#2015-08-2802:04sashtonbut for a dependency like clojure.jar?#2015-08-2802:04robertofrom the lien docs:
For projects that include some Java code, you can set the :java-source-path key in project.clj to a directory containing Java files. Then the javac compiler will run before your Clojure code is AOT-compiled, or you can run it manually with the javac task.
#2015-08-2802:04robertoi would think it also applies#2015-08-2802:05robertoyou would need to download the source jar, and put it in your source path#2015-08-2802:05robertoI would try that and see how it works#2015-08-2917:08pxlpnkbtw there is the emacs conf 2015 happening right now: https://www.twitch.tv/emacsconf#2015-08-2917:08pxlpnkthis is a live stream#2015-08-3108:44bozhidarI was supposed to give a talk about CIDER there, but unfortunately I had to cancel it#2015-08-3108:44bozhidarbetter luck next time#2015-08-3114:21sdegutisWhat Clojure-related Emacs packages do you use?#2015-08-3114:21sdegutisI currently only use CIDER, clojure-mode and clojure-test-mode and would love to discover more.#2015-08-3114:36robertoclojure-refactor#2015-08-3114:49sdegutis@roberto: Thanks, grabbing that one now.#2015-08-3114:49sdegutisAlso clojure-quick-repls sounds interesting.#2015-08-3115:02bozhidarthat’s dead#2015-08-3115:02bozhidaror at least redundant#2015-08-3115:02bozhidar0.10 has much better handling of multiple connections#2015-08-3115:04bozhidarbtw, clojure-test-mode is dead and buried as well#2015-08-3115:04bozhidarCIDER has had built-in clojure.test support for a while#2015-08-3117:50sdegutis@bozhidar: the clojure-test-mode I'm using comes with clojure-mode and I'm requiring it as a hood for clojure-mode... is it deprecated by CIDER?#2015-08-3118:01bozhidaryes#2015-08-3118:01bozhidarI should know simple_smile#2015-08-3118:01bozhidarI personally deleted clojure-test-mode about one year ago#2015-08-3118:01bozhidarso it certainly doesn’t come with clojure-mode anymore simple_smile#2015-08-3118:02bozhidarhttps://github.com/clojure-emacs/cider#upgrading-from-clojure-test-mode#2015-08-3118:58sdegutis@bozhidar: Oh you're bbatzov?#2015-08-3118:58sdegutisor whoever?#2015-08-3119:02sdegutisWhat could cause a redefined function (redefined with C-c C-k while CIDER is running) to not be seen and used by the running code?#2015-08-3119:08sdegutisI ran (jetty/run-jetty #'my-handler {:port 8080}) and now inside CIDER I evaluated (defn my-handler [] {:status 200 :body "ok so far"}) and refresh but the change is not visible. What am I missing or doing wrong?#2015-08-3121:47sdegutis@bozhidar: What theme are you using here? https://raw.githubusercontent.com/clojure-emacs/cider/master/screenshots/cider-overview.png#2015-08-3121:51sdegutis@bozhidar: Never mind figured out, it's your own port of zenburn-theme.#2015-08-3121:51sdegutisNice btw, I may keep it.#2015-09-0106:38bozhidarbbatsov == B. Batsov == Bozhidar Batsov#2015-09-0106:39bozhidarmy handle is bozhidar or bozhidarb, as often as bbatsov#2015-09-0106:39bozhidarunfortunately for me, there are more Bozhidars in Bulgaria, than Batsovs simple_smile#2015-09-0106:40bozhidarno idea about the C-c C-k problem - seems to me this should be working#2015-09-0106:40bozhidarso it’s best to report a ticket#2015-09-0106:41bozhidaras for the theme - it’s Zenburn#2015-09-0115:00sdegutisNever mind, I fixed it.#2015-09-0115:00sdegutisAnd yeah, been using your Zenburn since yesterday @bozhidar and it's pretty great, thanks for porting it.#2015-09-0119:46sdegutisAnyone here got a solution for multiple :where clauses in a Datomic query to indent correctly?#2015-09-0708:40beppuWhen I have [refactor-nrepl "1.1.0"] in my ~/.lein/profiles.clj, I can't seem to get lein repl to work with https://github.com/yogthos/pulsar-example .#2015-09-0708:43beppuStack dump: https://www.refheap.com/109258 Relevant line: Caused by: java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context#2015-09-1409:02pxlpnkhttp://emacs.sexy/#2015-09-1518:18crankyadminHi#2015-09-1518:18crankyadminDoes this error make sense to anyone? error in process filter: Some namespaces are in a bad state: error "clojure.lang.PersistentArrayMap cannot be cast to clojure.lang.Compiler$LocalBinding"#2015-09-1518:20crankyadminrefactor-nrepl 1.1.0 and cider 0.9.1#2015-09-2010:02colin.yateshi all - how would I go about changing the colour of a highlighted symbol in prelude/zenburn?#2015-09-2010:07colin.yatesmore info: https://github.com/bbatsov/prelude/issues/907#2015-09-2011:07plexusput your cursor on a symbol, then do M-x customize-face#2015-09-2011:07colin.yatesthanks @plexus#2015-09-2011:09colin.yatesyeah OK, turns out I am rubbish at theming 😉#2015-09-2123:45redbeardymcgeehelm-find-files-actions is driving me nuts and i'm not even getting to use helm-projectile yet#2015-09-2123:45redbeardymcgeewrong type argument listp#2015-09-2123:46redbeardymcgeeam i the only one with this problem or what#2015-09-2123:50redbeardymcgeeforget it, i'll just upgrade to melpa release instead of melpa-stable#2015-09-2211:14albcorp@redbeardymcgee: I've been switching to helm from ido over the last week, and I find much of it maddeningly inconsistent. So, yes. I gave up on actions from helm find file. On the other hand, helm-projectile is a great experience. The one hurdle there is to understand that only after you have visited a file from a project is the project available#2015-09-2211:23albcorpMy advice on helm is to just select a couple of axes. For me that is: helm-swoop for visiting matches in buffers, helm-projectile for viewing matches in a project especially with helm-projectile-ag, and helm-locate for exploring the file space outside of individual projects. To that you can add a couple of specialty searches like helm-apropos for emacs functions and helm-regexp for building complex regular expressions#2015-09-2212:18redbeardymcgeealbcorp: yeah thanks, my main issue was a bug in helm or helm-projectile somewhere causing that issue. it was fixed upstream back in perhaps june, but wasn't pushed to melpa stable yet. I suppose there were more breaking changes, according to some of the issues I read bbatsov was mentioning "sweeping changes and no tests"#2015-09-2212:19redbeardymcgeeI went to the melpa version just to get it all working and it's been pretty neat so far. I might look into some other bits of helm in the near future but for now i gotta muddle around with some nrepl stuff. thanks @albcorp#2015-09-2212:44colin.yates@redbeardymcgee: I am a newbie but I found @bbatsov’s prelude project was a much much smoother experience than trying to tie together projectile and helm by hand#2015-09-2214:03redbeardymcgeeI'm very hesitant to mess with a starter kit#2015-09-2214:03redbeardymcgeei built my way thru linux from the ground up, so to speak, with arch#2015-09-2214:04redbeardymcgeesure it has dependency management and binary packages but that minutiae wasn't interesting to me when i got started#2015-09-2214:04redbeardymcgeethen plowed thru vim for about 3-4 years#2015-09-2214:04redbeardymcgeenow emacs for a few months, but i've not had nearly as much spare time to tinker so it's been a little messy#2015-09-2215:02jcsimsprojectile works pretty well with ido as well#2015-09-2216:36colin.yates@redbeardymcgee: (big fan of arch - love it) For me though I didn’t need to tinker at all with prelude. It is a decisive topic, but if you just want to get stuff done and then learn how to get stuff done, prelude is a great starting place. I would say it’s Clojure integration is great but I see you are having issues in #C0617A8PQ 😞. Would be interested if you can replicate with prelude?#2015-09-2311:45upgradingdaveHey all, does anyone know of a emacs command to format sexps so they’re lined up by columns? So for example, an easy way to transform something like this:#2015-09-2311:46upgradingdaveinto something like this?#2015-09-2312:20upgradingdavenm, got it working with C-u M-x align-regexp \(\s-+\) 1 1 Y#2015-09-2312:56redbeardymcgee@upgradingdave: https://www.emacswiki.org/emacs/AlignCommands#2015-09-2312:56redbeardymcgeeyou probably didn't need to mess with align-regexp but if it works it works#2015-09-2312:57redbeardymcgeeM-x align might have done it by default, maybe not. my dev vm isn't open to test.#2015-09-2312:59upgradingdavethanks @redbeardymcgee, align didn’t work for me (it could be something in my .emacs.d setup though), align gives me:#2015-09-2312:59redbeardymcgeelooks weird#2015-09-2313:00upgradingdaveyeah, maybe something is causing strangeness in my setup then, thanks#2015-09-2313:00redbeardymcgeeperhaps it needed the prefix also#2015-09-2313:18upgradingdaveTried C-u M-x align and no dice unfortunately 😕#2015-09-2313:18upgradingdaveBut, the good news is this is working nicely for me:#2015-09-2313:19upgradingdaveThat’s 20 mins of my life I’ll never get back 😅#2015-09-2313:19upgradingdave… but then again, I’ll probably save > 20 mins not having to manually align things 😉#2015-09-2313:22redbeardymcgeethis sees like the kind of thing some variant of align would just DWIM#2015-09-2313:22redbeardymcgeePretty strange that it doesn't#2015-09-2318:07colin.yates@upgradingdave: Have you checked out https://github.com/gstamp/align-cljlet#2015-09-2318:07colin.yates(it works for much more than just ‘let’ forms)#2015-09-2318:18colin.yatesIs there an elegant solution that allows me to have multiple terminals in Emacs? On OSX I frequently run the Emacs.app fullscreen but then have to swipe for my various ‘lein’ processes.#2015-09-2318:22dottedmagC-u M-x shell, or am I missing something?#2015-09-2318:22colin.yatesYou might be missing my newbie-ness simple_smile. I did try that but I got an exception about specifying a prefix arg before helm-M-x#2015-09-2318:26noogayup#2015-09-2318:27nooga@colin.yates: I think we should move it here#2015-09-2318:28colin.yateshaving said that, I need to run for tea soon. I will say though, that I didn’t really get yak-shaving until I started with my own config.#2015-09-2318:28noogamy other poblem is that I can’t use vanilla emacs or any other emacs that isn’t e-l#2015-09-2318:28noogabecause almost all keybindings are different#2015-09-2318:28nooga😄#2015-09-2318:29nooga@colin.yates: I see what you mean! Have a nice one then#2015-09-2318:29dottedmag@colin.yates: Well, no idea about helm#2015-09-2318:30colin.yatesSo is C-u idiomatic emacs for ‘more than one’?#2015-09-2318:30colin.yates(I wasn’t kidding about the newbie…)#2015-09-2318:30dottedmagIt's "non-default": https://www.gnu.org/software/emacs/manual/html_node/elisp/Prefix-Command-Arguments.html#2015-09-2318:31dottedmagUgh, this one is more readable: https://www.emacswiki.org/emacs/PrefixArgument#2015-09-2318:31dottedmagNot terribly useful either :-/#2015-09-2318:32dottedmagSo, every command has an argument. A number or nothing.#2015-09-2318:32dottedmagC-u is equivalent of supplying argument 4. C-1 C-0 C-0 is supplying 100#2015-09-2318:32colin.yatesI see - thanks. For my issue, it was yet another RTFM: https://github.com/emacs-helm/helm/wiki#i-have-an-error-message-when-starting-helm-m-x-with-a-prefix-arg#2015-09-2318:32dottedmagC-u C-u supplies 16#2015-09-2318:33dottedmagEtc. Many commands interpret it as a "alternative way" of doing things -- often by asking more questions or executing command differently.#2015-09-2318:34colin.yatesthanks again @dottedmag#2015-09-2318:52colin.yateswould people recommend SpaceMacs with the vi emulation for a non-vi user? :wq and ‘i’ are about the limit of my vi skills simple_smile, but I hear good things about SpaceMacs+Space leader just from a usability perspective….#2015-09-2319:26noogait looks cool for sure#2015-09-2319:26noogabut it’s not for me#2015-09-2319:27noogamodal editing is hard#2015-09-2319:27redbeardymcgeei learned a good bit of vim over ~3 years, but i never liked the modal editing#2015-09-2320:48beppuI've been using vim for over a decade, but lisp support in Emacs is more mature, so I switch to emacs for Clojure development.#2015-09-2402:02jonschoningAlt-w and crtl-y was hard to get used to.. just installed evil-mode instead#2015-09-2402:03jonschoningDo folks really use those keybindings?#2015-09-2402:07jcsimsThe default emacs key bindings tend to work all over the place in OSX, so they've become muscle memory for me. #2015-09-2402:32jonschoningah, that must help, yes#2015-09-2406:25asolovyovhey all! So I'm learning cider-repl mode, and M-r (which is prev-matching-input) is overshadowed by M-r from paredit. I wonder if there is an easy way to bring cider's binding on top?#2015-09-2414:07redbeardymcgee@asolovyov: it occurs to me that the most convenient option is to make your own keymap#2015-09-2414:07redbeardymcgeea bit of googling around brought me to this idea as well https://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs#2015-09-2414:07asolovyovhm#2015-09-2414:07redbeardymcgeemakes for an easy way to toggle back and forth as well#2015-09-2414:07asolovyovyeah, I guess that's easiest workaround#2015-09-2414:07asolovyovthanks!#2015-09-2414:09redbeardymcgee@asolovyov: if you just want to do this for clojure-mode, you can toss a lambda to rebind it into the clojure-mode-hook#2015-09-2414:09redbeardymcgeewithout the whole keymap#2015-09-2414:10redbeardymcgeei'm not sure if you can just unbind it from paredit's keymap and then cider's keymap will be left#2015-09-2414:10redbeardymcgeebut could be worth a try#2015-09-2414:10asolovyovredbeardymcgee: ah, I guess I can!#2015-09-2414:10asolovyovnever used that keybinding#2015-09-2414:11asolovyovM-<uparrow> does the same though#2015-09-2414:11asolovyovalmost#2015-09-2414:11asolovyovthat's different functions (paredit-splice-sexp-killing-backward and paredit-raise-sexp), but I don't see any difference#2015-09-2414:14redbeardymcgee(add-hook 'clojure-mode-hook (lambda () (define-key paredit-mode-map (kbd "M-r") nil)))#2015-09-2414:14redbeardymcgeeI think#2015-09-2414:15redbeardymcgeei don't use paredit so i don't know the keymap name#2015-09-2509:13colin.yateshi all - when I cider-connect to a local lein figwheel and then follow https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl it seems to work however I get a prompt at stdin which feeds into the REPL however I cannot eval anything from a buffer.#2015-09-2509:14colin.yatesIs this a new ‘feature’? I am sure a few weeks ago when I last tried it acted just like a ‘normal’ connection (e.g. C-x C-e would work)#2015-09-2509:18colin.yatesnever mind - it seems some of the dependencies are changed in the latest version ...#2015-10-0722:58gadfly361Hey guys, new to channel! Is there any reference material for setting up orgmode, clojure and cider that someone can point me to? #2015-10-0723:03robertoorgmode comes by default#2015-10-0723:03robertono need to setup#2015-10-0723:04robertoI followed the cider readme and it worked for me.#2015-10-0723:05robertobtw, when I started with clojure, I didn’t know emacs. Clojure for the Brave and True helped me get started#2015-10-0723:05robertohttp://www.braveclojure.com/basic-emacs/#2015-10-0723:07gadfly361Thanks! Specifically, im trying to get orgmode source-blocks to execute clojure, and not having much luck.#2015-10-0921:45robertowhat is the location under the status panel where you enter commands called?#2015-10-0921:46robertoI want to make it bigger than just one line.#2015-10-0921:46robertobut can’t find out how to do it because don’t know how it is called.#2015-10-0921:57jcsims@roberto: mini-buffer#2015-10-0921:57robertothank you @jcsims#2015-10-1215:33jethroksycan anyone help me get squiggly-clojure running properly?#2015-10-1215:33jethroksyI'm getting this error every time i type something: `#2015-10-1215:33jethroksyerror in process filter: Wrong number of arguments: (4 . 4), 0 [2 times] Error from syntax checker clojure-cider-eastwood: Done with no errors#2015-10-1215:35jethroksyI loaded the clojure buffer with cider, and its making the window hang momentarily everytime i type something#2015-10-1410:52bozhidar@jethroksy: I’d suggest reporting a bug or something#2015-10-1410:53bozhidarI’ve never tried it myself, so I can’t offer much assistance#2015-10-1416:50jethroksy@bozhidar: I did, thanks anyway. I even started with a clean-state emacs config and couldn't get it to work...#2015-10-1417:20magnars@jethroksy: there's an example config for emacs+clojure set up here, that includes squiggly: https://github.com/clojure-emacs/example-config#2015-10-1417:20magnarsmaybe that could help?#2015-10-1510:26martinklepsch@bozhidar: thanks for C-c C-b! simple_smile#2015-10-1510:56bozhidaryou’re welcome simple_smile#2015-10-1510:56bozhidar@magnars: it might be that squiggly-clojure is out of sync with cider#2015-10-1510:57bozhidarthe errors seem consistent with something like that#2015-10-1514:14jethroksy@magnars: i've seen it, and my code is almost identical other than the fact that i use the use-package macro. It seems unlikely that it is an error in my emacs config... but hopefully we'll get to the bottom of it!#2015-10-1608:19nblumoe@gadfly361: maybe the instructions over here will help: https://github.com/limist/literate-programming-examples what problem are you running into specifically? Did you register Clojure as an org babel language?#2015-10-1615:32gadfly361@nblumoe thanks for the link! I am able to get clojure code to execute successfully in org-mode via babel when i am using slime, but not if i am using cider. I tried following this link: https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-clojure.html#2015-10-1615:34gadfly361I will have access to my dev computer tomorrow and can give more specific info, but the error was something like wrong number of arguments 3 . 4 if cider was being used instead of slime#2015-10-2121:26aaelonyquestion, Tom Faulhaber has a nice library that formats data into excel files (I know, I know) https://github.com/tomfaulhaber/excel-templates but when things aren't just right, the error messages that print out clearly at the repl seem to be buried somewhere and invisible in Cider. I am using CIDER 0.9.1 (Java 1.7.0_85, Clojure 1.8.0-alpha2, nREPL 0.2.10) any thoughts on how to find the error messages and view them from Cider?#2015-10-2121:27aaelonythanks in advance#2015-10-2205:58bozhidarthis is working properly (such output is redirected to the REPL) in the 0.10-snapshot#2015-10-2205:58bozhidarin 0.9.1 your missing output is likely in the *nrepl-server* buffer (if you’re using cider-jack-in)#2015-10-2215:35aaelonythanks @bozhidar, will look for it there and upgrade when 0.10 comes out.#2015-10-2216:27andrea.crottihi everyone, I'm trying to call an elisp function as post-save hook#2015-10-2216:27andrea.crottibut I'd like to do it in only one file#2015-10-2216:27andrea.crottiany way to change the hook only locally?#2015-10-2217:24jfntn@andrea.crotti: you could look at dir-locals https://www.emacswiki.org/emacs/DirectoryVariables but it’s a bit hacky https://emacs.stackexchange.com/questions/12433/use-dir-locals-el-to-append-to-before-save-hook-as-a-buffer-local-variable#2015-10-2217:52andrea.crottimm @jfntn then maybe also file local variable?#2015-10-2217:52andrea.crottianother alternative would be to bind compile-command#2015-10-2217:53jfntn@andrea.crotti: ha yes indeed, the idea would be the same as described in the SE answer#2015-10-3022:01jjwI’m using spacemacs and I’m having an issue trying to run my clojurescript tests. I have a fresh re-frame template project and when I try to run my tests it says ‘unable to resolve symbol deftest’ anyone run into a similar issue?#2015-11-0612:42martinklepschAnyone using .cljc with inf-clojure? Seems it doesn’t work because it evaluates files with .clj extension even if the edited file has .cljc?#2015-11-0615:11bozhidarI’m not sure what you mean by this#2015-11-0615:12bozhidarbut you can always file a ticket and we’ll take a look at the problem#2015-11-0615:12bozhidargenerally the extension shouldn’t be an issue#2015-11-0615:12bozhidaras you have just one REPL and the code will get evaluated in it#2015-11-1016:01nhaWhat could be the cause of C-c C-e ie inf-clojure-eval-last-sexp failing with "No Clojure Subprocess; see variable 'inf-clojure-buffer'", knowing that cider C-c M-e ie cider-eval-last-sexp-to-repl works (started a repl via lein repl, connected via cider-connect )?#2015-11-1016:20nhahmm nevermind I restarted emacs seems to work#2015-11-1021:58bozhidarwhy would you mix inf-clojure and cider?#2015-11-1021:59bozhidarthey work in a totally different manner - cider interactions with an nREPL server and inf-clojure simply pipes input to a running local REPL process#2015-11-1021:59bozhidarand processes its output#2015-11-1022:27nhaWell I really like the way C-c C-e behaves visually (shows the result of the evaluation next to the line), and this is what I want most of the time. Unless there is something in cider that I should use for that ?#2015-11-1022:29nha(mostly I wasn't aware of the general idea though)#2015-11-1106:26diba@nha: i believe the latest cider versions have that feature on by default. see https://github.com/clojure-emacs/cider#overlays#2015-11-1108:31nha@diba: it does ! thanks#2015-11-1819:09anmonteirohi guys; i'm quite an emacs beginner, and looking for a package which will show my project's file tree along with the files' git status (Atom editor does this, if you're familiarized with that)#2015-11-1819:09anmonteiroany suggestions?#2015-11-1820:03hkjelsIt most likely exists, but I guess that’s just what you think you would like. For anything git, magit is the goto package#2015-11-1820:04hkjelsother than that I suggest taking dired for a spin#2015-11-1820:06gsnewmark@anmonteiro: neotree https://github.com/jaypei/emacs-neotree#2015-11-1820:08anmonteiromagit I do have installed; I'll try neotree, thanks!#2015-11-1918:03progzillaDidn't this channel existed..😀 #2015-11-1918:03progzillaSomebody help me out pls...i tried to refresh my package list in emacs but it keeps hanging "Contacting Host: http://elpa.gnu.org:80"
#2015-11-1918:09robertoare you behind a proxy or firewall?#2015-11-1918:09robertoit looks like either a networking error, or the melpa repo is down#2015-11-1918:10colin.yatesquick poll - which emacs ‘distro’ do you use? I use prelude although am tempted by spacemacs...#2015-11-1918:10robertoEmacs (vanilla)#2015-11-1918:10colin.yates@roberto ah, a ‘proper’ emacser simple_smile#2015-11-1918:11colin.yatesI did try but ended up with a poor imitation of prelude#2015-11-1918:11robertohehehe, nah, I just started this year. Decided to invest some time learning it#2015-11-1918:11progzillaubuntu#2015-11-1918:11colin.yatesare you using org-mode to manage it?#2015-11-1918:11progzillaubuntu 15#2015-11-1918:11robertoalso, the book Mastering Emacs helped a lot#2015-11-1918:11colin.yateswhen I tried I used org-mode and it worked really well actually.#2015-11-1918:11progzillano. its a new install#2015-11-1918:12colin.yates@progzilla I mean how do you manage your emacs configuration - roll your own or one of the ‘off-the-shelf’ bundles?#2015-11-1918:12robertolooks like he is using the one that comes with his distro#2015-11-1918:12robertodamn, I need to ween off using looks in chat#2015-11-1918:13progzillai actually use the config on my arch linux ...so i simply moved the init.el and the elpa folder#2015-11-1918:14progzillabut i also noticed same problem now on my arch linux emacs too#2015-11-1918:15robertosounds like a networking issue#2015-11-1918:15colin.yateshttps://elpa.gnu.org is accessible from a browser on port 80...#2015-11-1918:15progzillai have changed my connections 3 times now including a cable conn and yet remains same#2015-11-1918:16robertoit obviously isn’t your cable#2015-11-1918:16robertootherwise you wouldn’t be chatting with us#2015-11-1918:16robertoit could be that you are behind a firewall or proxy that is preventing you from accessing melpa#2015-11-1918:17progzillalol true#2015-11-1918:17progzillapls how can i prevent that?#2015-11-1918:17progzillai went home to try my connection, same thing#2015-11-1918:19colin.yateshave you tried visiting the website?#2015-11-1918:30robertotry #C099W16KZ on irc#2015-11-1918:30robertoand ask if melpa is down#2015-11-1919:16donmullen@colin.yates: I use https://github.com/railwaycat/homebrew-emacsmacport — and use org mode to manage based on https://github.com/cndreisbach/emacs.d#2015-11-1919:20twillis@progzilla: just tried updating packages on my emacs, it's at least reachable in ohio#2015-11-1919:22colin.yatesthanks for the links @donmullen#2015-11-1919:23twillis@colin.yates: on your poll, I rolled my own config after trying prelude. it's s fun excercise. https://github.com/twillis/my-emacs-config#2015-11-1919:24progzillaBeen exercising with all sorts of configuration all day...#2015-11-1919:25progzilla@roberto thanks will buzz them now#2015-11-1919:26progzillaAm going to play with the @twillis and @donmullen links#2015-11-1919:38jeff.terrellThat's a really interesting idea, @donmullen. Literate programming, for Emacs. Gonna have to dig into that more later.#2015-11-1920:04donmullen@jeff.terrell: It’s been great - kudos to Clinton. Much easier to document / view / search all in one file than multiple files.#2015-11-1920:05jeff.terrellYeah, I can imagine! Plus, the ability to fold things is great for being able to focus on just one or two things. Very cool! I'll have to tell him thanks next time I see him. simple_smile#2015-11-1920:55bozhidarif someone wants vim keybindings spacemacs is definitely the way to go#2015-11-1920:55bozhidarprelude ships with some evil settings#2015-11-1920:55bozhidarbut we never invested much efforts in refining those#2015-11-2005:03progzillanow I have exhausted my efforts on trying to solve the contacting host: http://elpa.gnu.org:80 issue#2015-11-2008:07ianjoneswhats the biggest difference between gnu emacs and spacemacs?#2015-11-2008:31bozhidarthere’s no difference#2015-11-2008:31bozhidarspacemacs is gnu emacs#2015-11-2008:31bozhidar+ a ton of custom configuration#2015-11-2008:32bozhidarwhich makes it behave in a vim-like fashion#2015-11-2008:32bozhidarthe biggest selling point of spacemacs is that it ships a super extensive evil-mode configuration#2015-11-2009:21progzillais it appropriate to edit package.el?#2015-11-2010:28bozhidarno#2015-11-2014:27jethroksy@progzilla: what are you trying to achieve?#2015-11-2015:04progzilla@jethroksy am trying to refresh my packages but it gets hanged at contacting host: https://elpa.gnu.org. https://gnu.org#2015-11-2015:05progzilla #2015-11-2015:46jethroksy@progzilla: is this from a fresh install? can you try running 'emacs -q' in terminal and run M-x package-list-packages#2015-11-2016:09progzillaYes its fresh install#2015-11-2016:10progzillaStill same problem#2015-11-2016:12twillis@progzilla: what is the value of package-archives? C-h v package-archives#2015-11-2016:12twillisfwiw here's mine...
(("gnu" . "")
 ("melpa" . "")
 ("marmalade" . ""))
#2015-11-2016:26jethroksy@progzilla: this is probably not an emacs issue, could be your internet connection. If you're really having troubles with package.el you could try Cask or el-get and see if you have any luck, but i doubt they'll solve your problem#2015-11-2016:28progzillaOk. I have tried 3 different Internet access to deal with this#2015-11-2016:30progzilla@twillis thanks. That's what I have also#2015-11-2016:42twillisdo you have a personal firewall that's blocking emacs access maybe?#2015-11-2016:42progzillabut how can i know that?#2015-11-2016:43twillisi dont know, if it was windows it's would probably be in your settings somewhere. /shrug#2015-11-2016:43progzillaam on ubuntu#2015-11-2016:44twillisi dont know if that has a firewall or not. 😕#2015-11-2016:48progzillaEven when I try to create a new app..?! Lein new app cloj#2015-11-2016:50twillishttps://www.howtogeek.com/115116/how-to-configure-ubuntus-built-in-firewall/#2015-11-2016:51twillisanyway, you could eval this in a scratch buffer and find out if emacs is allowed to access the internet...
(with-current-buffer (url-retrieve-synchronously "") (buffer-string))
#2015-11-2016:56progzillaoh great!!#2015-11-2017:46robertotry disabling your firewall, looks like it is on#2015-11-2018:18progzilla@roberto: @twillis thanks#2015-11-2018:19twilliswtf?? lol i'm out of ideas.#2015-11-2018:21robertoyeah, only thing I can think of is that your ISP is blocking melpa#2015-11-2019:25progzillaThis is really weird! I tried on school eduroam network, home virgin network and Vodafone on my mobile...all not working:sob:#2015-11-2020:02robertowhat city are you in?#2015-11-2020:58progzillaLondon#2015-11-2021:26robertohuh, that is weird#2015-11-2622:50progzillahey guys am still stuck with this issue..."contacting host: http://elpa.gnu.org:80"#2015-11-2623:19twillis@progzilla: did you try this in a scratch buffer?
(with-current-buffer (url-retrieve-synchronously "") (buffer-string))
paste and C-x C-e
#2015-11-2623:21twillisbasically trying to prove if emacs can hit the internet at all#2015-11-2702:18roberto@progzilla try M-x package-refresh-contents#2015-11-2702:46progzillaYes I did. That's how it got stuck with contacting host: ....#2015-11-2702:47robertothat is weird, it is probably something to do with your setup. I’m not having that issue.#2015-11-2702:47progzilla@twillis do you mean I should type that in d buffer?#2015-11-2702:51progzilla@roberto am afraid also..maybe setup but I hv another LenovoBig running arch linux..I hv been using emacs safely until recently too. It gives similar problem too.#2015-11-2702:52robertoyou have the same problem on all your machines?#2015-11-2702:55progzillaYes. Used several Internet access...#2015-11-2702:56progzillaIt's so annoying. Especially when I hv to deliver my final year project in 2 months. .#2015-11-2702:59Joe LaneThats not what he meant, he asked if you have had the same issue on multiple physical machines.#2015-11-2702:59progzillayes I have..thanks @lanejo01#2015-11-2703:02Joe Lane@progzilla So you’re trying to refresh your packages, right?#2015-11-2703:02progzillayes#2015-11-2703:02robertothat is weird, maybe try reinstalling emacs? Or try it on a vm?#2015-11-2703:03Joe LaneI get “Stuck” on that as well, however its just not cleared from the minibuffer.#2015-11-2703:03robertoI would install ubuntu on virtualbox, and try it from there. If problem persists, then you have bigger problems. (More than likely networking).#2015-11-2703:03Joe LaneWhy are you trying to refresh your packages?#2015-11-2703:03progzillaam trying a re-install now..#2015-11-2703:04progzillai just got a lenovo x220 and installed all my essentials for clojure development#2015-11-2703:04progzillaam familiar with emacs as an junior developer#2015-11-2703:04robertomaybe try another linux distro?#2015-11-2703:05progzillaso configure emacs is still quite strange to me...#2015-11-2703:05Joe LaneYou still havent explained what it is you are trying to do though.#2015-11-2703:05robertoI stopped using linux as my workstation 3 years ago, I remember having weird issues like that, never with emacs tho.#2015-11-2703:05Joe LaneYou said you installed all your essentials for clojure development, then why are you trying to refresh your packages?#2015-11-2703:06Joe LaneWhat is the end goal?#2015-11-2703:07progzillathe fresh emacs install i did does not have up-to-date packages list#2015-11-2703:08Joe LaneSo that you can install The essentials for clojure development? I thought you already got those installed?#2015-11-2703:13progzillaessentials i mean leiningen and openjdk,#2015-11-2703:13progzillathen installed emacs24 on ubuntu#2015-11-2703:16robertodid you compile it from source or installed it via ppa?#2015-11-2703:16progzillai simply installed it from the ubuntu app store#2015-11-2703:17robertodid you add the package-archives to the init.el ?#2015-11-2703:17roberto
;; Define package repositories
(require 'package)
(require 'erc)

(add-to-list 'package-archives
             '("marmalade" . "") t)
(add-to-list 'package-archives
             '("tromey" . "") t)
(add-to-list 'package-archives
             '("melpa" . "") t)
(add-to-list 'package-archives
              '("org" . "") t)
#2015-11-2703:18progzillaall added except (require 'erc)#2015-11-2703:23progzillaoh! and the tromey url#2015-11-2705:08progzillaYes!!!!! finally did it. after 2weeks of battle. I simply uninstalled emacs24 and install gnu emacs (metapackage), created new init.el and pasted the melpa repo package detail(https://melpa.org/#/getting-started) in it. Then I ran the emacs, issued the package-refresh-contents in the buffer and boom! that was it. back in the game.#2015-11-2705:09progzillaThanks to @roberto @lanejo01 @twillis and other guys who made all this possible. You guys rock!!#2015-11-2713:09twillis@progzilla: glad to hear it. it's a holiday miracle simple_smile#2015-11-2713:23bozhidara small note - the tromey repo is ancient and no one should touch it#2015-11-2713:24bozhidarmarmalade is also on the decline and few people bother to update the packages there#2015-11-2713:24bozhidarmost people would be fine if they use just gnu elpa (the default repo), melpa & melpa stable#2015-11-2714:25Joe LaneDid you install all these applications from the Ubuntu software center?#2015-11-2714:27Joe Lane@progzilla: ^^#2015-11-2714:34progzillayes#2015-11-2714:34Joe LaneQuestion to gain context. Have you used Linux extensively in the past? #2015-11-2714:38progzillai have used arch linux only#2015-11-2714:38progzillaam using ubuntu now..#2015-11-2714:40Joe LaneAre you more comfortable with Windows or Mac than Linux? #2015-11-2714:40progzillayes very comfortable with linux#2015-11-2714:46Joe LaneOk. Ubuntu is kind of weird. Since its based off Debian it tries to be stable to a fault. By that I mean a lot of packages in the software center are out of date. If you only have two months to finish your school project I would stick with the best tools you know. I would also suggest looking at light table instead of emacs if it is new to you. I love emacs. It's amazing. But there is a learning curve and you will lose productivity while you get used to it. I suggest light table purely based off of your time constraint. You should be producing code right now in crunch time, not fighting with tools. Feel free to completely disregard this message if you don't think it applies to you, I just know I've tried to learn too many new things at once and it came crashing down on me. #2015-11-2714:48progzillaYou are very right. I'll just stick to your advice and suspend emacs adventure for now till am done.#2015-11-2714:50Joe LaneBtw your error in the console looked like a Java bug. If you can remember them, try to remove the packages you installed with the Ubuntu software center and install them from their webpages directly. #2015-11-2714:53progzillaok.. i have installed intelliJ with cursive and its working perfectly fine. Am familiar with that when coding Java but not with clojure...am sure i can find my way around it soonest#2015-11-2805:39mudphoneAhhhh, got Figwheel working with my CIDER setup… It didn’t appear to be written up anywhere, am I missing something?#2015-11-2814:33bozhidarhttps://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#2015-11-2821:55mudphone@bozhidar: thank you! I hacked together a minimal setup with that link and the om-next tutorial.#2015-11-2821:55mudphonehttps://gist.github.com/mudphone/84952982ea86da1cecc3#2015-11-2907:21bozhidarhere’s why you shouldn’t be using Marmalade anymore - the repo is basically dead#2015-11-2907:21bozhidarhttps://malabarba.github.io/emacs-archive-tracker/#2015-11-2910:30r0manHello, I have a strange Emacs problem related to keybindings. I'm trying to get cider-macroexpand-1 working on my machine. This should be bound to C-c C-m in cider mode. This used to work some time ago, but now whenever I hit C-c C-m Emacs barks with C-C RET is undefined.#2015-11-2910:31r0manWhen starting a clean Emacs with emacs -nwq I also get this.#2015-11-2910:31r0manAny ideas?#2015-11-2910:36andrewtropinC-m is equivalent of RET#2015-11-2910:42r0man@andrewtropin: Hmm, ok. Looking at the keybindings in cider-mode it also says C-c RET is bound to cider-macroexpand-1. But if I press this key sequence nothing happens and the minibuffer shows C-c RET- waiting for another key. If I then press "x" for example it says C-c RET x is undefined.#2015-11-2911:52andrewtropinI'm not good enough in emacs keybindings, because they aweful, i prefer to use spacemacs with vim-like keybindings#2015-11-2912:02r0man@andrewtropin: ok, thanks anyway simple_smile#2015-11-2912:40andrewtropin@r0man#2015-11-2912:41andrewtropinC-c RET works in my spacemacs#2015-11-2914:46twillis@r0man: what does
C-h b
tell you?
#2015-11-2914:46twillisfor example my cider related ones...
Major Mode Bindings:
key             binding
---             -------

C-c		Prefix Command
C-j		cider-repl-newline-and-indent
RET		cider-repl-return
C-x		Prefix Command
ESC		Prefix Command
,		cider-repl-handle-shortcut
<C-down>	cider-repl-forward-input
<C-return>	cider-repl-closing-return
<C-up>		cider-repl-backward-input
<S-home>	cider-repl-bol-mark

C-x C-e		cider-eval-last-sexp

M-,		cider-pop-back
M-.		cider-find-var
M-n		cider-repl-next-input
M-p		cider-repl-previous-input
M-r		cider-repl-previous-matching-input
M-s		cider-repl-next-matching-input

C-c C-b .. C-c C-c		cider-interrupt
C-c C-d		cider-doc-map
C-c RET		cider-macroexpand-1
C-c C-n		cider-repl-next-prompt
C-c C-o		cider-repl-clear-output
C-c C-p		cider-repl-previous-prompt
C-c C-q		cider-quit
C-c C-r		cider-eval-region
C-c C-u		cider-repl-kill-input
C-c C-x		cider-refresh
C-c C-z		cider-switch-to-last-clojure-buffer
C-c ESC		Prefix Command
C-c C-.		cider-find-ns

C-c M-.		cider-find-resource
C-c M-i		cider-inspect
C-c M-m		cider-macroexpand-all
C-c M-n		cider-repl-set-ns
C-c M-o		cider-repl-switch-to-other
C-c M-s		cider-selector
C-c M-t		Prefix Command

C-c M-t n	cider-toggle-trace-ns
C-c M-t v	cider-toggle-trace-var

C-c C-d C-a	cider-apropos
C-c C-d C-d	cider-doc
C-c C-d C-j	cider-javadoc
C-c C-d C-r	cider-grimoire
C-c C-d A	cider-apropos-documentation
C-c C-d a	cider-apropos
C-c C-d d	cider-doc
C-c C-d h	cider-grimoire-web
C-c C-d j	cider-javadoc
C-c C-d r	cider-grimoire

#2015-11-2921:51r0man@twillis: mine is this#2015-11-2923:30twillishmmm how about
C-h f cider-macroexpand-1
?
#2015-11-2923:31twillismine....
cider-macroexpand-1 is an interactive autoloaded Lisp function in
`cider-macroexpansion.el'.

It is bound to C-c RET, <menu-bar> <REPL> <Macroexpand>
<Macroexpand-1>.

(cider-macroexpand-1 &optional PREFIX)

Invoke 'macroexpand-1' on the expression preceding point.
If invoked with a PREFIX argument, use 'macroexpand' instead of
'macroexpand-1'.

[back]

#2015-11-3010:20r0man@twillis: Mine looks like this. It isn't bound to any key.#2015-11-3012:36bozhidarit’s bound only in cider-mode and cider-repl-mode#2015-11-3012:36bozhidarit doesn’t make sense for something like this to be globally bound#2015-11-3013:21r0man@bozhidar: I looked this up in cider mode#2015-11-3013:27r0manMy problem is that just C-c C-m does not work. When I press that key combo the minibuffer says C-c RET- and waits for more input. On the other hand C-c M-m works as expected.#2015-11-3013:44bozhidarare you running GUI Emacs or the terminal version?#2015-11-3013:49r0man@bozhidar: I run the gui version on linux#2015-11-3014:01bozhidarhmm#2015-11-3014:01bozhidarpress ? after “C-c C-m"#2015-11-3014:01bozhidaror “C-h”#2015-11-3014:01bozhidarI wonder what’s this problematic keybinding#2015-11-3014:06r0man@bozhidar: I found it simple_smile I had this in my Emacs config somewhere: (cljr-add-keybindings-with-prefix "C-c C-m")#2015-11-3014:06bozhidaryeah, I thought something like this was the case#2015-11-3014:06bozhidarproblem solved then simple_smile#2015-11-3014:07r0manThanks for the help! Maybe https://github.com/clojure-emacs/clj-refactor.el should suggest another binding for refactoring. I think I got that from there#2015-11-3014:08bozhidarfile and issues and someone will take a look at this#2015-11-3014:08bozhidarthat’s definitely a bad suggestion simple_smile#2015-11-3014:08r0manyep, I will do#2015-11-3014:14r0manDone https://github.com/clojure-emacs/clj-refactor.el/issues/269#2015-12-0123:20rlmfloresI think I found a segmentation fault on emacs (the one downloaded here http://emacsformacosx.com/)#2015-12-0123:20rlmfloresTo reproduce it C-h h (save your buffers first)#2015-12-0123:21rlmfloresstrange thing is that it doesn’t happen when running on the console#2015-12-0123:24twillisyou should just install the one from homebrew https://www.emacswiki.org/emacs/EmacsForMacOS#toc14#2015-12-0409:54bozhidarif you’re interested in CIDER 0.10 you can check out this presentation#2015-12-0409:54bozhidarhttps://skillsmatter.com/skillscasts/7225-cider-the-journey-so-far-and-the-road-ahead#2015-12-0703:45progzillaHey guys sometimes ago, I was complaining of issues with connections in my emacs, cider, etc...but this simple tutorial ended the misery. So i wanna share for anyone to bookmark it. It was simply a environment variable problem. https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get @twillis and others, thanks for your advices and support.#2015-12-0713:26twillis@progzilla: ah yeah that damn JDK_HOME. Glad you are finally getting somewhere#2015-12-0713:51progzillaLolz Yea. Am running all codes with easy now after abt 4 weeks battle #2015-12-1119:47pleasetrythisathomeHey everyone. just updated clojure mode and s/defn is no longer colored correctly...anyone know the what should be added to my config to fix?#2015-12-1120:51cmack@pleasetrythisathome: hmmm that is strange. ss/defn works. I'm not seeing off-hand which commit might be the culprit#2015-12-1120:53cmackwas it a big version jump or are you on MELPA versions?#2015-12-1121:12pleasetrythisathomei'm on melpa versions and update pretty regularly#2015-12-1121:12pleasetrythisathomepossible it wasn't clojure-mode and was something else#2015-12-1121:13pleasetrythisathomei can step back through my git history, just wondering if it was something expected...#2015-12-1121:40bozhidarcan you share a screenshot with us?#2015-12-1121:40bozhidarI’d like to see what do you mean by “correctly” and “incorrectly"#2015-12-1123:56cmackone character + / gets all faces font lock and 2+ chars + / gets font-lock-type-face#2015-12-1216:14bozhidargot it#2015-12-1216:14bozhidarfile a bug and we’ll have this fixed#2015-12-1216:15bozhidar@malabarba: any idea which change caused this regression?#2015-12-1301:17cmack@bozhidar @malabarba I filed https://github.com/clojure-emacs/clojure-mode/issues/355#2015-12-1417:46base698Is jabber broken for anyone in emacs?#2015-12-1509:39nhaDid one of the last prelude/magit updates break something for anyone ? I occasionally get errors like : running git --no-pager... FAILED error 128#2015-12-1509:39nha(when trying to amend commit messages it seems)#2015-12-1509:42nha(that exactly https://infinit.io/_/9FfbsEx)#2015-12-1510:05bozhidarmight be some bug in magit you hit#2015-12-1510:05nhaThanks simple_smile Prelude is awesome#2015-12-1510:09malabarba@cmack: shouldbe fixed now#2015-12-1513:50nhaOk I must have had some stale files, it is ok now.#2015-12-1518:21base698anyone on slack with emacs?#2015-12-1518:50joelkuiperugh cider makes my emacs so slloooow#2015-12-1518:50joelkuiperespecially when output accumulates in the REPL#2015-12-1518:50joelkuiperto the point of not being usable#2015-12-1518:50joelkuipermy .emacs https://github.com/joelkuiper/dotfiles/blob/master/emacs#2015-12-1521:36magnars@joelkuiper: if the size of the REPL makes it slow, you can clear that quickly with C-u C-c C-o at least. It would certainly be better if it didn't slow down, but that's one kind of workaround at least.#2015-12-1521:49ghosssyou can clear the whole REPL buffer with C-c M-o#2015-12-1522:06magnars@ghosss: that's the old keybinding. C-u C-c C-o is the new one.#2015-12-1522:11ghosssI'm behind!#2015-12-1601:12mlbatema@joelkuiper: You might find more folk able to help you with your specific issue in #C0617A8PQ simple_smile#2015-12-1603:21jethroksyanyone here actually using monroe instead of cider?#2015-12-1606:54bozhidarmonroe looks dead to me - 0 activity there for over a year#2015-12-1606:54bozhidarand it’s based off a very old version of cider’s nrepl client#2015-12-1606:54bozhidarwhich was notoriously buggy#2015-12-1606:55bozhidarif someone wants a simpler tool, they should probably check out inf-clojure (it doesn’t even need nrepl)#2015-12-1606:56bozhidaras for the performance issues - https://github.com/clojure-emacs/cider/issues/228#2015-12-1606:57bozhidarI never spend much time debugging this, as there was a simple known workaround and moving to comint will probably fix this anyways#2015-12-1607:00jethroksyhmm#2015-12-1607:01jethroksyi guess only until recently I've preferred something like monroe simply because cider's interaction with brepl just wasn't there yet#2015-12-1607:01jethroksybut it seems that functionality has been added in...?#2015-12-1607:07bozhidarwhat’s brepl?#2015-12-1607:07bozhidarbtw, this is inf-clojure’s repo https://github.com/clojure-emacs/inf-clojure#2015-12-1607:08jethroksybrowser repl#2015-12-1607:08jethroksyclojurescript really#2015-12-1607:08bozhidarit has the same idea as monroe - make it as simple as possible; no external deps, no servers, no nothing#2015-12-1607:08jethroksynow there's jack in for clojurescript#2015-12-1607:08bozhidarbut it still has the basic features#2015-12-1607:08bozhidar@jethroksy: ah, yes - we’ve added this in 0.10#2015-12-1607:09jethroksyi really like the overlay though#2015-12-1607:09bozhidaralthough even before it wasn’t very hard to boot a cljs repl#2015-12-1607:09jethroksyinstallation for cider used to be really messy, but now that's all cleaned up#2015-12-1607:09jethroksy😄#2015-12-1607:09bozhidarwe do our best#2015-12-1607:10bozhidarideally we’d get to some point when we can auto-install the non-Emacs deps#2015-12-1607:10bozhidarbut even the current process is not super complex I think#2015-12-1607:13jethroksyyeah i find that having to edit lein's profiles.clj just to get cider working perfectly is alright, but this should be automated#2015-12-1607:14jethroksyor at least get them to keep in sync#2015-12-1616:00malabarbaThere should be a way to pass this information to lein via command line #2015-12-1616:01malabarbaIs there? #2015-12-1616:51bozhidarI’m not sure what you mean by this#2015-12-1616:52bozhidarthe most realistic short-term fix would be to simply examine profiles.clj and update it if it doesn’t match cider’s requirements#2015-12-1617:40malabarbaI mean that when you run lein repl, lein should allow for plugins and deps to be specified in the command line args #2015-12-1618:01bozhidarno idea#2015-12-1618:51jethroksyboot does allow this#2015-12-1618:53jethroksytried out inf-clojure and I must say it feels correct...#2015-12-1619:46malabarbaWe should file an issue to investigate this. I think this would be the cleanest way to offer a "no hassle" jack-in#2015-12-1620:37bozhidarindeed#2015-12-1620:37bozhidarbtw, for some users the solution is trivial#2015-12-1620:38bozhidarif they don’t have profiles.clj#2015-12-1620:38bozhidarwe can just create the right one simple_smile#2015-12-2018:18noogahttps://github.com/tonsky/FiraCode anyone tried this?#2015-12-2018:35nooganevermind, I just tried#2015-12-2018:35nooga-> ->> look awesome now#2015-12-2018:38nooga😄#2015-12-2213:23jethroksy@nooga mine doesn't seem to have changed though, I have font locking enabled too#2015-12-2214:44nooga@jethroksy: no idea, I’m an emacs noob#2015-12-2215:20jethroksy@nooga: meh...#2015-12-2215:20jethroksyis your emacs.d on github?#2015-12-2215:20nooganope, I use emacs-live and have this huge “live pack” of my own#2015-12-2215:20noogabasically I just followed FiraCode wiki#2015-12-2215:21jethroksythrew in the large chunk of code?#2015-12-2215:21jethroksyme too#2015-12-2215:21noogaset font to fira code and then pasted this code and it worked#2015-12-2215:21jethroksyfont definitely did change#2015-12-2215:21jethroksybut not wrt to the characters#2015-12-2215:21nooga😐#2015-12-2215:21jethroksyso typing -> gives you the "awesome" new one for you?#2015-12-2216:21noogayup#2015-12-2216:22noogacocoa emacs 24.5 on el capitan#2016-12-2816:04rcoedoI’m setting up emacs to work with figwheel. I use ring to serve a clojurescript application and I want to be able to eval both clojure and clojurescript code.#2016-12-2816:04rcoedodo I need to launch two cider instances and connect each buffer to the right cider?#2016-12-2816:04rcoedoI’m a bit lost with all this 😅#2016-12-2816:06robertoI would guess so. I personally don’t use cider + figwheel. But I imagine you need two cider instances because you basically have two repls running (clojure & clojurescript).#2016-12-2816:08rcoedoI see#2016-12-2816:08rcoedoare you aware if there is a way of telling cider which repl use based on the file extension?#2016-12-2816:09rcoedoI guess I can live with figwheel outside of emacs anyway but it would be great simple_smile#2016-12-2816:14robertothere is a wiki in the figwheel repo about how to do that#2016-12-2816:15robertohere https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#2016-12-2816:17rcoedooh, thanks a lot!#2016-12-2816:39malabarba@rcoedo cider will do that automatically #2016-12-2816:39malabarbaThe file extension thing #2016-12-2816:43malabarbaAs for how to start the figwheel repl #2016-12-2816:43malabarbaI think there are several ways #2016-12-2816:44malabarbaIf you use the project.clj described here https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#setting-up-cider#2016-12-2816:58rcoedo@malabarba: then I’m probably missing something 😞#2016-12-2816:59rcoedoI run cider-jack-in-clojurescript, which launches a nrepl server and two cider buffers: one for clojure and another one with figwheel#2016-12-2816:59rcoedobut I need to tell emacs to use the cljs cider process with cider-assoc-buffer-with-connection#2016-12-2817:00rcoedootherwise I cant eval clojurescript in that buffer#2016-12-2817:13malabarbaHm... That shouldn't be necessary #2016-12-2817:13malabarbaDo you think you can share a minimal project for us to reproduce that? #2016-12-2817:14malabarbaAlso, do you get any warnings on the repl buffers? #2016-12-2817:14rcoedono warnings#2016-12-2817:15rcoedothis is the project#2016-12-2817:15rcoedohttps://github.com/rcoedo/reagentnoob#2016-12-2817:16rcoedoalso, I have this in my init.el
#2016-12-2821:40malabarba@rcoedo: I assume cider is in your profiles.clj?#2016-12-2900:08rcoedo@malabarba: yes, it is#2016-12-2900:49rcoedo😅#2016-12-2900:50rcoedoI updated all my emacs packages and now it is working...#2016-12-2900:51rcoedothanks anyway @malabarba#2016-12-2913:06malabarba😃 🍻 #2016-01-0123:40bozhidarhttps://github.com/clojure-emacs/clojure-mode/pull/347#2016-01-0123:40bozhidarthat’s important new functionality#2016-01-0123:40bozhidarthat renders useless packages like align-cljlet#2016-01-0123:41bozhidarplay with it a bit and let us know what you think#2016-01-0904:37jonahbentonwhy would my emacs, version 24.5.1 on fedora 23, on a C-X C-S on a buffer I've been editing and saving, editing and saving, ad infinitum , all of a sudden need to re-ask me, the file to write to?#2016-01-1004:26malabarba@jonahbenton are you sure you didn't try to save while the cursor was in the minubuffer? #2016-01-1004:27malabarbaThat happens to me sometimes, and then emacs asks which filename to use for the minubuffer #2016-01-1018:00jonahbenton@malabarba: ty, i have noticed that too. my feeling is that it also happens when in the buffer, but I will make sure to confirm next time it happens.#2016-01-1119:43kardanI’m exploring prelude after using emacs-live. Is there nothing like https://github.com/gstamp/align-cljlet by default?#2016-01-1208:02bozhidar@kardan: you don’t need it#2016-01-1208:02bozhidarin the latest version of clojure-mode we’ve added better alignment functionality#2016-01-1208:02bozhidarso, no one should be using align-cljlet anymore#2016-01-1208:03bozhidarhttps://github.com/clojure-emacs/clojure-mode#vertical-alignment#2016-01-1215:09kardan@bozhidar: ah, I see. Thanks for the answer & the work!#2016-01-1404:24jfntnIs there a way to disable the cider-backed indentation in the new clojure-mode?#2016-01-1404:26jfntnThis seems to cause auto-indentation minor modes like aggressive-indent to block very frequently#2016-01-1406:35bozhidaryou have to disable it in cider simple_smile#2016-01-1406:39bozhidarthe problem is that we didn’t add an easy toggle to do this#2016-01-1406:39bozhidarso you’ll have to override clojure-get-indent-function or cider—get-symbol-indent#2016-01-1406:39bozhidarfile a ticket for this, as I’m interested in both what’s causing the performance issue#2016-01-1406:40bozhidarand adding some easy way for people to disable this behaviour if they want to do so#2016-01-1412:50malabarba@jfntn as a user of both cider and aggressive-indent-mode, I'd like to try to figure out why it's slow for you #2016-01-1412:50malabarbaCould you file a minimal example? #2016-01-1412:51bozhidar“user” simple_smile#2016-01-1413:34malabarba😇 #2016-01-1509:04nhaIf I have a two REPL open (one clojure; one clojurescript), how can I direct C-x C-e to the right buffer ? ex. depending on the mode/file type ? I use boot if it matters#2016-01-1520:32nhaAlso, how can we do that with emacs ? (I already have multiple cursors) - https://youtu.be/DHpk_-1H7Qo?t=1m30s#2016-01-1520:52malabarbaYou mean the part where he inserts a different number for each cursor? #2016-01-1520:53nha@malabarba: Yes exactly simple_smile#2016-01-1520:53malabarbaThat's a command in multiple cursors #2016-01-1520:53malabarbaI forget the name now #2016-01-1520:53malabarbaIt's something with insert#2016-01-1520:53nhaOh ok silly me I assumed it was something else. Thanks !#2016-01-1520:54malabarbaYou can probably find it if you type M-x mc and then hit TAB #2016-01-1520:55malabarbaAnd then you can bind it to some key :-)#2016-01-1520:55nhaYou are right is it : mc/insert-numbers`#2016-01-1520:55malabarba😉 👍 #2016-01-1520:55malabarbaAs for your other question, it should happen automatically #2016-01-1520:56nhaOh - then I am doing something wrong#2016-01-1520:56malabarbaAt least on the latest stable #2016-01-1520:56nhaAh let me update simple_smile#2016-01-1520:56nhaThings move fast these days in cider-land simple_smile#2016-01-1520:59nhahttps://infinit.io/_/VLwkw78 Hmm it doesn't work for me#2016-01-1521:19malabarbaWhat version are you on? And Did you restart everything after updating?#2016-01-1521:20malabarbaAh, never mind. I see the version on the screenshot #2016-01-1521:22nhaRight I really updated this time : version` ; CIDER 0.11.0snapshot (package: 20160113.2303) (Java 1.8.0_60, Clojure 1.7.0, nREPL 0.2.12)`, same result : https://infinit.io/_/ibrTT3c#2016-01-1521:23nhaI start them up with cider-jack-in-clojurescript#2016-01-1901:05eagI’ve been trying to get flycheck-clojure working with no luck. I have kibit-helper working fine. But thought it would be nice to be fully integrated. Flycheck-buffer seems to do nothing. I’m pretty sure the emacs side of things is correct. Not much there really. I’ve changed my profiles.clj around and had vastly different results anywhere from wrong number of args in elisp to finding the first error but not displaying or doing nothing at all. Both eastwood and kibit work fine from the CL. As well as kibit works fine through kibit-helper. It’s just flycheck/squiggly that I can’t get to work.#2016-01-1901:26eagI do see in the nrepl-messages that squiggly-clojure.core is being invoked, and I don’t see any errors. Anyone have this working well? I am at a loss at what to try next. At the moment I’m on cider-nrepl 10.0, tools.nrepl2.12 and the latest of the squiggly dependencies.#2016-01-1901:41eagHello Hugo simple_smile#2016-01-1901:55jethroksy@eag: I had that wrong number of args error#2016-01-1901:55jethroksysquiggly requires clojure version > 1.7.0#2016-01-1901:55jethroksy>=#2016-01-1901:55jethroksy>=#2016-01-1901:55eagyea. I saw your thread in cider github. I have 1.7.0.#2016-01-1901:56jethroksylein i assume?#2016-01-1901:57jethroksywhat does lein deps :tree say#2016-01-1902:09eagit’s a bit long.#2016-01-1906:25eagThe nrepl-messages buffer shows no errors.#2016-01-1906:27eagI have specifically added errors that eastwood and kibit find and have verified that on the CL, and through kibit-helper in emacs.#2016-01-2108:52kneivaHi, I’m running Emacs & CIDER on a Mac from iTerm. After cider-jack-in I can (use ‘mynamespace.core :reload-all) and then use the functions. What is the easiest way to reload the namespace in the REPL? Like if I add a new function and then do C-c C-k the new function cannot be called from the REPL ("Unable to resolve symbol…")#2016-01-2109:04kneivaAh, I need to do (in-ns ‘mynamespace.core).#2016-01-2109:38rickmoynihan@kneiva: C-c C-l is normally bound to load namespace and C-c M-n should switch your repl to the namespace your cursor is in#2016-01-2109:47kneivaok, thanks#2016-01-2110:05bozhidaryou can also do C-c C-k (compile current namespace) and C-u C-c C-z (go to repl and set the namespace to that of the current source buffer)#2016-01-2211:43yendacan you have jump to symbol definition in cljs the way it works in clj ? M-. ?#2016-01-2213:44bozhidaryes#2016-01-2213:44bozhidaras long as there’s an active cljs connection#2016-01-2213:44bozhidarthis will work for ClojureScript code#2016-01-2213:51yendabozhidar: right it works but not for hiccup forms#2016-01-2213:52bozhidarsubmit a ticket on the issue tracker with some repro steps#2016-01-2213:53bozhidarand we’ll look into it (eventually)#2016-01-2213:55yendawhich one ? cider ?#2016-01-2213:58bozhidaryes#2016-01-2214:35jethroksy@bozhidar: am i right to say that inf-clojure only looks at the existence of "build.boot" or "project.clj" to determine the project root, but does not, based on this, run the appropriate inf-clojure-program#2016-01-2214:54colin.yateshi all (and happy 2016) - running (the excellent) vanilla prelude and when I jump between marks I get a weird animation - any idea what that is and how to turn it off?#2016-01-2214:58colin.yatesactually it happens only in clojure files and happens when I jump a page (i.e. ‘C-v’/‘M-v’)#2016-01-2215:00colin.yatesscrap that - it happens in other modes as well.#2016-01-2215:04colin.yatesjust me then simple_smile? @bozhidar - any ideas?#2016-01-2215:04jethroksyits a feature#2016-01-2215:04jethroksyit was quite recently added I think#2016-01-2215:04colin.yateshi @jethroksy - any idea what this feature is called so I can disable it#2016-01-2215:04jethroksylet me search what it is#2016-01-2215:05colin.yatesthanks#2016-01-2215:06jethroksybeacon-mode#2016-01-2215:07jethroksyhttps://github.com/bbatsov/prelude/blob/f92ea41b72cbf187ab715231a6e107b6b9fe10c0/core/prelude-ui.el#L81-L82#2016-01-2215:07jethroksynot so recently added i guess 😄#2016-01-2215:07colin.yatesthat’s the one - thanks#2016-01-2215:08jethroksyyou're welcome#2016-01-2215:09colin.yateswhilst I (or more appropriate you :-)) are here - I am struggling to get meta mapped to the right Cmd on El Capitan using terminal.app.#2016-01-2215:09colin.yatesI tried iterm2 but it does funny things with control (so C-= produces 😃.#2016-01-2215:10colin.yatesI have control bound to my CapsLock#2016-01-2215:10colin.yatesgoogling produced many hits none of which worked - any suggestions? Running in a gui works fine but you know, terminal rocks#2016-01-2215:11jethroksyhaha I run emacs on GUI#2016-01-2215:11jethroksyI think you can do the swap in your emacs config itself#2016-01-2215:11colin.yatesyeah, I tried that but it didn’t do anything. All the problems disappear in the GUI, I think I know my answer… simple_smile#2016-01-2215:12jethroksyI use my macbook in the office, and the meta isn't that inconvenient#2016-01-2215:12jethroksyi rarely touch it#2016-01-2215:13jethroksycontrol mapped to caps too#2016-01-2215:13colin.yatesI use it all the time, but that is because I haven’t yet got my keymaps in my muscle memory#2016-01-2215:14jethroksyI used to use prelude, but have moved to my own config#2016-01-2215:14jethroksydid steal some awesome bindings like C-x m for eshell#2016-01-2215:14jethroksya lot of prelude tries to help you avoid using the meta key#2016-01-2215:15jethroksyC-x C-m for M-x#2016-01-2215:15colin.yatesloving prelude and helm, rocking my world.#2016-01-2215:15colin.yatesoh yeah - forgot about that#2016-01-2215:16jethroksytry to force yourself to use new commands everyday ^^#2016-01-2215:16colin.yatesfor sure!#2016-01-2215:16colin.yatesthat isn’t the problem, it is remembering the previous day’s ones !!!#2016-01-2215:17jethroksyCIDER has a ton of hidden gems#2016-01-2215:17jethroksyI found it a little heavy, so i'm using inf-clojure#2016-01-2215:17jethroksybut can't seem to get company-mode working with it 😕#2016-01-2215:18colin.yatesyeah, unfortunately emacs for me is still a huge yak, but one I quite enjoying petting from time to time#2016-01-2215:25jethroksy@bozhidar: inf-clojure-completions returns end of file during parsing for me:
~/Code/tob/src/tob $ inf-clojure-completions foo
End of file during parsing
#2016-01-2215:27jethroksyI can confirm that the completion command works in the REPL however#2016-01-2215:27jethroksy
boot.user=> (complete.core/completions "hi")
("hiccup.compiler" "hiccup.core" "hiccup.def" "hiccup.page" "hiccup.util")
#2016-01-2215:28bozhidar@jethroksy: file a ticket simple_smile#2016-01-2215:30jethroksyalright. unfortunately my elisp isn't good enough 😞#2016-01-2216:05colin.yatesI am trying to apply different font-locks (as inspired from https://github.com/danielsz/.emacs.d#pretty-lambda-and-co but I want to distinguish between defn and defn-. I added entries for defn and it works but it ignores the entries for defn-, I assume because the first regular expression matches.#2016-01-2216:06colin.yatesI tried the following regexp to strictly choose defn but it didn’t seem to work (("(\\(defn[^-]\\)[\[[:space:]]”#2016-01-2216:06colin.yatesany pointers?#2016-01-2219:36dorab@colin.yates: I don't know much about font-locks, but perhaps the problem is that the regex "defn[^-]" matches "defn " (note the space after the "defn") and so the extra "[:space:]" might be superfluous? Perhaps the regex should be "(defn "?#2016-01-2219:37colin.yatesthanks @dorab, I will experiment a bit further.#2016-01-2220:02andrewmelishi -- i'm moving from clojure to clojurescript (specifically om next) for the first time and my emacs formatting/indentation is pretty janky with this syntax. has anyone else dealt with this, or is it just something with me/my config?#2016-01-2301:57malabarbawhat do you mean by janky?#2016-01-2308:40jethroksydoes anyone know what ^[ means in emacs?#2016-01-2311:23malabarbaIt's Ctrl +[#2016-01-2311:23malabarbaWhich is also equivalent to the escape key (I think) #2016-01-2311:35jethroksyI figured#2016-01-2311:35jethroksygot inf-clojure working with boot with a workaround#2016-01-2311:53malabarba@collin.yates If you only want to match defn you can use this regexp: "\\_<defn\\_>"#2016-01-2311:54malabarba\\_< and \\_> denote the start and end a symbol respectively#2016-01-2311:54malabarbaso this is guaranteed to exclude symbols like defn- or some-defn#2016-01-2523:43aaelonyI have cultivated a bad habit of inadvertently hitting command-r while in emacs on mac os x ... It makes the entire screen go blank, and I can't get out of it. Anyone know what this is and how to get out of it (without losing current changes) ?#2016-01-2600:07jethroksyYou can find out what key binding that is with C-h k Cmd-r#2016-01-2615:31peejaI don't suppose there's some fantastic package out there that will make paredit-style commands work in CSS, is there?#2016-01-2615:31peeja(or, Less, really)#2016-01-2615:31peejaSpecifically, I want to make a new selector and block, and then slurp in several declarations and blocks#2016-01-2615:37jethroksysmartparens should deal with these situations#2016-01-2615:38jethroksyalthough i don't see why paredit doesn't -just work-#2016-01-2615:38jethroksyoh less...#2016-01-2615:39jethroksyyeah smartparens would be a better package for your use-case#2016-01-2615:55peeja@jethroksy: Oh, that's awesome. Thanks!#2016-01-2815:34peejaAre there any popular tools for running clojure tests automatically/continuously in emacs?#2016-01-2815:43yendaautotest.clj ?#2016-01-2815:44jethroksyI like to do my testing in the terminal#2016-01-2815:44jethroksywhy do it in emacs?#2016-01-2815:45yendawhy not, emacs is an os#2016-01-2815:45jethroksyI'd just do it in eshell#2016-01-2815:46yendain the parens of the dead webcast emacsrock! does autotests in a buffer, maybe it's a shell buffer idk#2016-01-2815:47yendathe workflow in the web cast is epic but it's a shame, it is barely explained and not documented afaik#2016-01-2815:47jethroksymost of the magic is from clj-refactor#2016-01-2815:48yendawhich sadly doesn't seem to work in cljs#2016-01-2815:48jethroksya lot of his work in parens of the dead is in cljs though?#2016-01-2815:50yendano not much#2016-01-2815:50yendaall the logic is in clj#2016-01-2815:50jethroksyhttps://github.com/magnars/.emacs.d/blob/master/site-lisp/clj-autotest.el#2016-01-2815:50jethroksyI guess you could do that ^#2016-01-2815:53jethroksyI use boot so I just do
(deftask exp []
  (comp
     (watch)
     (expectations)))
#2016-01-2815:53jethroksythen I run boot exp in a shell#2016-01-2815:53peejaIiiinteresting#2016-01-2815:53jethroksyeverytime I save a file my tests rerun#2016-01-2815:53peejaI guess, to be fair, what I really care about is cljs, since that's where I'm already looking at code on one half of the screen and a browser on the other#2016-01-2815:54peejawhich is why I don't want to also keep switching to a terminal to run tests simple_smile#2016-01-2815:54peejaSomething like that cljs-autotest.el might do nicely#2016-01-2815:54jethroksyYou wouldn't have to#2016-01-2815:55jethroksyC-x 2 and run boot exp#2016-01-2815:55jethroksybut well whatever floats your boat#2016-01-2815:55peejaOh, yeah, I guess so#2016-01-2815:55peejaIdeally, I'd want something that got out of my way while it was green#2016-01-2815:55jethroksyah that would be handy indeed#2016-01-2815:56jethroksymy tests run in the background#2016-01-2815:56jethroksythere are notify and speak tasks#2016-01-2815:56jethroksyso you hear an alarm when your tests go bad#2016-01-2815:56peejaIdeally, I'd want something that got in my way when it was red 😉#2016-01-2815:56peejanotify might be enough, though#2016-01-2815:56jethroksythat's only if you're using boot#2016-01-2815:57jethroksyI haven't touched lein in a while#2016-01-2815:57peejaYeah, I'm on lein. But I'm sure something like that's still possible#2016-01-2815:59jethroksyhave you seen doo?#2016-01-2815:59peejaYeah, that's where I'm trying to move our tests to#2016-01-2815:59peejaDoes it have any integration-y support? Or does it just do lein doo?#2016-01-2816:00jethroksydoesn't seem like there's a package that integrates it into emacs as of yet#2016-01-2816:00jethroksyyou could look into inf-clojure's code for parsing input#2016-01-2816:01jethroksylein doo does have a watch mode#2016-01-2816:01peejaYeah, that might be enough#2016-01-2816:01jethroksyfor emacs people it's never enough xD#2016-01-2816:01peejaYeah…#2016-01-2816:02jethroksymy elisp is terrible so I can't help here#2016-01-2816:53malabarba@peeja I don't know how Magnar implemented it, but here's how I do auto-testing http://endlessparentheses.com/test-driven-development-in-cider-and-emacs.html#2016-01-2816:54malabarbaI prefer to run tests whenever I do load-file, instead of whenever I save#2016-01-2816:54peejaOoh, thanks!#2016-01-2913:23ddellacostatrying to set up indent formatting for some functions/macros using define-clojure-indent, and sometimes it just seems to not work#2016-01-2913:23ddellacostahow can I debug this? I’m relatively clueless when it comes to emacs lisp, I have to admit 😞#2016-01-2913:31cichli@ddellacosta: what exactly are you trying to do? This is how I use define-clojure-indent in my config:
(define-clojure-indent
  (for-all 1)
  (quick-check 1))
#2016-01-2913:31ddellacosta@cichli: yeah, exactly, that’s what I’ve got#2016-01-2913:31ddellacostabut, for some functions it just doesn’t seem to get picked up#2016-01-2913:32ddellacostain particular, I’m trying to set it up for some route macros used by compojure-api#2016-01-2913:32cichliBut works for others?#2016-01-2913:32ddellacosta
(define-clojure-indent
  (GET* 1)
  (POST* 1))
#2016-01-2913:32ddellacostayep, exactly#2016-01-2913:32ddellacostalike, I’ve got the go macro from core.async in there, works just fine#2016-01-2913:33ddellacostajust tested in the same namespace to confirm#2016-01-2913:33cichliIf I eval that then it indents as follows:
(GET* :foo
  :bar)

(POST* :foo
  :bar)
which I think is right? Maybe check you’re on the latest version of clojure-mode
#2016-01-2913:34ddellacosta@cichli ah, good point—let me confirm that, thanks#2016-01-2914:26minimalwouldn’t you want (GET* 2)?#2016-01-2914:26minimal
(GET* "/hello" []
  :query-params [name :- String]
  (ok {:message (str "Hello, " name)}))
#2016-01-2914:48ddellacostaminimal: huh, that seems to have done it…!? Well, I won’t think too hard about it. Thanks!#2016-01-2914:51minimalthe number is just the number of forms you want on the top line after the GET*#2016-01-3007:36bozhidarand I’d like to mention this is our documentation#2016-01-3007:36bozhidarwhich few people ever read simple_smile#2016-01-3121:20j0ni@bozhidar: to be fair, if you track master (as I do), you either have to read the documentation end to end several times a week, or read through the commit log and check everything that updates the readme, or you miss important changes#2016-01-3121:20j0ninot complaining, just saying#2016-01-3121:21j0nijust found out about :align-arguments in clojure-mode yesterday for example#2016-01-3121:55bozhidareverything important is always in the changelog#2016-01-3121:55bozhidar:align-arguments is no exception#2016-01-3121:56bozhidarso in general I’d suggest for everyone to just keep an eye on the changelog and they are unlikely to miss something important#2016-02-0100:21malabarbaAnd if you use Paradox you can hit l on a package to see its git log. #2016-02-0106:05bozhidarthis should definitely be in package.el as well simple_smile#2016-02-0106:05bozhidarI wish more people were using github’s release notes functionality#2016-02-0106:06bozhidarthen you could add some action to simply show them#2016-02-0106:06bozhidare.g.#2016-02-0114:16malabarbaIndeed. #2016-02-0114:17malabarbaI think Emacs could really use a package for better github interactions #2016-02-0114:17malabarbaMagit is great for git stuff #2016-02-0114:17malabarbaBut most developers just tag a release with Magit and push the tag (me included) #2016-02-0114:20malabarbaMaybe if there was an Emacs interface for github release notes people would use it more #2016-02-0217:31hugodIs it possible to get cider-jack-in-clojurescript to use a figwheel browser session?#2016-02-0217:34hugodDisabling eastwood (via squiggly) for clojurescript buffers would be nice too.#2016-02-0218:20hugodfigwheel and weasel seem to work ok together simple_smile#2016-02-0220:14hugodcider keeps forgetting about my *cider-repl* buffers#2016-02-0312:09malabarbaDisabling is simple#2016-02-0312:09malabarbaJust add a hook to clojurescript-mode-hook for that#2016-02-0312:10malabarbaAs for jack-in, by definition this command only creates new processes. If you want to connect to something that already exists you'll need to use cider-connect#2016-02-0315:24yendaI'm trying to debug for the time with cider but I get this#2016-02-0315:25yendait looks like I am up to date#2016-02-0315:33malabarbayenda: I'm sorry, I don't understand. What's the issue you get? #2016-02-0315:34yendawhen I do C-u C-M-x I get this message ^#2016-02-0320:17malabarbaSorry, this must be a problem with the slack android app. I don't see a message above. :-(#2016-02-0320:17malabarbaI'll get back to you when I'm on a laptop #2016-02-0416:09anmonteironewbie question: what's the magit equivalent of git push -u origin my-new-feature-branch ?#2016-02-0416:25julianYou can specify source and target with P o (magit-push)#2016-02-0416:25julianSome more push options here: http://magit.vc/manual/magit/Pushing.html#Pushing#2016-02-0416:36malabarba@yenda: Ah. I see your problem. The current solution is here: https://github.com/clojure-emacs/cider/issues/1462#2016-02-0417:38yendathanks I'm gonna look at it#2016-02-0421:05anmonteiro@julian: thx!#2016-02-0511:27noogais there a simple way to apply text-scale-increase|decrease to the whole frame? it only changes current buffer for me#2016-02-0513:48yendachange the font-size ?#2016-02-0514:05noogayeah#2016-02-0514:05noogabut for the whole frame#2016-02-0514:05noogaC-x C-+ doest that for buffers#2016-02-0516:36bozhidar(set-frame-font “Font Name 12”)#2016-02-0516:36bozhidarchange 12 with the size you want#2016-02-0611:42lowl4tencyHi guys, are there a screencasts about emacs? Like http://vimcasts.org?#2016-02-0611:43lowl4tencyI want to show them vim-users simple_smile#2016-02-0611:43jethroksyemacsrocks?#2016-02-0611:43jethroksyhttp://emacsrocks.com/#2016-02-0611:43lowl4tencyI dunno simple_smile#2016-02-0611:44jethroksyvim users are hard to convert in general#2016-02-0611:44lowl4tencyLooks like it's what I wanted#2016-02-0611:44jethroksymaybe what they wanna see is spacemacs#2016-02-0611:44lowl4tencyjethroksy: they are looking a way to migrate, just they haven't a good way. They are stuck on something and back on vim#2016-02-0611:45lowl4tencyYeah, I advised it#2016-02-0611:45lowl4tencyThank you, emacsrocks looks good#2016-02-0611:45jethroksyyou're welcome simple_smile#2016-02-0611:45lowl4tencyParens of the dead as well I guess, but it's more about clojure simple_smile#2016-02-0611:46jethroksyproduced by the same person#2016-02-0611:49jethroksy@bozhidar: thanks for replying. There's a breaking change in inf-clojure which I've alerted you about on Github issues, hopefully you can take time to review that simple_smile#2016-02-0612:30lowl4tencyOh really, cool!#2016-02-0616:41bozhidar@jethroksy: yeah, I saw your report#2016-02-0616:41bozhidarthe problem is fixed now#2016-02-0720:32anmonteirois it possible to override a minor mode's keymap exclusively when typing in the minibuffer?#2016-02-0720:36anmonteiroI'll rephrase: I've added a hook in paredit-mode to execute paredit-newline when I click RET. However I'd like to disable this only in the case of eval-expression-minibuffer-setup-hook. Any pointers on how to do it appreciated#2016-02-0808:59bozhidaryou can add a condition in your hook function#2016-02-0809:00bozhidare.g. (if (eq this-command …))#2016-02-0809:00bozhidarthis-command refers to the interactive command you’re current executing#2016-02-0809:01bozhidarand by hook function#2016-02-0809:01bozhidarI actually meant keybinding#2016-02-0809:01bozhidarinstead of mapping RET directly to paredit-newline#2016-02-0809:02bozhidaryou can map it some lambda with a bit of logic inside it#2016-02-0810:10anmonteiro@bozhidar: thanks, but I've found an alternative solution. It seems this is working nicely:
(eval-after-load 'paredit
  #'(define-key paredit-mode-map [remap newline-and-indent] 'paredit-newline))
#2016-02-0810:23bozhidar#’ is not necessary#2016-02-0810:24anmonteiroI'll remove it. I'm still not very familiar with the EL syntax#2016-02-0810:36anmonteiro@bozhidar: it seems that # wasn't necessary, but if I omit the ' emacs will complain the following: Symbol's value as variable is void: paredit-mode-map#2016-02-0810:43bozhidaryeah, this slipped my mind#2016-02-0810:49anmonteiroseems like # is just backwards compatibility with older emacs versions?#2016-02-0811:16malabarbaNo. #' is for quoting functions. It's not strictly necessary, but it's a good habit. #2016-02-0811:17malabarbahttp://endlessparentheses.com/get-in-the-habit-of-using-sharp-quote.html #2016-02-1002:47vermanot sure I am doing this right, new to emacs in general but I followed the instructions on the clj-refactor page and the package installed fine, however none of the dependencies seem to have installed.#2016-02-1002:48vermafirst it complained about dash not being available, did a package-install RET dash and that error went away#2016-02-1002:48vermaand it started complaining about s.#2016-02-1002:49vermaNow its doing the same thing for yasnippet package, so I am definitely doing something wrong#2016-02-1002:51vermathis is what I have so far: https://gist.github.com/verma/0b895d3122a2ea71b899#2016-02-1002:51vermaany help appreciated simple_smile
#2016-02-1007:45bozhidarthe second package-initialize call is redundant#2016-02-1007:45bozhidaroverall your setup looks fine to me#2016-02-1007:46bozhidarpackage.el should have installed the deps automatically for sure#2016-02-1007:46bozhidarwhat’s your Emacs version?#2016-02-1014:10verma24.5 (9.0) on OSX#2016-02-1014:10vermaI’ll try the same config on my linux machine later today, will report back#2016-02-1023:38vermaI saw the same errors on my linux box as well, I must be missing something#2016-02-1102:00malabarbaNo, it's a bug somewhere. Many others are getting this issue #2016-02-1103:22vermadoes package.el resolve dependencies based on what a package requires?#2016-02-1106:08mulchyHey everyone, This might be the wrong place to ask this, but does anyone have a good tutorial for getting emacs set up to edit clojurescript with a browser connected repl? I have tried some searching and several hours of fumbling, but the steps keep changing. Ideally I would like to call some cider command and have that start everything for me, similar to cider-jack-in for regular clojure code. cider-jack-in-clojurescript seems to give me just a rhino repl. I am really struggling to understand why this is so hard.#2016-02-1109:06benedek@verma this was a bug in clj-refactor snapshot. It is fixed now tho. Pls try to install it again should pull its deps fine#2016-02-1109:48malabarba@verma It resolves deps based on what a package declared on the ;; Package-Requires: comment at the top.#2016-02-1113:30verma@benedek: I installed clj-refactor again and things seem to be working fine now :thumbsup:#2016-02-1113:30vermathanks @malabarba#2016-02-1113:34benedekHappy to hear that. Enjoy and let us know if you hit any hurdles#2016-02-1113:59vermawill do! simple_smile#2016-02-1318:07daveliepmannAnybody know how to unset shift-option (aka alt, on a Mac) <left> in markdown-mode? I've been trying (eval-after-load 'markdown-mode (local-unset-key (kbd "M-S <left>"))) and (eval-after-load 'markdown-mode (define-key markdown-mode-map (kbd "M-S <left>") nil)) to no effect. 😕#2016-02-1318:11daveliepmannI mean, it's a Saturday night, isn't everyone reconfiguring their Emacs?#2016-02-1323:07malabarbaYou need to quote the form that goes in eval after load. #2016-02-1323:07malabarbaThat might be it. #2016-02-1323:09malabarbaAnd I think the key has to be M-S-<left > (note the extra hyphen) #2016-02-1403:36jethroksyAnyone got fira code working on emacs?#2016-02-1403:36jethroksyI've put in the "workaround" and added the default extra-font-locking for clojure#2016-02-1403:37jethroksyMy thread first and last macros still look like distinct characters#2016-02-1403:37jethroksyfn is being replaced by lambda though#2016-02-1409:03benedekI do#2016-02-1409:03benedekLambda is done by prettify symbols not firacode tho#2016-02-1409:04benedekI use it on OSX so I use the osx build for 24.5 where u don't need the workaround#2016-02-1409:04jethroksy@benedek: do your thread macros get replaced by the ligatures#2016-02-1409:05benedekThey deffo do :)#2016-02-1409:05jethroksyhmm...#2016-02-1409:05jethroksyI'm on GNU, wonder what's the difference#2016-02-1409:06benedekThere is a patch in the osx build for ligatures#2016-02-1409:06benedekNot sure if it is added elsewhere#2016-02-1409:07jethroksyah lemme go find it#2016-02-1409:13jethroksyhmm i don't think it works on gnu emacs#2016-02-1409:14jethroksyI tried using prettify-symbols to replace the symbols for the threading macros#2016-02-1409:22benedekThese are diff things: ligatures and prettify symbols#2016-02-1409:24jethroksyyeah I understand#2016-02-1409:24jethroksynvm the font looks good enough with or without ligatures#2016-02-1409:25jethroksystill getting used to the @ sign though...#2016-02-1409:48benedekHaha#2016-02-1409:49benedekLigatures are really nice. Prettify symbols can cause problems if with is not the same as the original char sequence#2016-02-1409:49benedek@malabarba has nice blog posts about it btw#2016-02-1409:49benedekWorth a read#2016-02-1410:06malabarbaYeah, I've joined my threading macros using prettify symbols. #2016-02-1410:06malabarbaJust Google endless parentheses prettify symbols #2016-02-1410:09benedekFira code does that too tho out of the box#2016-02-1410:38daveliepmannIf it helps anybody (though with the limited archiving here that's dubious), what solved my above query was (eval-after-load "markdown-mode" '(define-key markdown-mode-map (kbd "M-S-<left>") 'nil))#2016-02-1410:39daveliepmannThanks @malabarba for the hint about the extra hyphen simple_smile You saved me some time there.#2016-02-1411:22jethroksyThanks @malabarba I'll try to get it working#2016-02-1413:17jethroksyGot prettify-symbols to prettify the arrows ^^#2016-02-1413:23anmonteiroI'm adding a hook to markdown-mode that sets truncate-lines to nil so that I get line wrapping when editing markdown docs. However, I don't want this when I'm e..g editing clojure code.#2016-02-1413:24anmonteiroMy problem is that if I open a buffer in a frame that has had a markdown buffer, the setting will remain there...#2016-02-1413:24anmonteirois there a nice way to achieve line wrapping only for e.g. markdown-mode without having to set it back in a hook for e.g. clojure-mode?#2016-02-1413:38jethroksyI don't get the same behaviour as you#2016-02-1413:38jethroksy
(use-package markdown-mode
  :mode ("\\.md\\'" . markdown-mode)
  :init (progn
          (add-hook 'markdown-mode-hook
                    (lambda () (setq truncate-lines nil)))))
#2016-02-1413:39jethroksywhen i switch to a markdown file in the frame it line wraps#2016-02-1413:39jethroksywhen i switch to my elisp file it doesn't anymore#2016-02-1413:39jethroksyhmm#2016-02-1413:40jethroksyI have (setq-default truncate-lines t)#2016-02-1413:48anmonteiroso that might be my problem simple_smile#2016-02-1413:49anmonteiroI have (setq-default truncate-lines nil) in my hook#2016-02-1413:49anmonteiroI'm still getting the hang of this#2016-02-1413:50anmonteiroso using setq inside of the markdown-hook and setq-default outside should work?#2016-02-1413:51anmonteiroit did work, I have my answer now, thanks!#2016-02-1414:52jethroksysorry i was away!#2016-02-1414:52jethroksyyup that should be it simple_smile#2016-02-1414:53jethroksyalthough emacs wiki suggested against having setq-default outside anywhere#2016-02-1521:25nhaAnyone getting this error when using clj-refactor ? Symbol's value as variable is void: cljr-inject-dependencies-at-jack-in ?#2016-02-1521:31benedekyup https://github.com/clojure-emacs/clj-refactor.el/issues/295 should be fixed now. pls try to reinstall and comment the issue if still fails#2016-02-1522:52nhaThanks simple_smile#2016-02-1522:58nha(well still have the problem, but I'll update tomorrow - good night )#2016-02-1609:24benedek@nha: fixed in clj-refactor-20160215.1606. sry for the breakage#2016-02-1609:37nhaNo problem, thanks for fixing it !#2016-02-1609:49benedekno worries simple_smile#2016-02-1711:14michalhey guys. maybe you’ll find it useful - searching for help in clojuredocs with helm https://github.com/mbuczko/helm-clojuredocs#2016-02-1711:14michali hope to add it to melpa within few days#2016-02-1712:36jan.zynice! ping us when it’s on melpa simple_smile#2016-02-1818:21michal@jan.zy: it’s already on. enjoy simple_smile#2016-02-1818:21jan.zy😍 #2016-02-1823:09nha@michal: I am ! https://infinit.io/_/XLae7Cm#2016-02-1901:47vermaI just recently started using emacs, I've been hearing a lot about helm all over the place, are there any resources out there the folks here prefer that I can read up to learn why helm would be useful?#2016-02-1902:38jethroksy@verma: this seems to be the canonical tutorial https://tuhdo.github.io/helm-intro.html#2016-02-1902:38jethroksybut imo it's a bit overwhelming#2016-02-1902:40jethroksyIt's good that you're just starting out, because helm behaves differently from ido etc.#2016-02-1902:41jethroksyfor now you should probably copy some minimal config, and just get used to helm-mini, helm-recentf and helm-find-files, these are the 3 I use the most#2016-02-1904:05vermaThanks @jethroksy I'll give it a shot!#2016-02-1915:32lowl4tencyelpa is down 😞#2016-02-1915:32lowl4tencySomeone knows ETA it's working?#2016-02-2117:57jasonjcknis there a way for emacs eval of clojurescript to actually show me exceptions in a buffer, like how it does with clojure when I write bad code, and do C-x C-e, the error shows up in the repl buffer as oppose to creating a new emacs buffer popup#2016-02-2120:46joelkuiperDoes anyone know of a comprehensive set of "pretty symbols" font-lock for Clojure in Emacs (like λ)? simple_smile#2016-02-2121:27joelkuiperCurrently use the ones by Jay Fields https://github.com/jaycfields/unplugged-pack/blob/master/init.el#L94-L130#2016-02-2121:30benedekI used to really love these but there is a serious problem with them: they mess up indentation#2016-02-2121:30joelkuiperyeah it’s true#2016-02-2121:30benedeknowadays i happily use firacode font instead#2016-02-2121:30joelkuiperbut my indentation is already a mess 😛#2016-02-2121:31joelkuiperI use Pragmata Pro, but unfortunately no ligatures in Emacs 😞#2016-02-2121:31benedekwhich is not that feature rich but does really nice things: like proper arrows for threading macros#2016-02-2121:31joelkuiperhow do you get that to work without ligatures though?#2016-02-2121:31benedeki use the 24.5 osx built which has ligatures simple_smile#2016-02-2121:31joelkuiperooh#2016-02-2121:31joelkuiperI should try that!#2016-02-2121:31benedekdo, ligatures are really nice#2016-02-2121:31joelkuiperwhere can I find it simple_smile ?#2016-02-2121:32joelkuiperI think I currently use the railway cat (?)#2016-02-2121:32benedekand i really recommend @malabarba’s articles about prettify symbol on http://endlessparentheses.com/#2016-02-2121:32benedekif you want to add some to some ligatures 😉#2016-02-2121:32benedekuh let me think, i might have brew installed it?!#2016-02-2121:33joelkuiper-> works fine in TextEdit.app as a ligature#2016-02-2121:33joelkuipernot in Emacs 😞#2016-02-2121:36joelkuiperI’m on 24.5.1, Carbon version#2016-02-2121:36benedekyup, you were right all along that should be the railway cat#2016-02-2121:36joelkuiperweird, I’ll check the docs#2016-02-2121:36benedekso I use:
If you're using the latest railwaycat Mac port of Emacs, you can instead use:

(mac-auto-operator-composition-mode)
#2016-02-2121:37benedekand i just followed this: https://github.com/railwaycat/homebrew-emacsmacport#homebrew#2016-02-2121:37joelkuiperah yes (mac-auto-operator-composition-mode) did it#2016-02-2121:37joelkuiperamazing, thanks so much simple_smile#2016-02-2121:38joelkuiperfinally get to use some of the Pragmata Pro features#2016-02-2121:38joelkuiperwhich is an amazing font without ligatures too 😉#2016-02-2121:38benedekno worries! happy to spread the ligatures love 😄#2016-02-2121:40joelkuiperI’ll still use some font lock keywords#2016-02-2121:41joelkuiperjust not the fn, defn ones#2016-02-2121:41joelkuiperwhich mess up indent badly (especially since I use agressive-indent)#2016-02-2121:41benedekin @malabarba articles you can find some workarounds#2016-02-2121:41joelkuiperthanks, I’ll take a look simple_smile#2016-02-2121:42joelkuiperwouldn’t want my colleagues to become /too/ upset with my indentation#2016-02-2121:42joelkuiperwhich is a general problem with Lisps I’ll admit#2016-02-2121:42joelkuipernot a big problem, but still#2016-02-2121:44benedekhaha used to shock my colleagues with pretty symbols… but then it also messes with how clj-refactor finds symbols and other stuff to work on. so that finished my prettify symbols adventures apart from a few small ones with workarounds recommended by @malabarba#2016-02-2121:45joelkuiperclj-refactor doesn’t work in most of our projects due to the namespace redefs#2016-02-2121:45joelkuiperwhich messes up system somehow#2016-02-2121:45joelkuiperhaven’t been bothered to investigate further 😛#2016-02-2121:45benedekwow. would be interesting to see some sample code#2016-02-2121:46benedekif you can file an issue on github#2016-02-2121:46benedekwhy do you need to do that tho? (just out of curiosity)#2016-02-2121:47joelkuipergood question, I think a colleague of mine (@wagjo) knows more details#2016-02-2121:47joelkuiperthere should be some details on this somewhere, let me look#2016-02-2121:47joelkuiperhttps://github.com/clojure-emacs/refactor-nrepl/issues/126#2016-02-2121:48benedekthat is fixed and dusted for long time tho#2016-02-2121:48joelkuiperah okay, it’s been a while since we started this project#2016-02-2121:48joelkuiper(July last year or something)#2016-02-2121:48benedekso if only this, it should not hurt you anymore#2016-02-2121:49joelkuipernice, I’ll check it out again. Although I’ve never been good at putting these things is muscle memory#2016-02-2121:49benedekwe have hydras 😉#2016-02-2121:49joelkuiperstill not used to magit, most of the time I still use gitx (which was incidentally developed by a co-student of mine back in the day :p)#2016-02-2121:50benedekhaha, i used to hate any git client but I am a magit convert now#2016-02-2121:50benedeklatest version basically teaches you git in a very nice way#2016-02-2121:51joelkuiperit doesn’t play well with Evil though, and I’m still no spacemacs convert (you can pry my 5 years of custom init.el from my cold dead hands :p)#2016-02-2121:51joelkuiperthey might have fixed that too though#2016-02-2121:51joelkuiperI’m slow on the uptake sometimes 😛#2016-02-2121:51benedekdifficult to move away from old habits i guess#2016-02-2121:52joelkuiperyeah, it’s weird how easy you commit things to muscle/procedural memory#2016-02-2121:52joelkuipereven though better things exists, you get somehow stuck with your own peculiar workflow#2016-02-2121:52joelkuipereh whatever gets the job done well simple_smile#2016-02-2121:53benedekthat’s true. although i always find myself digging into emacs guts at some point 😉#2016-02-2121:53benedeknothing like an editor you can program on the fly#2016-02-2121:54joelkuiperhah that’s true! Clojure was actually the reason I converted from Vim to Emacs, and then got even more interested in Lisps#2016-02-2121:55benedekinterestingly i learned doing java in emacs looong time ago. there was even functional JDEE that time which got revived lately#2016-02-2121:56benedeknot as if i wanted to go back to java really...#2016-02-2121:57joelkuiperBack in my Java days I was still a solid Vim user, tried various plugins for Eclipse … but it never really worked well; so I basically ended up using Eclipse#2016-02-2121:57joelkuiperthe Clj experience is much better 😛#2016-02-2121:57benedekyeah same here (with bad eclipse experience and much better clj too 😉 )#2016-02-2121:57joelkuiperwow that sounds like I’m really old, I’m not though … but 5 years ago can seem like a long time#2016-02-2121:59benedek😄 not saying when my “learning java in emacs” was#2016-02-2122:01malabarbaI tried using firacode on Linux, but didn't see any ligatures 😞#2016-02-2122:02benedekIf I remember right this fix was only done in this osx port?!#2016-02-2122:02benedekwhich enables ligatures#2016-02-2122:03malabarbayeah, I think you're right#2016-02-2122:04benedekwould be nice to see it in 25...#2016-02-2122:05joelkuiperit probably completely swaps out the rendering panel for the OSX native one, if I remember there has been some work to get this in general Emacs#2016-02-2122:05joelkuiperbut nothing in main yet#2016-02-2122:05benedekperhaps that would open up the way of composing pretty symbols an other way — but i am way out of my league here...#2016-02-2122:06joelkuiperyeah same, it’s probably part of the C/C++ core stuff#2016-02-2122:06joelkuiperwhich I have no idea how to approach#2016-02-2122:06benedekit is i think#2016-02-2122:12malabarbaYes, the display engine is deep C#2016-02-2122:12malabarbaHey, I just made a pun by accident simple_smile#2016-02-2122:14benedek noted ;P#2016-02-2216:43nhaI just found about cider C-c C-d C-f to search through clojure docstrings. Amazing ! Even more amazing is that you can then jump to the source insure Clojure. Is that only for Clojure, or is it something I can use as well in my projects (if so how ? ). Note: I'm using prelude#2016-02-2217:01benedekjump to source should work for ur project and ur dependencies as well. For clj at least. I guess for java deps I need source jars too#2016-02-2217:10nha@benedek: That's great news ! but what is the command ?#2016-02-2217:16benedekM-. and M-, jumps back#2016-02-2217:18nhaAh perfect ! Thanks a ton !#2016-02-2217:25benedekNo worries#2016-02-2217:28hugodIf I have a macro in a .cljc that I refer into a .cljs file (using :refer-macros). When placing point on the macro invocation symbol, I get an exception trace from cljs-tooling in the REPL (and the REPL buffer grabs focus), saying the macro’s namespace is not found. This only seems to happen when the macro expands to another macro invocation. Has anyone else noticed this?#2016-02-2217:30hugodThe excepetion is at info.clj: 87#2016-02-2306:35lowl4tencyDo someone use json-mode?#2016-02-2306:38lowl4tencyInteresting thing if I add
(defconst js-indent-level 2)
all is working fine, but if I change
(let ((json-reformat:indent-width js-indent-level))
on
(let (( js-indent-level json-reformat:indent-width))
C-x C-f is working but when I typing my json and hit enter it's set up 4 spaces on fly. After C-x C-f all is good again. If I change nothing and change only json-reformat (as it used in docs) I've still got 4 spaces for indent
#2016-02-2306:39lowl4tencySo, my first line looks like ugly hack )#2016-02-2306:46lowl4tencyI don't understand which function is responsible fot indents on fly#2016-02-2307:53lowl4tencybozhidar: perhaps you know simple_smile#2016-02-2408:55nhaWhen searching files with projectile, I get some results several times. https://infinit.io/_/uHRFe6P Has anyone the same problem as me ?#2016-02-2409:39bozhidarnot me simple_smile#2016-02-2409:40bozhidar@lowl4tency: you shouldn’t use defconst to change variables#2016-02-2409:40lowl4tencybozhidar: hm, it's working better than default simple_smile#2016-02-2409:40bozhidaras for the let examples#2016-02-2409:41bozhidarI meant you should use setq#2016-02-2409:41bozhidardefconst is for constant definition...#2016-02-2409:41bozhidaranyways, not idea what you want to do with the let bindings#2016-02-2409:41bozhidarI’m assuming you want to change the indentation level just in some particular scope#2016-02-2409:41bozhidarin which case the second let should work#2016-02-2409:42bozhidardynamically tweaking indentation doesn’t seem reasonable to me, but as I said - I have no idea what you’re trying to do#2016-02-2409:43lowl4tencyOkay, let me describe, I'd like to change indentation level from default 4 to 2 spaces. In docs author suggests to change it via json-reformat, but when I change it, it doesn't work at all.#2016-02-2409:44lowl4tency
json-reformat:indent-width (integer)

    Change indentation level (default 4)
#2016-02-2409:50lowl4tencyif I set up next:
(defcustom json-reformat:indent-width 2
  "How much indentation `json-reformat-region' should do at each level."
  :type 'integer
  :safe #'integerp
  :group 'json-reformat)
I stil get 4 spaces of indent
#2016-02-2409:51lowl4tencyIf I set defconst it's working simple_smile#2016-02-2409:56bozhidaryou should do (setq json-reformat:indent-width 2)#2016-02-2409:56bozhidarthat’s the proper way to modify a defcustom#2016-02-2410:10lowl4tencybozhidar: thanks!#2016-02-2410:11lowl4tencyActually, I've started read elisp reference, and now it's more clear for me simple_smile#2016-02-2410:11lowl4tencybozhidar: one more stupid q, when is appropriated to use defconst?#2016-02-2410:14lowl4tency
;;;###autoload
(setq js-indent-level 2)
(defun json-mode-beautify ()
  "Beautify / pretty-print the active region (or the entire buffer if no active region)."
  (interactive)
  (let ((json-reformat:indent-width js-indent-level ))
    (if (use-region-p)
        (json-reformat-region (region-beginning) (region-end))
      (json-reformat-region (buffer-end -1) (buffer-end 1)))))

(define-key json-mode-map (kbd "C-c C-f") 'json-mode-beautify)
#2016-02-2410:14lowl4tencyWorks!#2016-02-2410:17bozhidar@lowl4tency: when you have to define a constant, of course simple_smile#2016-02-2410:17lowl4tency😄#2016-02-2410:17lowl4tencyjs-indent-level is not const? simple_smile#2016-02-2410:18bozhidarmost likely it’s a defcustom#2016-02-2410:18bozhidara variable customizable via the customize UI#2016-02-2410:18lowl4tencyah, okay simple_smile#2016-02-2410:18bozhidarsee https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Variables.html#2016-02-2410:18lowl4tencybozhidar: thanks a lot, I guess I must read specs of elisp before asking )#2016-02-2410:19bozhidarnever a bad idea simple_smile#2016-02-2410:19lowl4tency😄#2016-02-2410:20lowl4tencyI love emacs, it inspires me#2016-02-2411:49bozhidarwe all do - it’s the single greatest piece of software ever created simple_smile#2016-02-2411:58lowl4tencytotally agreed!#2016-02-2509:42nhaHow does cider-find-var works with Java code ? In the following screenshot I don't get how it can see Java.util.concurrent.LinkedBlockedQueue and not Java.util.ArrayList : https://infinit.io/_/3cTZvJa#2016-02-2509:43nha(not really important, I was just curious to dive a bit into the Clojure code)#2016-02-2512:43bozhidarnot sure what’s imported in your ns#2016-02-2512:43bozhidarand I also have no idea what are using to display the candidates#2016-02-2512:44bozhidarin general cider-find-var is not written with frameworks like ido and helm in mind - you’re supposed to use TAB-completion there#2016-02-2512:44bozhidaralthough we might change this eventually#2016-02-2512:45bozhidarsee the discussion here - https://github.com/clojure-emacs/cider/issues/1059#2016-02-2613:19crankyadminHi
(defun service-application-query ()
  (let ((url-request-method "GET"))
    (url-retrieve service-application-manager-url
                  (lambda (status)
                    (re-search-forward "\r?\n\r?\n")
                    (json->table-entries (buffer-string))))))
I know I don’t want to be passing the buffer-string as it still contains the headers. How do I go about passing the output of re-search-forward into json->table-entries?
#2016-02-2613:45crankyadminI worked it out (json->table-entries (buffer-substring (point) (point-max))) Thanks all the same simple_smile#2016-02-2700:52fentonanyone suggest a parenthesis highlighter for emacs/cider#2016-02-2705:08jethroksy@fenton not sure what you mean, but I use show-paren-mode it comes with emacs.#2016-02-2705:08jethroksyOther than that using rainbow-delimiters really helps with distinguishing your parentheses pairs#2016-02-2705:08jethroksyI use both in conjunction#2016-02-2706:45fenton@jethroksy OK just checking in to see what others are doing. Thanks!!#2016-02-2706:46jethroksyfeel free to ask around!#2016-02-2706:46jethroksywe have some of the brightest emacs users here 😉#2016-02-2712:44malabarbaI used rainbow delimiters for a while #2016-02-2712:44malabarbaThough recently I've disabled everything of the sort #2016-02-2712:44malabarbaEven show paren #2016-02-2716:40bozhidarI’m using both rainbow-delimiters and show-paren-mode#2016-02-2716:40bozhidarseems to me I’ve been using them forever#2016-02-2803:35fentonthanks! i settled on 'highlight-parenthesis' package, with some custom colors. I like that it only highlights my current sexp and dynamically changes depending on which sibling sexp I'm in. I found show-parens-mode redundant with this. I also tried the show-parens-mode 'expression' which was okay, but it killed the syntax highlighting, which i didn't like.#2016-02-2803:36fentondo other people use lispy for structural editing?#2016-02-2803:37fenton@jethroksy: yeah, i figured that here would have some of the best emacsen being already clojure fans! simple_smile#2016-02-2803:39fentoni really don't like other-window function C-x o. So i wanted to use ace-window, but i can't override A-p in the cider REPL buffer...hmmm#2016-02-2803:40fenton(define-key cider-repl-mode-map (kbd "A-p") 'ace-window) doesn't work 😞#2016-02-2803:43fentonooops rookie mistake...duh M-p works! yay!#2016-02-2911:41noogaI’m having trouble with entering Polish (ąśżźćńęłó) characters in emacs. We basically have US keyboard layout and use right meta with modified letter, like alt+a, alt+s etc. Is there some kind of locale setting that would enable this automatically or do I need to somehow globally override right meta + letters?#2016-02-2913:29jan.zytry this if you are using mac: https://github.com/whysoserious/my-emacs-config/blob/master/init.el#L390-L391#2016-02-2913:30jan.zyhm, I’ll just paste it here:
(when (eq system-type 'darwin)
  (setq mac-right-option-modifier 'none))
#2016-02-2915:55noogathx @jan.zy, it works#2016-02-2915:55jan.zynp#2016-03-0205:20achesnaisHi there simple_smile Has anyone ever had trouble with clj-refactor consuming a decent amount of CPU as soon as you connect to a repl via Cider? I really can't explain what's happening here#2016-03-0205:20achesnaisand it doesn't stop, which is my problem#2016-03-0205:31achesnaisit looks like this happens with the new 2.2.0-SNAPSHOT version 😕#2016-03-0206:44benedekSee my answer in #C0617A8PQ @achesnais #2016-03-0206:45benedekIf it does nor stop a github issue would be nice and as much details about ur proj/environment as possible#2016-03-0207:09achesnais@benedek: thanks – I'm at work now so using my old config, but I'll get back to this this evening and will try and pin down the problem simple_smile#2016-03-0222:47vermaI can’t seem to get suggestions working with company + cider, are suggestions only available when cider is jacked in? also I was in Clojurescript, I saw it work really well one time, but haven’t been able to get it to work consistently#2016-03-0223:44malabarbaYes. Only when jacked-in or connected. #2016-03-0223:59vermathanks @malabarba I will git it a shot!#2016-03-0307:37bozhidarCIDER 0.11 (Bulgaria) is out! Details here - https://github.com/clojure-emacs/cider/releases/tag/v0.11.0#2016-03-0307:37bozhidarEnjoy!#2016-03-0309:15lowl4tencyAwesome#2016-03-0314:39christianromneylooking for some advice on how to accomplish something. i use direnv to set env vars in my shell when I cd into my project dir. one of these tells the app which logical environment it’s in (e.g. development v. test). when I launch cider, it inherits the environment from emacs. if i launch emacs as a gui app using a launcher of course those envvars are not set. if I launch it from within that terminal session of course everything works. using emacs + prelude + projectile. I’d like to have some elisp to read the .envrc file and call setenv appropriately so I don’t need to launch emacs from the terminal. anyone have a recommended approach? current thinking is that I should attempt to see if projectile has a hook when it opens a project file I could tap into, but this could be completely off base...#2016-03-0321:17christianromneyhttps://gist.github.com/55a355105f19da0641f9#2016-03-0321:18christianromneyperhaps not the most idiomatic… now just need to have this run when I switch to a new project#2016-03-0322:04jarredlhumphreyis there a way to get project specific cider history? I use cider/emacs across a few clj projects and all of the history is conflated into a single file. Is there a good way to separate these so that I only go through the history for that given project in the repl rather than ALL history?#2016-03-0323:44richiardiandreain Paredit, if I am in a sexp that I want to delete, is there a way kill it from any point? (now I go to top and forward delete the sexp)#2016-03-0400:04richiardiandreaok it was actually easy:
(defun paredit-kill-parent-sexp (&optional arg)
  (interactive)
  (paredit-backward-up)
  (kill-sexp (or arg 1)))
good enough for now
#2016-03-0400:45malabarba@christianromney your code looks good. Just use expand-file-name instead of concat. 👍 #2016-03-0400:46malabarba@jarredlhumphrey you could change the history file for each project. Look into emacs dir-local variables. #2016-03-0400:46malabarba@richiardiandrea 👍 simple_smile #2016-03-0401:20jarredlhumphrey@malabarba: awesome thanks man#2016-03-0413:11christianromney@malabarba: thanks for the tip! I’ll be looking to improve this iteratively and to include unloading#2016-03-0416:05base698When you do "locals" in cider and it shows it a list of the vars, how do you copy one? I am trying to make a test case with input into a function.#2016-03-0416:24base698inspect and pprint works!#2016-03-0416:26base698then you can eval in your test case and profit... so many cool ways to build failing tests.#2016-03-1016:57peejaWhat's the canonical way in Emacs Lisp to replace some region of a buffer with a different string? That is, I've placed markers at the start and end of the text I want to replace, and I want to delete that text and replace it with something I have in a variable.#2016-03-1016:58peejaI'm not sure how to do it without setting point and mark, which doesn't feel like I'm doing the right thing#2016-03-1016:59peejaActually, I can delete-region an arbitrary region, but I can't figure out how to insert at a position that isn't point#2016-03-1017:02peejaIs save-excursion and goto-char the right thing to do?#2016-03-1020:29christianromneynot sure if it’s right, but looking at replace-string might help#2016-03-1020:29christianromneywhen i invoke from a command on a region it does what you describe#2016-03-1020:29christianromneyoh nm you want to replace a region with a string#2016-03-1020:29christianromneynot one string with another in a region#2016-03-1020:29christianromneysorry simple_smile#2016-03-1104:50malabarba@peeja Yes, that's the way. 👍 😉 #2016-03-1121:42richiardiandreaI remember there was a CTRL-R bash like for cider history planned, did it land into it eventually?#2016-03-1206:31bozhidarnope#2016-03-1206:31bozhidarwe've done no improvements to the REPL history in ages#2016-03-1206:32bozhidarwe plan to rewrite the repl completely using comint#2016-03-1206:32bozhidarso investing in the current repl makes no sense
#2016-03-1206:32bozhidarbut we've also been pretty short on time and the comint effort has been stuck in a while#2016-03-1301:01richiardiandreathanks for the answer, looking forward to that!#2016-03-1309:30hlolliJust of creative curiousity. Is there any way to interop emacs and clojure. Say I would want to make a clojure go loop that will make my emacs font color blink, would it be possible?#2016-03-1312:13malabarba@hlolli only if you write a lot of elisp to put that together. #2016-03-1316:14hlolliAny good book on elisp?#2016-03-1316:37jethroksynot that I know of#2016-03-1316:37jethroksyMastering Emacs is the best book emacs has ever seen imo#2016-03-1320:19nullptrthere's a good elisp guide built into emacs -- check in M-x info#2016-03-1321:03hlollithanks, I think I will check out this book. M-x info I have ignored bit much in favor of emacs wiki and stackoverflow. I think I have coffee, play some Bach and go trough M-x info simple_smile (probably takes more than one night I guess).#2016-03-1322:14bozhidar@hlolli: http://emacsredux.com/blog/2015/05/16/learning-emacs-lisp/#2016-03-1322:15bozhidaras for the other question - there's clomacs https://github.com/clojure-emacs/clomacs#2016-03-1322:15bozhidarI never actually used it#2016-03-1322:16bozhidarbut the idea is to wrap clojure code in elisp functions#2016-03-1322:16bozhidarthe idea has some potential#2016-03-1322:16bozhidarbut this project definitely needs a lot of polish#2016-03-1322:23hlollithis project seems to strive for the other direction, get clojure callbacks into emacs. But I may need to look deeper into this. I've already seen communication into emacs via udp connection, but that seems bit big of hammer for just a simple api that I was curious to know if such api existed. Thanks for the link.#2016-03-1407:10bozhidarguess you're right#2016-03-1407:10bozhidarif I recall slime had some functionality named "eval-in-emacs" which was something like this#2016-03-1407:10bozhidarbut I frankly don't remember what exactly was this doing#2016-03-1407:10bozhidarI just recall someone had requested a long time ago for cider as well#2016-03-1417:16peejaDoes anyone know how to get some-> to font-lock like ->?#2016-03-1417:16peejaI know how to do the indentation, but not the font locking#2016-03-1417:17jethroksy@peeja: currently there's no ligature support unless you're using a different port of emacs#2016-03-1417:17jethroksythere's a way to emulate that though#2016-03-1417:17peejaNot ligatures, I just want it to be the same color simple_smile#2016-03-1417:17jethroksyhttp://endlessparentheses.com/using-prettify-symbols-in-clojure-and-elisp-without-breaking-indentation.html#2016-03-1417:18jethroksyoh#2016-03-1417:18peejaLooks like it might not be easy; that list of symbols appears to be hard-coded#2016-03-1417:18peejahttps://github.com/clojure-emacs/clojure-mode/blob/755c6c5b133884eb9a3a4baedff769bbe51c08d0/clojure-mode.el#L566#2016-03-1417:19jethroksyI think moving forward the best way is to send a PR simple_smile#2016-03-1417:19peejaFair enough simple_smile#2016-03-1718:05base698Can anyone get org-babel to work with clojure? It's not executing#2016-03-1718:05base698cannot find slime#2016-03-1718:06base698have this in my init.el#2016-03-1718:06base698
;; 
(org-babel-do-load-languages
    'org-babel-load-languages '((js . t) (python . t) (R . t)))
(require 'cider)
(require 'ob-clojure)
(setq org-babel-clojure-backend 'cider)

#2016-03-2001:31aibaWhen I create a new clojure file in emacs, it automatically puts a (ns foo.bar.baz) line at the top of the file. Cool. Unfortunately, the namespace path is wrong because my lein profile specifies custom :source-paths. Anyone know any emacs settings related to this? I'm not even sure if it's clojure-mode or cider or refactor-nrepl that is doing it.#2016-03-2004:52malabarbaClj-refactor is adding the form. But I think it uses some function in clojure-mode to decide the namespace. #2016-03-2005:28aiba@malabarba: Thanks, that’s very helpful! sure enough, (clojure-expected-ns) of clojure-mode.el returns the wrong ns. Now to see what that function is doing...#2016-03-2005:34aibaOK, looks like clojure-expected-ns splits the path relative to project.clj or build.boot, then drops the first directory (usually “src”), then drops the next dir if it matches #"clj[scx]?”. So if your project’s :source-paths have “src“ or “src/clj” it works, but if it’s “src/client” or “src/server” then you get an extra “client.” or “server.” prefix to the generated namespaces.#2016-03-2005:35aibaNot sure what could be done about this without knowing about the runtime classpath or build tool config#2016-03-2007:24benedekBoth cider-nrepl and refactor-nrepl know about the classpath. Perhaps an opportunity for a PR? ;) #2016-03-2007:25benedekYou can also opt out of this behaviour if I remember right..#2016-03-2007:27benedekcljr-add-ns-to-blank-clj-files is the defcustom#2016-03-2007:37aiba@benedek I like the behavior, just want the correct ns to be added simple_smile. I posted an issue with an idea for a kludgy fix on clojure-mode https://github.com/clojure-emacs/clojure-mode/issues/372#2016-03-2007:38aibaIt would be awesome if there was a way to use cljr’s or cider’s knowledge of classpath to do it better#2016-03-2008:12benedekI agree. Check out cider-nrepl or refactor-nrepl. These would be right places. You can also find examples there which work with the classpath#2016-03-2008:38aibacool, i hacked together a function that returns the expected ns using cider classpath (please excuse the elisp, not as familiar with elisp as clojure):#2016-03-2008:38aiba
(defun clojure-expected-ns-from-classpath ()
  (let* ((file-path (buffer-file-name))
         (relpath (reduce (lambda (r p)
                            (let ((relpath (when (string/starts-with file-path p)
                                             (substring file-path (length p)))))
                              (cond ((not relpath) r)
                                    ((not r) relpath)
                                    ((< (length relpath) (length r)) relpath)
                                    (t r))))
                          (cider-sync-request:classpath)
                          :initial-value nil)))
    (when relpath
      (let* ((sans-type (substring
                         relpath 0 (- (length (file-name-extension relpath
                                                                        t)))))
             (ns (mapconcat 'identity (cdr (split-string sans-type "/")) "."))
             (ns (replace-regexp-in-string "_" "-" ns)))
        ns))))
#2016-03-2008:39aibai’m not sure if this should belong in clojure-mode, cider, or cljr#2016-03-2008:40benedekClojure mode does not have a nrepl middleware component afaik. I would say cider but @bozhidar @malabarba may think otherwise#2016-03-2008:41benedekre elisp: don't worry if you create a PR it will be reviewed in a nice way#2016-03-2008:41benedekBtw nice work! :)#2016-03-2008:56aibaThanks! It’s fun learning some elisp, and also making me grateful I spend most of my time writing in clojure simple_smile#2016-03-2008:57aibaPutting a function like this in cider makes sense. Then cljr could call cider-expected-ns rather than clojure-expected-ns.#2016-03-2009:04benedekI guess if it is in cider, cider can take over this feature from cljr#2016-03-2009:05benedekAgain @bozhidar opinion will probably decide here :)#2016-03-2009:09aibaYeah, might be nice to retire the feature from clojure-mode in favor of cider.#2016-03-2009:11aibacljr could call cider’s insert-expected-ns rather than clojure-mode’s. (cider would know better what ns to insert)#2016-03-2009:14bozhidarmaybe#2016-03-2009:15bozhidarobviously clojure-mode has 0 knowledge about the classpath#2016-03-2009:15bozhidarso doing a bit of guesswork#2016-03-2009:15bozhidarwas the best we could do#2016-03-2009:17aibaOh yeah makes total sense. i wonder how often clojure-expected-ns is used when there is not a cider connection present. Personally my only use case is cljr-add-ns-to-blank-clj-files.#2016-03-2009:35benedekSo @bozhidar would a classpath based feature make sense in cider?#2016-03-2009:35benedekOr you rather have such a feature in cljr?#2016-03-2010:50bozhidaryeah, it makes sense in cider#2016-03-2010:52bozhidaras I mentioned on the ticket my only reservation is that such a feature might be useful for users of inf-clojure as well#2016-03-2010:53bozhidarbut I guess this is not a big concern#2016-03-2010:53bozhidarI've a few times that I wouldn't mind moving simple useful features from cljr to clojure-mode and cider#2016-03-2010:53bozhidarand this might be an opportunity to start doing so#2016-03-2011:01aibaAwesome, I can submit a PR to cider. My only question is whether I get to use ->>, -map, and -filter. They help express this function and cljr uses them, but cider currently does not. Are these built into elisp or some dependency? (I assume we don’t want to add new dependencies to cider just for this)#2016-03-2011:02bozhidarcider uses similar functions#2016-03-2011:02bozhidarbut the names are different#2016-03-2011:02bozhidar->> is thread-last#2016-03-2011:03bozhidar-map is mapcar or seq-map#2016-03-2011:03bozhidar-filter -> seq-filter#2016-03-2011:03aibaawesome, thanks!#2016-03-2011:04bozhidarinstead of reduce you should use seq-reduce#2016-03-2011:04bozhidarbasically seq.el is modern Elisp library#2016-03-2011:04bozhidarthat replaces both cl.el and dash.el#2016-03-2011:04bozhidarand we rely on it#2016-03-2011:04bozhidarmost likely cljr will drop dash.el at some point as well#2016-03-2012:22bozhidar@benedek: https://github.com/clojure-emacs/cider/pull/1622#2016-03-2012:22bozhidarsimple_smile#2016-03-2012:22bozhidarwhen this is done you can move the relevant functionality to cider#2016-03-2013:20benedekSounds good#2016-03-2117:54aaelonyI'm on an older computer mac osx 10.7.5 with emacs 24.5 (9.0) and cider-jack-in gives me "The lein executable (specified by cider-lein-command or cider-boot-command) isn't on your exec-path. I'm using lein version 2.6.1 Any guidance how to get a repl back appreciated#2016-03-2119:01dorab@aaelony: Not sure what your configs (emacs, cider) are, but assuming that the lein command works from the command line but not in an emacs shell window, then try adding the exec-path-from-shell package to your emacs config. Alternatively, set the cider-lein-command to the full path name of the lein command. Also try asking in the #C0617A8PQ channel.#2016-03-2119:29aaelonyyeah, lein works fine at the cli but not in emacs (on this older laptop). I'll give that a shot.#2016-03-2119:38base698i have something in my init.el about setting paths. I feel like I had that issue in a former life#2016-03-2119:58dorab@aaelony: after installing exec-path-from-shell, run (exec-path-from-shell-initialize) in your init.el#2016-03-2123:09aaelonythanks, dorab. I need to set time aside to research and fix this, it appears there are multiple issues... cider is installed but cider-lein-command is not there, tabling it to the weekend#2016-03-2206:42bozhidarit’s probably the same issue#2016-03-2206:42bozhidarEmacs has its own exec-path, which is initialized from the env PATH, but on OS X this doesn’t work properly#2016-03-2206:43bozhidaras there’s a different set of env vars for GUI and terminal apps#2016-03-2206:43bozhidarexec-path-from-shell solves this problem pretty well#2016-03-2206:43bozhidaralternatively you can just add lein’s installation dir to exec-path yourself#2016-03-2206:43bozhidarsee https://www.emacswiki.org/emacs/ExecPath#2016-03-2214:15wunschHi I have a general Emacs (not Clojure-specific) question. When you need to run some process in the background for your project (say run a web server or tail a log), how do folks generally do it? I’ve been using projectile-run-project but it seems like there ought to be alternatives to compilation mode for this kind of thing.#2016-03-2214:15wunschLike do folks just use a separate terminal or M-x shell…?#2016-03-2214:17jethroksyI run a shell script that starts everything up#2016-03-2214:20kliph@wunsch: have you tried M-x eshell?#2016-03-2214:24wunsch@kliph: Yes I have; just kind of curious if there was some idiomatic way of doing this.#2016-03-2216:17aaelonythank-you for the ExecPath info, @bozhidar, I look forward to fixing this over the weekend...#2016-03-2217:25bozhidaryou’re welcome#2016-03-2306:14pastafariHi folks, I have a basic question. I’ve bound my tab key to company-indent-or-complete-common#2016-03-2306:14pastafariThis works in most buffers#2016-03-2306:15pastafariHowever in Clojure buffers, the tab key gets bound to complete-symbol#2016-03-2306:15pastafariI’m trying to figure out why this happens, but not sure how to proceed.#2016-03-2306:17pastafariIs there a way to give priority to my keybindings over others?#2016-03-2306:23pastafariOk, I have made progress!#2016-03-2306:23pastafariClojurescript mode overrides the TAB key binding.#2016-03-2306:28pastafariSo I’ve hacked this by adding an override to clojure-mode-map, but would love to know the right way to solve this.#2016-03-2307:56bozhidarclojurescript-mode certainly doesn't touch TAB#2016-03-2307:57bozhidaras I matter of fact there's nothing related to completion in clojure-mode and modes derived from it like clojurescript-mode#2016-03-2307:57bozhidarwhich version of clojure-mode are you using?#2016-03-2310:45pastafari@bozhidar: v5.2.0, i’ve got to run now, will try to dig into this later. I reached that conclusion by C-h m which listed keybindings for Clojurescript mode.#2016-03-2311:03bozhidarmaybe this was bound somewhere in your config#2016-03-2311:03bozhidaras it’s definitely not the default#2016-03-2815:53peejaCertain commands in my setup (mostly helm commands) have become really slow. Anyone know a good way to start debugging/profiling?#2016-03-2817:30dkeeI'd like to have project-specific indenting configuration. I see that I could put something like ((nil . ((eval . (define-clojure-indent ,,,))))) in a .dir-locals.el file, but that requires me to 1) interactively okay the call to eval, 2) change my init.el to allow this specific eval form, or 3) change my init.el to allow any eval form#2016-03-2817:31dkee1) seems the least evil to me, but is there a better way? Is there a safe variable I can be customizing for indenting?#2016-03-2819:07malabarba@peeja profiler-start and later profiler-report #2016-03-2819:07peeja@malabarba: Thanks!#2016-03-2819:07malabarba@dkee in that situation I would use 1) #2016-03-2819:08malabarbaIf you reply to the question with !, Emacs won't ask you again. #2016-03-2819:08dkeebut then it modifies your init.el correct?#2016-03-2819:09dkeei'm sticking with 1) for the time being, but i'd like to avoid having this project-specific info added to my init.el, so I'll just keep interactively okaying the eval. 😛 thanks!#2016-03-2819:10malabarbaYes, it does. #2016-03-2819:11malabarbaYou can set your custom file to a different to be separate from your init file if you prefer. But it definitely needs to save that information somewhere. #2016-03-2819:12dkeeah, that sounds like a good idea, i'll do that. thanks!#2016-03-2820:30peejaIn a profile-report, is there a way to track down what function is represented by a line like #<compiled 0x402f7a01?#2016-03-2820:30peejaMy kill-buffer is launching a deeply recursive call stack, and I'm not sure what it's doing. https://gist.github.com/Peeja/7e24c3f7cc761faea08b#2016-03-2823:39malabarba@peeja: You can try visiting some helm files and calling load-buffer on them. This will redefine the functions with non-compiled definitions. (you can then recreate the report). Looking at your report, you can start with the file where helm-flx-fuzzy-highligher is defined.#2016-03-2823:40malabarbaNote that, since the functions will no longer be byte-compiled, some things might be slower and it might skew your reports.#2016-04-0413:17plexusanyone know why refactor-nrepl can't always locate missing function definitions?#2016-04-0413:17plexusI find that most of the time it works swimmingly, but then some function names it's just stumped and I have to manually require the namespace.#2016-04-0413:18plexus> Can’t find format-config-uri on classpath#2016-04-0419:24benedek@plexus wonder if you mean this #2016-04-0419:24benedekhttps://github.com/clojure-emacs/refactor-nrepl/issues/152#2016-04-0419:26benedekbut there are couple of fixed issues related to this too so pls retest with latest#2016-04-0419:28benedekah missed the quote. can you pls file a github issue with more details #2016-04-0512:55malabarba@plexus add-missing doesn't find functions if their namespace hasn't been loaded anywhere yet. The reason it "most of the time works swimmingly" is that the namespace had already been loaded by another file or another dependency.#2016-04-0515:53bozhidarand in the current cider snapshot we have a command to load all project namespaces 😉#2016-04-0515:53bozhidar(which might be a bad idea in certain projects)#2016-04-0600:12malabarba@bozhidar cool! I missed that. 😃 #2016-04-0609:39plexus@malabarba @benedek thanks! I'll do some more testing to see if that explains the behavior I'm getting. I've upgraded my cider and clj-refactor. The error message is deceptive though, Can’t find <symbol> on classpath. Should perhaps be more something like <symbol> not found in loaded namespaces...#2016-04-0612:02bozhidar@plexus: totally; one of our focuses going forward is to fix such trivial problems that introduce confusion#2016-04-0612:19plexusok, here's an example of something that doesn't work#2016-04-0612:19plexus
(ns lambdaisland.scratch)

(require 'cemerick.friend.credentials)

(bcrypt-credential-fn)
#2016-04-0612:20plexuseven after requiring the namespace, cljr-add-missing-libspec won't find that bcrypt.. function#2016-04-0612:21plexusany suggestions on how to debug this?#2016-04-0612:22plexusin the cider repl buffer I'm getting#2016-04-0612:22plexus
java.lang.RuntimeException: Unable to resolve symbol: bcrypt-credential-fn in this context, compiling:(/home/arne/LambdaIsland/app/src/lambdaisland/scratch.clj:5:1)
#2016-04-0613:42squiterHey guys, I'm have issues to configure my org-babel to run code in cider...#2016-04-0613:42squiterany tips?#2016-04-0616:01plexuswhat do people use to replace a matching pair of parens with curlies or brackets? I'm sure I've seen someone do it so it's a thing simple_smile might have been @magnars#2016-04-0616:02plexusRight now I do M-<up> to remove the parens, then type a pair of curlies and slurp the expressions back in, but that's a bit cumbersome#2016-04-0616:06squiter@plexus: do you want to change (whatever) to {whatever}? I'm using smartparens.el to do that:
C-( runs the command sp-rewrap-sexp, which is an interactive compiled
Lisp function in `smartparens.el'.

It is bound to C-(.

(sp-rewrap-sexp PAIR &optional KEEP-OLD)
#2016-04-0616:07plexusah perfect, that's exactly what I was looking for#2016-04-0616:07squiter👍#2016-04-0616:08plexusalthough I don't have it bound to a key apparently, C-( runs sp-backward-slurp-sexp for me#2016-04-0616:10squiterhmm my bad, this is one of my custom configs:
;; change surround
(define-key sp-keymap (kbd "C-(") 'sp-rewrap-sexp)
#2016-04-0616:54squiterHey guys I'm trying to use org-babels with cider here... Anyone here use ob-clojure.el to wrap the calls for babel? (https://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/ob-clojure.el) I'm trying to use it here but when I run any source block of clojure inside babel I get this error: let*: Symbol's function definition is void: org-babel--get-vars#2016-04-0617:09plexustry M-x toggle-debug-on-error, then do it again and you should get a stack trace#2016-04-0617:09plexusseems my ob-clojure is too old, it only supports SLIME#2016-04-0617:13plexusI got the latest org from ELPA (`org-20160404`), reloaded it (load "org.el") (load "ob-clojure.el"), did M-x cider-jack-in on the org buffer, and now I can eval code#2016-04-0617:13plexus
#+BEGIN_SRC clojure
(+ 1 1)
#+END_SRC

#+RESULTS:
: 2
#2016-04-0617:14plexusYou can find the version of org with M-x org-version, mine is Org-mode version 8.3.4 (8.3.4-31-gcb683e-elpa @ /home/arne/.emacs.d/elpa/org-20160404/)#2016-04-0617:14plexus@squiter:#2016-04-0617:16squiterhmmm my org-mode is Org-mode version 8.2.10 (release_8.2.10 @ /usr/local/share/emacs/24.5/lisp/org/)#2016-04-0617:16squiterdo you update all org-mode or only your ob-clojure?#2016-04-0617:21squiterHmm I will need to update my org-mode!#2016-04-0617:21squiterthanks for the help @plexus#2016-04-0617:53plexusYeah update all of org, you shouldn't have to install ob-clojure separately, just use the version that comes with org #2016-04-0618:15squiter😉#2016-04-0707:08bozhidarsomeone should probably remove the slime support from ob-clojure#2016-04-0707:09bozhidaras for this to run, people need an ancient version of clojure-mode and slime#2016-04-0707:09bozhidarand I doubt many people use them these days anyway#2016-04-0713:33squiterI update my orgmode and everything goes well here! Thanks @plexus 😄#2016-04-0808:24hkjelshave any of you been able to use minted output of code-blocks in org -> pdf?#2016-04-1322:36richiardiandreaI remember there was a way to avoid replacing text in a region, I enabled it once but I don't remember how to disable it anymore#2016-04-1322:36richiardiandreaI mean, selecting text, then writing now replaces the content, I would like not to have that#2016-04-1322:45kriyative@richiardiandrea: did you mean delete-selection-mode?#2016-04-1322:46richiardiandreaah yeah maybe it's that one, let me try#2016-04-1322:49richiardiandreayes! exactly, on the one hand it is handy for things like multiple cursors, but wrap and ( for me is more common#2016-04-1322:49richiardiandrea@kriyative: thanks a lot#2016-04-1322:50kriyative@richiardiandrea: you bet#2016-04-1419:56sw1nnhi, anyone know whether squiggly-clojure is compatible with cider 0.11.0? I'm seeing this when it tries to kick off the linters `#2016-04-1419:57sw1nnError while checking syntax automatically: (void-function nrepl-current-connection-buffer)#2016-04-1420:24sw1nnit seems that the melpa-stable version (0.1.3) doesn't have this PR: https://github.com/clojure-emacs/squiggly-clojure/pull/28, but the melpa version does.#2016-04-1702:49bozhidarCIDER 0.12 (Seattle) is out! The release notes are here https://github.com/clojure-emacs/cider/releases/tag/v0.12.0#2016-04-1916:45ddellacostasoooo just finally upgraded from an ancient version of cider and realized that I can no longer use C-c M-o to clear the buffer. Is there a replacement mapping for cider-repl-clear-buffer?#2016-04-1916:45ddellacostaand, when/why was this changed?#2016-04-1916:53malabarbaI believe it's C-c C-o to clear most recent output. And with a prefix it clears everything. #2016-04-1916:54ddellacosta@malabarba: thanks I tried this but it didn’t work for me—I think I don’t understand what “with a prefix” means, can you explain?#2016-04-1916:58malabarbaC-u C-c C-o#2016-04-1917:17ddellacostaThat works @malabarba, thanks—but what is “C-u”? I guess I must have missed the explanation of what prefix is somewhere along the line.#2016-04-1917:17ddellacostaah, found it…I’ve been ignorant of this all these years! https://stackoverflow.com/a/32683644#2016-04-1919:34malabarbaIndeed. simple_smile#2016-04-1919:34malabarbaA lot of functions throughout emacs behave differently with a prefix argument#2016-04-1919:34malabarbaC-u is the universal prefix#2016-04-1919:34malabarbaThere are also numerical prefixes with C-1, C-2, etc#2016-04-1919:35malabarbaIf you google it you'll probably gfind a lot about it on the emacs manual#2016-04-2012:07dpsuttoni'm working on a patch for cider to issue a warning if the clojure version is not supported by looking through project.clj and build.boot files. My regex: "org.clojure/clojure\s-*\".*\"" works just fine. But when i add the capturing group, it can break: "org.clojure/clojure\s-*\"\\(.*\\)\"". Does anyone have any thoughts on this?#2016-04-2012:08dpsuttonit breaks on the build.boot file for cprop which has the line: :dependencies '[[org.clojure/clojure "1.8.0"]#2016-04-2012:08dpsuttonbut it works without the capturing group. The capturing group version works on all other examples that i have#2016-04-2012:25dpsuttoni've got this one now. It seems to work when i call it directly but not when my functions do: "org.clojure/clojure\s-*\"\([\.0-9]+\)\""#2016-04-2012:51dpsuttonWell, in the future, if you are wondering, emacs regexes are dumb and require many slashes. "org.clojure/clojure\\s-*\"\\([.0-9]+\\)\""#2016-04-2012:51dpsuttoni'm still not sure if the single slash double quote is a ticking time bomb or not#2016-04-2012:58malabarbano#2016-04-2012:58malabarbait's fine#2016-04-2012:58malabarbathe thing is that emacs regexps are strings#2016-04-2012:59malabarbaso if you want a regexp with a backslash, (like \(), you need to escape that backslash#2016-04-2012:59malabarbabecause \( is the same as ( in strings#2016-04-2012:59malabarbait's a single char#2016-04-2013:01dpsuttonthanks malabarba. I'm gonna write a few tests tonight and then submit the pull request#2016-04-2013:01malabarbaso you need to write \\( in the string#2016-04-2013:01malabarbaso that the regexp engine actually sees the \\#2016-04-2013:02dpsuttoni've also seen that if you are lacking boot and try to run cider-jack-in, you get back a wrong argument stringp message instead of something useful#2016-04-2013:02dpsuttonso that'll be my next quality of life feature for cider#2016-04-2013:02malabarbanice#2016-04-2013:03dpsuttonyeah the hammer dropped on me when you explained that. I understand the significance of different syntaxes for regexes in other languages now#2016-04-2013:03malabarbaindeed simple_smile#2016-04-2013:03malabarbaas for the clojure-version thingy. I feel almost bad saying this, considering the pain you had with regexps, but I think there's a better way to do it.#2016-04-2013:04dpsuttoni learned. so even if the code itself is thrown away no biggie#2016-04-2013:04dpsuttonare you going to ask nrepl what version of clojure is loaded?#2016-04-2013:04malabarbaIf you jack-in to a project with an old clojure-version, does evaluation still work?#2016-04-2013:04dpsuttoni thought about that but worried that if there was an error it may not be able to report it#2016-04-2013:04dpsuttonit does, but with the error message i posted a screenshot of#2016-04-2013:04malabarbaok#2016-04-2013:04dpsuttonwhere it complains about an nrepl mismatch#2016-04-2013:04dpsuttonand some things break#2016-04-2013:05dpsuttonnotably M-, navigation#2016-04-2013:05malabarbaThen I think the best approach is to run (cider-nrepl-sync-request:eval "*clojure-version*")#2016-04-2013:05dpsuttonhaha. yeah you're probably right#2016-04-2013:05malabarbaThis will return the proper clojure version being used#2016-04-2013:06dpsuttonand then it looks like those responses are put into a dictionary or hashmap somewhere, is that correct?#2016-04-2013:06malabarbaYes, but that's not how you use them#2016-04-2013:06dpsuttonoh ok#2016-04-2013:06malabarbawith async requests you would have to use a callback#2016-04-2013:07malabarbabut with sync request the respoinse is simply returned directly#2016-04-2013:07malabarbaso you could do something like this#2016-04-2013:07malabarba`#2016-04-2013:08malabarba
(let* ((response (cider-nrepl-sync-request:eval "*clojure-version*"))
       (clojure-version (nrepl-dict-get response "value")))
  (complain about clojure-version))
#2016-04-2013:10dpsuttonI also saw that there is a version< function out there. I see that explicitly clojure versions 1.7.0 and 1.8.0 are supported. I used these values explicitly rather than set a benchmark of > 1.7.0 as i'm not sure how many point releases of clojure are released, and if it would ever be possible to support say 1.7.0, not 1.7.1, 1.8.0, etc#2016-04-2013:10dpsuttonbut i may just make it along the lines get clojure version, complain if version< cider-minimum-clojure-version#2016-04-2013:11malabarbaYes, use version<#2016-04-2013:11malabarbaI was going to say that too#2016-04-2013:11dpsuttonthanks so much for the pointers#2016-04-2013:11malabarbaI was on my phone yesterday so couldn't type much simple_smile#2016-04-2013:11dpsuttonand huge thanks for all your work on the debugger and general help on the dev mailing list. you are a rockstar man#2016-04-2013:14malabarbathanks simple_smile#2016-04-2015:32richiardiandreaAfter the recence talk about types at Clojure/West, I would like to ask here how and what folks use for racket in emacs? There in geiser and racket-mode. Ideally I would like to keep the cider workflow :)#2016-04-2015:36dpsuttonwhat do you mean by cider workflow?#2016-04-2015:37dpsuttonbut in general things work like slime/cider, etc with repl's and emacs#2016-04-2015:37dpsuttonyou create a server, connect over sockets, and emacs nicely sends info back and forth#2016-04-2016:24base698Slime? What is this 2011?#2016-04-2016:25nkraftEmacs? What is this 1975? simple_smile#2016-04-2016:25richiardiandreaah ah#2016-04-2016:32dpsuttonwut? we can't bash common lisp in here#2016-04-2016:32dpsuttonthis is an emacs channel about clojure haha#2016-04-2016:41richiardiandreaI tried geiser but I think I will need to add quack and change a lot of key bindings#2016-04-2017:43richiardiandreaoh too bad, Paredit does not like typed clojure#2016-04-2018:19dpsuttonwhat's the problem with paredit and typed clojure?#2016-04-2018:19dpsuttonoh yeah. that's why i had to get rid of lispy. the [ characters are a navigation command and not a printing character in that mode.#2016-04-2020:40richiardiandreasmartparens works and oh...did not know about modules, that is why it was not finding my symbols 😄#2016-04-2021:00christianromneyI use geiser and it’s nice enough. i don’t code in Racket that often though#2016-04-2021:50bozhidargeiser is pretty similar to cider#2016-04-2021:50bozhidarthey even have some nice advantages there#2016-04-2021:51bozhidare.g. their REPL is comint based, unlike our custom REPL#2016-04-2021:51bozhidarand is way nicer#2016-04-2021:51bozhidarand images are displayed in the REPL#2016-04-2021:51bozhidarobviously we can do both these things, but we never found the time to do so#2016-04-2021:52bozhidar@malabarba: The problem is that you can’t really check the version this way#2016-04-2021:53bozhidaras the middleware will blow up before you can evaluate any code...#2016-04-2021:53bozhidarfrankly I don’t remember what exactly happens on 1.6, but I remember it wasn’t pretty#2016-04-2021:59nkraftI don't code a lot of Racket, but when I have I've used DrRacket. In Emacs, I found quack to be the easiest to set up.#2016-04-2022:00nkraftQuack also works with a lot of other schemes, which can be nice.#2016-04-2022:00nkraftI was hacking a lot in Chicken Scheme for a while, and quack was pretty usable for that.#2016-04-2022:53dpsutton@bozhidar: are you asking what happens when the version is not supported?#2016-04-2022:53dpsuttonon 1.6 it is the following#2016-04-2022:54dpsuttonI've got it working so that it looks like the following:#2016-04-2023:02richiardiandrea@nkraft: thanks for the suggestion, but I found quack and it did not actually add much, so for now it is disabled, in favor of geiser, but maybe I am missing something...what does it actually provide?#2016-04-2100:10richiardiandreain projectile is there a way to exclude folders for grepping, kind of the complement of projectile-grep-default-files?#2016-04-2103:57bozhidar@dpsutton: hmm, guess I was wrong#2016-04-2103:58bozhidarseems we don’t load the middleware at all on unsupported Clojure versions#2016-04-2103:58bozhidarand i thought we tried to load it and it exploded#2016-04-2104:00bozhidarwe should probably change the first message to something more descriptive in the absence of the middleware#2016-04-2104:00bozhidaras right now it sounds pretty odd#2016-04-2104:00bozhidar@richiardiandrea: ignored folders won’t be grepped#2016-04-2104:01bozhidarI don’t remember if we had anything extra for grep in particular#2016-04-2104:01bozhidarbut I think we don't#2016-04-2104:02richiardiandrea@bozhidar: yes but what if I don't want to ignore the folder..just to avoid grepping? I know it is a weird use case and in my specific case I am using helm-ag so I might actually look into that#2016-04-2104:29dpsuttonthe pull request is on github for cider re: clojure version. I originally was searching project.clj/build.boot for clojure version in case the middleware didn't work but now i'm just exec-ing (clojure-version) and checking that against a newly defined cider-minimum-clojure-version#2016-04-2104:53bozhidar@dpsutton: I went over it and I’ve added some comments#2016-04-2104:55dpsuttonyeah i've already updated them but it seems to not be seeing that info#2016-04-2104:56dpsuttoni'm not sure where that cider--connection-info function is called, but the nrepl info seems to be there but the clojure version is not#2016-04-2104:56dpsuttonah crap#2016-04-2104:56dpsuttonits not there for the same reason that the nrepl version info isn't there
#2016-04-2104:56dpsuttonbecause its broken with old versions of clojure#2016-04-2104:57dpsuttonactually, its not seeing the info even with 1.8.0#2016-04-2104:57dpsuttonlet me keep looking#2016-04-2105:01dpsuttonnevermind. stale version of a function laying around interned. all is well#2016-04-2105:02dpsuttonits fine now#2016-04-2105:18dpsuttonthanks to both you and malabarba for all of the pointers and patience. can't wait for the next work. think its gonna be when missing a build system, don't display "argument error stringp" in the message minibuffer#2016-04-2112:07danielgrosseHello everybody. Just trying emacs for the first time. I have a problem with alt as meta key. When I try to enter someting like [] or {} I have to use alt. But then the Meta key is triggered and a command is executed. I have the super key mapped to Capslock. Can I map the Meta key to this key?#2016-04-2113:28zzamboni@danielgrosse: why do you need to use alt to enter [] or {}? Are you using a non-US keyboard layout?#2016-04-2113:29danielgrosseYes. { is typed with alt+8 for example#2016-04-2113:29zzamboniI guess it also depends on your physical keyboard - e.g. on a Mac keyboard I map Cmd to Meta and leave Alt/Option as Alt#2016-04-2113:30zzamboniI see - what sort of (physical) keyboard layout do you have? Is there another key you could map to Meta instead of the Alt key, so you can keep using Alt to enter characters?#2016-04-2113:31danielgrosseI have now mapped the right alt to nil, so I get the system commands. Lets see if this works#2016-04-2115:09malabarbaThat's odd. System mappings usually happen before Emacs ever gets to see them. So if your system inserts { on Alt-8 then Emacs should just see the {. #2016-04-2210:39danielgrosseAgain a question for beginner. simple_smile I have a configuration file called shell.el in my .emacs.d folder. When I now run M-x shell the error Autoloading failed to define function shell is thrown. Even if its empty. Can someone explain me how I can use the file to change some behaviours of the shell. E.g. Match the optics to the shell in iTerm.#2016-04-2212:12benedekany idea how can i stash a chunk or a file in magit from the status buffer?#2016-04-2212:56dpsuttoni think its z#2016-04-2212:56dpsuttonbut just press ? to show the options#2016-04-2213:03mcgivernsayou can put the changes you don't want to stash in the index, then do z -k z#2016-04-2213:35malabarba@danielgrosse: avoid naming your configuration files with the same name as actual features. That can shadow the load path.#2016-04-2213:36malabarbaCall it something like shell-config.el instead#2016-04-2213:36danielgrosse@malabarba: thank you. Just renamed it and it works#2016-04-2213:37malabarbaAnd it sounds like you've added your .emacs.d directory to the load path. #2016-04-2213:37malabarbaDon't do that either, 😉 #2016-04-2215:47benedek@dpsutton: @mcgivernsa thx. I mean just stashing a chunk/file not all current changes#2016-04-2215:47benedekwhat you have for staging with use s on a certain file or chunk#2016-04-2215:50mcgivernsaso what I described is like the inverse - it will stash everything but the staging area#2016-04-2215:58benedekah i see. right. not exactly what i wanted but deffo a solution. ta#2016-04-2310:36plexuswhen I open a new test namespace, it automatically gets a ns form that requires clojure.test and the namespace under test. Is that a CIDER or a clj-refactor thing? And is the exact form configurable?#2016-04-2312:16stex@plexus It’s a clj-refactor thing. You can configure the behaviour with cljr-add-ns-to-blank-clj-files, but I don’t think the form itself is configurable.#2016-04-2312:35plexusthanks, I'll have a look#2016-04-2315:27malabarbaParts of it are configurable. You can change sut to something else for instance #2016-04-2315:27malabarbaBut I think that's only on the snapshot #2016-04-2315:35richiardiandreaWould folks be interested in a fork of emacs live but dedicated to lisps only? My goal would be: a) to keep it more up to the current version of cider/clj-refactor... b) add geiseir and racket support c) remove languages like ruby/haskell that are there at the moment but personally I don't use so they are required for no reason#2016-04-2315:36richiardiandreaI am doing this anyways myself so there would be little overhead for me if somebody is interested#2016-04-2505:41danielgrosseHello, maybe someone of you knows the answer to my question: https://emacs.stackexchange.com/q/21824/11837?stw=2#2016-04-2607:58borkdudeWhen you search in emacs (C-s) and then quit the search, how can you repeat the last search you did?#2016-04-2607:59benedekjust keep hitting s after C#2016-04-2608:00borkdudeThanks!#2016-04-2608:01benedekno worries#2016-04-2701:54bozhidarand you can go down deeper back in time with M-p after C-s#2016-04-2701:54bozhidarbut nothing beats C-s s in terms of efficiency#2016-04-2708:00maximI can't find switching between tests and implementations in CIDER. Are there reasons for that?#2016-04-2714:27surreal.analysis@mkaschenko: You’re encouraged to use projectile, which lets you switch using C-c p t by default#2016-04-2714:27surreal.analysisBasing the “encouraged to use projectile” on this - https://github.com/clojure-emacs/cider/issues/1453#2016-04-2714:27surreal.analysisBut, if you don’t want to use projectile, that elisp snippet is probably useful to add#2016-04-2714:34maximProjectile has that functionality and I've actually been using it for long time. I don't know what happened to me and why I asked the question simple_smile.#2016-04-2714:35plexusoh boy I totally implemented that myself because I couldn't find it in CIDER. Should've known to look at Projectile...#2016-04-2714:40bozhidaryeah, that’s right#2016-04-2714:41bozhidarat some point there was some test switching functionality in clojure-mode, but a ton of people are using projectile#2016-04-2714:42bozhidarand handling project-related tasks is way easier there (in clojure-mode this would have required a lot of extra code)#2016-04-2802:18crocketThank god, #C099W16KZ IRC trollls are probably not here.#2016-04-2802:18crocketAt least, I don't see the ones I know.#2016-04-2907:53nullptrbonus awesome: (setq projectile-create-missing-test-files t)#2016-04-2912:27plexusdoes anyone know how to set the default font for emacs?#2016-04-2912:27plexusset-default-font is deprecated, it's now an alias for set-frame-font, but that means that when you create a new frame (`C-x 5 2`) it doesn't use the right font#2016-04-2914:13dpsuttonwhat i've done in the past is use customize-group for emacs, set the default face, and then go look at the customize.el file it creates to see what it likes to do#2016-04-2914:51dpsuttonI'm making tests that require point being at a certain spot of text in sexp's#2016-04-2914:51dpsuttonI've got it working with strings, where i pass in the entire sexp with a | as where I want my point, and then in a temp buffer, find this and delete it and then carry out my function#2016-04-2914:52dpsuttonI'd like to be able to just pass in a sexp and use a macro to do all this for me#2016-04-2914:52dpsuttonHowever, I'm not sure how to get the forms into the buffer unevaluated#2016-04-2914:52dpsuttondoes anyone have any pointers?#2016-04-2914:54dpsuttonI want to insert the unevaluated form into the temp buffer since it contains invalid code and re-search for |, but insert is a function so it is evaluating the code#2016-04-2914:55dpsuttonI wish i could invoke the reader without the evaluator and have it give me its string representation#2016-04-2915:13zzamboni@plexus: I always use customize-face and choose default, from which most other faces inherit#2016-04-2915:14zzamboniwhich results in something like this in ~/.emacs, which I can then edit by hand:#2016-04-2915:45plexus@dpsutton: the macro will receive the unevaluated sexp which you can turn into a string. Can't remember the function now (and I'm on my phone) but the equivalent of Clojure's pr-str#2016-04-2915:45dpsuttonthanks for thinking about it#2016-04-2915:45dpsuttoni was trying to stringify it with (format "%s" malformed-code) but this eval's the malformed code#2016-04-2915:45plexusThat's surprising #2016-04-2915:46dpsuttonnot really, right? format is just a function so it eval's all of its arguments#2016-04-2915:46dpsuttonah maybe (format "%s" (list @,malformed-code)) would work#2016-04-2915:47plexusAh you're outputting format from the macro? I would call it inside the macro #2016-04-2915:47plexusOr wrap the argument in an extra (quote...) #2016-04-2915:49plexusBut yeah you want to generate that string at macro expansion time, not at runtime #2016-04-2915:49dpsuttonah yes quote it worked#2016-04-2915:49dpsuttonthanks so much plexus#2016-04-2915:56plexusalways a pleasure :) #2016-04-3022:47joelkuiperhttps://github.com/zk-phi/electric-align#2016-05-0111:06dottedmagIs there a recipe to highlight failing tests (`clojure.test`, ran by boot-test) in Emacs, a-la flycheck?#2016-05-0111:21dottedmagAh, I was looking for cider-auto-test-mode, apparently.#2016-05-0219:33zaneAnyone know how to get visual-line-mode in Emacs to treat words with apostrophes (e.g. wasn't) as complete words? Right now it's occasionally breaking a line at the apostrophe.#2016-05-0300:03metropolislightsHi, everyone! I'm curious to know if there's a way to use CIDER with my GUI Emacs without installing Java.#2016-05-0300:04metropolislightsFor example, when using a VM, I can have the JDK installed there, and run Leiningen commands from inside the VM, while editing files on a shared folder.#2016-05-0300:05metropolislightsI'm hoping that, since nREPL is (as far as I understand) a server exposing a port for communicating data to Emacs, I can attach to an instance of nREPL running inside the VM, and get all my fancy CIDER functionality through there.#2016-05-0300:06metropolislightsBasically, I'd like to keep my host machine clean, and do all experimentation in an isolated environment.#2016-05-0300:07metropolislightsCan anyone share any wisdom? :-)#2016-05-0300:12niamu@metropolislights: Unless I’m mistaken, I believe you’re looking for cider-connect#2016-05-0301:50jcsims@metropolislights: you should be able to start a repl in the application, and then connect like @niamu mentioned. Check here for details on how to do that: https://github.com/clojure-emacs/cider-nrepl#via-embedding-nrepl-in-your-app#2016-05-0301:50jcsimsthat’s the method I’m familiar with - there may be others I’m unfamiliar with#2016-05-0303:56bozhidaror you can simply run lein repl or something similar on the other machine#2016-05-0303:57bozhidarand use cider-connect#2016-05-0303:57bozhidarto connect to the nREPL server#2016-05-0303:57bozhidarit’s not really necessary to embed the server#2016-05-0309:10bojan.maticany spacemacs users here? I must say, I'm really impressed with it so far#2016-05-0309:10bojan.maticlooks super polished#2016-05-0309:31dottedmag@metropolislights: Also you can run Emacs in VM and use X forwarding to have UI on your local display.#2016-05-0316:21zane@bojan.matic: I use Spacemacs! I barely even have to maintain my emacs configuration any more because of it.#2016-05-0319:34tomayerstHi, trying to install solarized-theme, with M-x package-install solarized-theme getting Opening TLS connection to `https://melpa.org'...done url-insert-file-contents: https://melpa.org/packages/dash-20160306.1222.el: Not foun#2016-05-0319:34tomayerstHow dense am I being?#2016-05-0319:45tomayerstPretty dense apparently, forgot I needed to refresh the package list#2016-05-0323:51metropolislights@niamu @jcsims @bozhidar Thanks, guys! It was relatively painless. :-)#2016-05-0323:55metropolislightsJust for future reference, configuring nREPL for the VM meant setting the host and port by doing this before lein repl:
export LEIN_REPL_HOST=0.0.0.0 # the VM's 127.0.0.1 can't be seen from outside
export LEIN_REPL_PORT=8080 # or whichever port you're forwarding
#2016-05-0323:56metropolislightsFor some reason, lein repl :connect 0.0.0.0:8080 was throwing ConnectException Connection refused. I'll look further into it before opening and issue.#2016-05-0323:59metropolislightsEverything CIDER-related was smooth sailing. It truly does rock. 👍#2016-05-0402:53bozhidarhappy to hear this!#2016-05-0413:09bruceadams@metropolislights: (maybe you’ve already worked through this) You can listen on 0.0.0.0 (which means all network interfaces) but you cannot try to connect to 0.0.0.0 You need to give one IP address (or DNS name for an IP address).#2016-05-0416:59dottedmag@bruceadams: But 0.0.0.0 seems to work, resolving to a localhost (not sure how).#2016-05-0417:01dottedmagWeird that it works in the same way on Linux and OS X.#2016-05-0418:05bruceadamsFascinating!#2016-05-0610:41plexusdoes anyone have any clue how to call org-mode code blocks from elisp?#2016-05-0610:42plexusgoogling and grepping through org code has yielded nothing... I have a bunch of named org source blocks, like#2016-05-0610:42plexus
#+NAME: foo
#+BEGIN_SRC sh
...
#+END_SRC
#2016-05-0610:43plexusand I would like to have a single block that calls them in order#2016-05-0610:43plexus
#+BEGIN_SRC emacs-lisp
(org-execute-code-block-I'm-making-this-shit-up "foo")
(org-execute-code-block-I'm-making-this-shit-up "bar")
...
#+END_SRC
#2016-05-0612:47kardanIs there an easy way to escape code that goes into a docstring?#2016-05-0612:55kardanFound paredit-doublequote#2016-05-0613:36plexus@kardan https://github.com/magnars/string-edit.el#2016-05-0613:55plexussome inspiration for the weekend: https://www.youtube.com/watch?v=dljNabciEGg#2016-05-0613:55plexusI've been doing my deployments from org-mode and it's seriously awesome#2016-05-0614:23squiterAwesome link @plexus thanks!#2016-05-0821:07bendyhey all, I’m new to emacs, and still learning things. Regardless of which color scheme I choose, I always end up with something completely unreadable, somewhere - for example if I press M-r in multi term, I get an awesome reverse search, except with a terrible color scheme:#2016-05-0821:08bendyHow can I go about figuring out how to change that background color? Is there a describe function I can run?#2016-05-0821:17bendySorry, I should also mention that when I move the cursor over it, it changes color (it highlights) so describe-face isn’t doing the job#2016-05-0909:14plexus@bendy you could look at M-x customize-face RET (i.e. customize all faces), that will give you a long list of all faces with a sample, and you can change the ones that aren't readable#2016-05-0909:15plexusnot the most user friendly approach but can't immediately think of something better. Normally you would move your cursor to the spot that's unreadable and do customize-face there, then it will automatically select the right face, but if the face changes when you move the cursor there then I guess that won't work#2016-05-0918:39bendy@plexus: Thanks! I ended up using that to fix it, all my color themes defined the term-* faces to the same foreground & background#2016-05-0918:39bendyI changed all the term-* backgrounds to be darker (~10%) and now it works great#2016-05-0918:40bendyjust in case anyone searches the clojure log for a similar issue simple_smile#2016-05-1019:27brian_mingusdoes anyone have a high contrast (dark background light foreground) that allows them to see all the colors in rainbow-parens mode?#2016-05-1021:44bozhidarzenburn and solarized-dark look pretty good#2016-05-1021:51robertoI love zenburn#2016-05-1101:13surreal.analysisI like sanityinc-tomorrow-bright, but the 2 and 3 index parens are a little hard for me to differentiate#2016-05-1113:05squiterwhat about https://zenorocha.github.io/dracula-theme/#2016-05-1113:31mitchelkuijpers
(define-clojure-indent
  (defui '(2 nil nil (1)))
  (a 1)
    (dom/abbr          1 )
    (dom/address       1 )
    (dom/area          1 )
    (dom/article       1 )
    (dom/aside         1 )
    (dom/audio         1 )
    (dom/b             1 )
    (dom/base          1 )
    (dom/bdi           1 )
    (dom/bdo           1 )
    (dom/big           1 )
    (dom/blockquote    1 )
    (dom/body          1 )
    (dom/br            1 )
    (dom/button        1 )
    (dom/canvas        1 )
    (dom/caption       1 )
    (dom/cite          1 )
    (dom/code          1 )
    (dom/col           1 )
    (dom/colgroup      1 )
    (dom/data          1 )
    (dom/datalist      1 )
    (dom/dd            1 )
    (dom/del           1 )
    (dom/details       1 )
    (dom/dfn           1 )
    (dom/dialog        1 )
    (dom/div           1 )
    (dom/dl            1 )
    (dom/dt            1 )
    (dom/em            1 )
    (dom/embed         1 )
    (dom/fieldset      1 )
    (dom/figcaption    1 )
    (dom/figure        1 )
    (dom/footer        1 )
    (dom/form          1 )
    (dom/h1            1 )
    (dom/h2            1 )
    (dom/h3            1 )
    (dom/h4            1 )
    (dom/h5            1 )
    (dom/h6            1 )
    (dom/head          1 )
    (dom/header        1 )
    (dom/hr            1 )
    (dom/html          1 )
    (dom/i             1 )
    (dom/iframe        1 )
    (dom/img           1 )
    (dom/ins           1 )
    (dom/kbd           1 )
    (dom/keygen        1 )
    (dom/label         1 )
    (dom/legend        1 )
    (dom/li            1 )
    (dom/link          1 )
    (dom/main          1 )
    (dom/map           1 )
    (dom/mark          1 )
    (dom/menu          1 )
    (dom/menuitem      1 )
    (dom/meta          1 )
    (dom/meter         1 )
    (dom/nav           1 )
    (dom/noscript      1 )
    (dom/object        1 )
    (dom/ol            1 )
    (dom/optgroup      1 )
    (dom/output        1 )
    (dom/p             1 )
    (dom/param         1 )
    (dom/picture       1 )
    (dom/pre           1 )
    (dom/progress      1 )
    (dom/q             1 )
    (dom/rp            1 )
    (dom/rt            1 )
    (dom/ruby          1 )
    (dom/s             1 )
    (dom/samp          1 )
    (dom/script        1 )
    (dom/section       1 )
    (dom/small         1 )
    (dom/source        1 )
    (dom/span          1 )
    (dom/strong        1 )
    (dom/style         1 )
    (dom/sub           1 )
    (dom/summary       1 )
    (dom/sup           1 )
    (dom/table         1 )
    (dom/tbody         1 )
    (dom/td            1 )
    (dom/tfoot         1 )
    (dom/th            1 )
    (dom/thead         1 )
    (dom/time          1 )
    (dom/title         1 )
    (dom/tr            1 )
    (dom/track         1 )
    (dom/u             1 )
    (dom/ul            1 )
    (dom/var           1 )
    (dom/video         1 )
    (dom/wbr           1 ))
Are there people here who get the om indentation a bit more bearable with a nicer solution?
#2016-05-1115:21malabarbaYou can set the :style/indent metadata on those vars. It would be more concise but would only work with a connected repl. #2016-05-1212:32mitchelkuijpers@malabarba: Thnx I’ll just stay with this solution then simple_smile#2016-05-1215:02bozhidarbtw, we can rename clojure-mode-extra-font-locking to clojure-mode+ or something like this#2016-05-1215:02bozhidarand add there extra indentation settings and things like these#2016-05-1215:02bozhidarI generally favour doing everything through Clojure#2016-05-1215:03bozhidarbut this might be useful for people who prefer alternative approaches#2016-05-1310:40kneivaHow can I run a function without parameters straight from code buffer, so that the result is shown in jacked in REPL?#2016-05-1313:25bja@kneiva: if you're using spacemacs, by default it's bound to SPC m s f. If you're not using spacemacs, their source code has a function to do this: https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Blang/clojure/packages.el#L36#2016-05-1315:26kneivaThanks. I’m using CIDER, is there similar functionality in it?#2016-05-1316:04zane@kneiva: You can just copy / paste that function into your emacs config. To my knowledge its only dependency is CIDER.#2016-05-1317:38kneivaOk, great, thanks!#2016-05-1319:16brian_mingushere are a set of methods for taking control of where emacs pops buffers, restoring your window layout and navigating between windows much more quickly. suggestions / improvements welcome https://gist.github.com/brianmingus/5322e49ab43a6cce131d37ffe47bf802#2016-05-1615:55brian_mingusanyone using lispy-mode ?#2016-05-1615:55brian_mingus[ and ] are bound making it impossible to write actual clojure code#2016-05-1616:19brian_mingus@peeja: did you find a workaround to this bug?#2016-05-1616:20peeja@brian_mingus: It's not a bug: } inserts [ in lispy#2016-05-1616:20peejaIt's a little weird, but I actually got used to it really fast#2016-05-1616:21brian_mingusi tried to redefine those keys to j and l (lispy-define-key lispy-mode-map "j" 'lispy-forward)#2016-05-1616:21brian_mingusdoesn't work 😞#2016-05-1616:21brian_mingusseems it adds additional bindings and keeps the old ones as well#2016-05-1616:22peejaWell, for one thing, I wouldn't redefine j and l, as they're pretty important to the main lispy bindings already#2016-05-1616:22peejaunless you've got a big plan#2016-05-1616:22brian_mingusi use M-i,j,k,l for winmove up, left, right, down (shortcuts used in gaming)#2016-05-1616:23brian_mingusso it is super weird for lispy to overload the meanings to be different..#2016-05-1616:23brian_mingusi think i won't be able to use lispy-mode until i can tell it to undefine a shortcut, not just add additional ones#2016-05-1616:23peejaNot sure what you mean; Lispy uses HJKL according to their vim meanings#2016-05-1616:23peejaThat's the basis for the entire thing#2016-05-1616:24peejaAre you saying you just want the same style but with a different layout?#2016-05-1616:24brian_mingusyeah i just need to be able to define my own keys, which i can do#2016-05-1616:24brian_minguswhat i can't do is undefine keys#2016-05-1616:24peejaIt's totally valid to want different bindings, I'm just saying it's not "super weird" for lispy to be using HJKL in the first place#2016-05-1616:25brian_mingusi don't use vim, and i need i,k to be up,down, and j,l to be left, right, and i really don't want that goofy [ ] behavior#2016-05-1616:25brian_mingusand i imagine i'll want to customize other things#2016-05-1616:26peejaBut, the second thing is that [ and ] are different from most Lispy bindings: they always apply, not just when the point is special#2016-05-1616:26peeja(Their main purpose is to put the point where it's special)#2016-05-1616:26peejaSo you don't want to use lispy-define-key to recreate them on another key#2016-05-1616:27peejaI think the right thing to do is just a normal define-key#2016-05-1616:28peejaAll that said, themes may be what you're after: https://github.com/abo-abo/lispy/blob/e409298214ce88ed29bcf348177c39ba4ed3a61d/lispy.el#L8290#2016-05-1621:06brian_mingus@peeja thanks#2016-05-1622:44agdoes anyone know a package that lets you convert json into edn and vice-versa? I don’t wanna waste time writing one and then find out there’s better alternative out there#2016-05-1622:48brian_mingushttps://github.com/dakrone/cheshire#2016-05-1623:23ag@brian_mingus: I was asking about Emacs package not clojure lib#2016-05-1623:24brian_mingusoh, what's that for?#2016-05-1623:24agto convert json into EDN and vice-versa#2016-05-1623:24agin Emacs#2016-05-1623:25agyou select piece of json and convert it to EDN#2016-05-1623:25agor the other way#2016-05-1623:25brian_minguscall clojure and ask it to do it...#2016-05-1623:25brian_mingusthere are also python libs that can do it#2016-05-1623:27agyeah writing something like this in elisp shouldn’t be hard. though I thought someone may already has done it#2016-05-1703:10malabarba@ag I think there's a package called edn.el#2016-05-1703:36ag@malabarba: it doesn't convert though. #2016-05-1708:18plexus@ag there's a json library packaged with Emacs, and an EDN lib in melpa. Shouldn't be too hard to hook those together#2016-05-1708:46plexus@ag there you go#2016-05-1713:17plexusI don't post every emacs hack I do here, but this one is going to help me so much https://github.com/plexus/.emacs.d/blob/master/init.el#L327-L380 --> edit code blocks in markdown as you would do in org-mode, so press C-c ' to get a buffer with just the source and the right major mode, make edits, press C-c ' again to return#2016-05-1713:17plexuswill become a melpa package in due time probably#2016-05-1719:43ag@plexus: wow, thanks a bunch!#2016-05-1719:46plexusMy pleasure! #2016-05-1819:45plexusis there any built-in/paredit/smartparens thing that copies a sexp to the kill ring without killing it?#2016-05-1819:46plexusI find myself doing C-M-k C-y waaaay too often#2016-05-1820:40ghosss@plexus: yes! there is paredit-copy-as-kill, but it's not bound to a key by default#2016-05-1820:40plexusthat I can do 🙂 thanks! tried the googles but didn't immediately find much#2016-05-1909:32jan.zysp-copy-sexp in smartparens does that as well#2016-05-1909:32jan.zyit’s usually bound to C-M-w#2016-05-1916:11zane^ SPC k y in evil-mode / Spacemacs.#2016-05-1916:16peejaDoes anyone know the "right" way to iterate over a list of grep results from lisp?#2016-05-1916:16peejaIs it correct to just loop and keep calling (next-error)?#2016-05-1919:18plexusso paredit-copy-as-kill will also copy a trailing comment apparently, sp-copy-sexp doesn't, which I prefer#2016-05-1919:36jakemcc@plexus: thanks for posting edit code in other mode from markdown buffer snippet earlier. Added it to my setup yesterday when working on a presentation and its been a great boon.#2016-05-1919:37plexusI know, right! Can't imagine how I ever lived without it 🙂 I'm writing my scripts for Lambda Island in markdown so I'm using it all the time now#2016-05-2013:42lvhjan.zy: Interesting; for me that key is bound to append-next-kill#2016-05-2013:42lvh(that’s just prelude)#2016-05-2019:03aghey… anyone has written a piece of snippet that would allow to use #_ reader macro? I’d like to comment/uncomment keybinding to work with that. it should be pretty straightforward to write, wondering if anyone already done this and I could just steal it?#2016-05-2020:13zaneOoh.#2016-05-2020:13zaneI hope that exists. I also want to steal it.#2016-05-2021:36ghosss@ag is this what you're looking for?
(defun comment-reader-macro ()
  (interactive)
  (unless (eq ?\( (following-char))
    (paredit-backward-up))
  (insert "#_"))
#2016-05-2021:39ghosssoh, uncommenting too, huh#2016-05-2021:41aggood job @ghosss :thumbsup: :thumbsup: , now be a good lad add one for removing 🙂#2016-05-2021:41ag(uncommenting I mean)#2016-05-2021:42ghosssthat's the tricky part, isn't it?#2016-05-2021:52agexcuses, excuses 😄#2016-05-2022:08ghosssI won't run this in production, but:
(defun am-i-in-a-commented-sexp ()
  (condition-case nil
      (save-excursion
        (unless (and (eq ?\( (following-char))
                     (eq ?_ (preceding-char)))
          (paredit-backward-up))
        (or (eq ?_ (preceding-char))
            (am-i-in-a-commented-sexp)))
    (error nil)))

(defun comment-uncomment-reader-macro ()
  (interactive)
  (if (am-i-in-a-commented-sexp)
      (progn
        (search-backward "#_")
        (delete-char 2))
    (progn
      (unless (eq ?\( (following-char))
        (paredit-backward-up))
      (insert "#_")))))
Uncommenting should work anywhere within the commented sexp.
#2016-05-2022:12agcool… you are one truly awesome person… I will definitely make use of this.#2016-05-2022:13agI’ll try to improve it later (if I have time). for example the first function doesn’t work for other forms (maps and keywords)#2016-05-2022:13ghosssoh right... those things 🙂#2016-05-2022:14agI would’ve probably used smarparens to identify current form#2016-05-2022:15ghosssah. I don't use that...#2016-05-2022:15ghosssI was disappointed I was looking at characters instead of dealing with forms#2016-05-2106:04agsorry for the delay, didn’t have time earlier for that: so here’s the snippet
(defun cljr-toggle-ignore-form ()
  "clojure - ignore (comment) form"
  (interactive)
  (if (search-backward "#_" 2 t 1)
      (delete-char 2)
    (progn
      (let ((fc (following-char)))
        (cond ((-contains? '( ?\) ?\] ?\} ) fc) (paredit-backward-up))
              ((-contains? '( ?\( ?\[ ?\: ?\{ ) fc) nil)
              (t (beginning-of-thing 'sexp)))
        (insert "#_")))))
#2016-05-2106:05agI am surprised clj-refactor doesn’t have something like this already.#2016-05-2510:10anmonteiro@malabarba: weird, everything works correctly if I change https to http#2016-05-2510:12anmonteirooh I might have upgraded openssl with brew the other day#2016-05-2514:23jimmyhi guys in emacs, how can we send a command to a named buffer ?#2016-05-2515:06jimmyand I have another question regarding lint tools for clojure, is there any good lint tool that is usable ?#2016-05-2515:19benedeki am not a frequent user but https://github.com/clojure-emacs/squiggly-clojure#2016-05-2713:47peejaAnyone know a good way to get emacs to format docstrings with parameter explanations like this? https://github.com/omcljs/om/blob/master/src/main/om/next.cljs#L1921-L1951#2016-05-2713:48peejaI can't find a way to get emacs to help me with the line breaks without messing up all my careful formatting 🙂#2016-05-2718:17hrathod@peeja: Does M-q help?#2016-05-2718:40peejaNo, it works on paragraphs, but it messes up all the parameter stuff#2016-05-2718:52tdaudelinSounds like a neat idea for a new minor-mode#2016-05-2723:57m1dnightIs there an “official” docstring format?#2016-05-2807:46dottedmag@m1dnight: "12.2.4 Documentation Strings of Functions" in "GNU Emacs Lisp Reference Manual"?#2016-05-2814:42noogaone thing that is still mystery to me is how do I create new file when C-x C-f uses ido and stubbornly matches files that have similar names#2016-05-2814:59noogaah C-x C-f C-f#2016-05-2912:08bruceadamsIf it’s any comfort, nooga, I struggled with the same thing for quite a while before finding the C-f trick.#2016-05-2912:55nooga@bruceadams: yeah, I just found it out after hitting C-f too many times out of frustration 😄#2016-05-2915:02m1dnight+1 for C-f#2016-05-2915:02m1dnightsometimes it even matches files in different projects for me :<#2016-05-2915:15noogayeah#2016-05-2920:24gadfly361Made an emacs-focused template for Reagent with org-mode, cider, and figwheel. https://github.com/gadfly361/reagent-seed#2016-05-3014:17virmundihello. how do I get cider to load on the right of the file I'm working on?#2016-05-3014:18plexus@virmundi: can you elaborate, what do you mean exactly?#2016-05-3014:21virmundisure#2016-05-3014:21virmundiI have a file open. When I jack in, the repl opens in the bottom of the window/frame#2016-05-3014:21virmundiI can move the repl to the right hand side of the window, but I want to make it open there in the default#2016-05-3014:27plexusthat's a good question... not sure how you would configure that#2016-05-3014:31malabarba@virmundi: cider just pops up a window wherever Emacs deems best. You need to configure emacs if you want it to show up in a different place. #2016-05-3014:31malabarbaYour window is popping up on the bottom because your frame is too narrow, and emacs is deciding that it can't fit two windows side by side.#2016-05-3014:32malabarbaI think there's a variable for that, but I can't recall the name now. #2016-05-3014:32virmundiI'll try now#2016-05-3014:33virmundigood call#2016-05-3014:33virmundithanks#2016-05-3015:45richiardiandreaMalabarba is there a shortcut for require reload/reload-all of the ns of current buffer by any chance?#2016-05-3015:48vermathere is “eval current buffer"#2016-05-3015:49vermaC-c C-k @richiardiandrea#2016-05-3019:31benedek@virmundi perhaps digging around split-width-threshold defcustom could help#2016-05-3122:36samuelfHey, I’m on line 358 of the fundamental emacs tutorial, (the one you get when you press C-h t) and it says that sometimes <Return> will auto-ident, but it’s not doing it.#2016-06-0100:19ag@samuelf: it depends on the mode, press C-h v find clojure-indent-style and read that#2016-06-0100:47malabarbaYou may need to turn on auto-indent-mode#2016-06-0100:48malabarbaNo #2016-06-0100:48malabarbaI mean electric-indent-mode#2016-06-0102:01bruceadams@virmundi: I usually want the Cider REPL to the right of my current buffer. I split my frame the way I want before doing cider-jack-in, typically with: C-X 3#2016-06-0108:21plexus@samuelf: also try C-j, it's commonly bound to newline-and-indent or something similar#2016-06-0200:53richiardiandreawho needs a window manager anymore -> https://github.com/ralesi/ranger.el#2016-06-0210:32troglotitHey! Does anyone know how search using / from evil-register?#2016-06-0615:52peejaIs there a standard / common way to switch between related files, such as an implementation file and a test file?#2016-06-0615:53peejaOh, looks like projectile covers at least some of that#2016-06-0616:22dpsuttonif you are using cider there is#2016-06-0616:22dpsuttoni believe#2016-06-0616:29peejaWell, it's not necessarily a test file#2016-06-0616:29peejaI also want to switch to a stylesheet, for instance#2016-06-0616:30peejaI'm basically looking for a tool that lets me identify a bunch of files related to the current file by transforming path names, and switch to them quickly#2016-06-0917:05balintanyone got ligatures working w/ firacode font? https://github.com/tonsky/FiraCode/wiki/Setting-up-Emacs#2016-06-0917:05balintmost of them seem to work for me, but not all which bugs me#2016-06-0917:39benedekyup but on osx#2016-06-0917:40benedekalso had to install osx specific build for proper support i think#2016-06-0921:59agCan someone explain to me, why when I do lein trampoline repl from outside of Emacs, I can’t cider-connect to it, but I can when I do just lein repl?#2016-06-1316:47richiardiandreahey folks, a question, does somebody have an emacs function for commenting a form with #_ ?#2016-06-1317:39hrathod@richiardiandrea: https://github.com/plexus/emacs-clojure-utils may be helps?#2016-06-1317:44richiardiandrea@hrathod: thanks! I am checking#2016-06-1317:45plexusyeah the code in that repo is pretty rough and ready. Improvements very welcome!#2016-06-1322:14richiardiandrea@plexus: I took a similar approach but then I noticed that if I want to remove a #_ from wherever (inside a commented sexp) I am what I really need is to recur up the sexps to see if there is one already...#2016-06-1407:35borkdudeI have a difference in my Emacs Prelude setup on my private laptop and on my work laptop#2016-06-1407:36borkdudeWhen I do C-x f emacs doesn't do the same thing like removing the entire file name when I press backspace#2016-06-1407:37borkdudeor suggestions when pressing tab#2016-06-1407:37borkdudecould it be the Emacs version?#2016-06-1408:02escherizeI don't think so. I do know that after upgrading prelude recently, I and others have been unable to get helm-projectile-* to work, maybe related?#2016-06-1408:27borkdudedon't know. I'm using the exact same repo#2016-06-1409:40borkdudeC-x f is working again since I turned ido-mode on manually, but no suggestions when I type M-x#2016-06-1409:41borkdudeWhat I'm not having for example is: M-x rof RET executes recent-open-files#2016-06-1415:03malabarbaThat's not prelude nor ido #2016-06-1415:03malabarbaThough there could be a ton of packages that do stuff like that #2016-06-1415:03malabarbaSmex, helm, ivy... #2016-06-1415:30malabarba@escherize: That helm thing will be fixed soon. There's a PR open already but @bozhidar has gone awol 🙂#2016-06-1415:31bozhidarand by this you mean - he has so much work, he doesn’t have any time for OSS 🙂#2016-06-1415:31bozhidarI’ll take a look at this right now
#2016-06-1415:38malabarbaI know, I just thought some public shaming might remind you that OSS comes before all else#2016-06-1415:40escherizeSupreme thanks guys#2016-06-1415:40escherizebound it to C-p p s S so I'm only a little fucked up.#2016-06-1415:41escherizeits way passed my bedtime.#2016-06-1415:41escherizeThanks again for all ur work#2016-06-1419:42lvhmalabarba: Cool! Which PR? I reported that as an issue so I’ll link it#2016-06-1419:44lvhI filed: https://github.com/bbatsov/prelude/issues/1014#2016-06-1419:53malabarbaIt's merged already now. You can just update #2016-06-1500:16escherize🎉#2016-06-1500:16escherizeyay!#2016-06-1500:17escherizeas ~customers~ users it's great to see this level of ~customer~ support#2016-06-1508:19jan.zyHi, what are the advantages of running emacs in daemon mode?#2016-06-1508:22jan.zyI use it only on my laptop. I guess that it would make sense if I had a remote machine where I could run the daemon#2016-06-1508:46m1dnighthttps://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html#2016-06-1508:57jan.zyThanks!#2016-06-1508:57jan.zyas usual, I forgot that emacs has great docs#2016-06-1509:19m1dnightNo problem. I quickly configured it on y machine as well.#2016-06-1509:19m1dnightBit annoying on OSX, though.#2016-06-1509:26jan.zydo you run it as a system service?#2016-06-1509:26jan.zy[or however it is called]#2016-06-1509:31m1dnightYes#2016-06-1509:32m1dnightBut the problem is that now the Emacs thing in my dock is always on. Which I don’t really mind, but you can no longer start Emacs from that icon.#2016-06-1509:32m1dnightYou have to use emacsclient -c in the terminal#2016-06-1509:32m1dnightBut I open most files from there so no biggie really.#2016-06-1510:14jan.zyi turned off my dock 🙂#2016-06-1510:15jan.zyI hardly ever click any icons#2016-06-1510:15jan.zyi prefer to click cmd+space or just cmd when I am on ubuntu and use keyboard to find what i need#2016-06-1510:16jan.zyactually it works on windows as well#2016-06-1510:16jan.zyin Start menu#2016-06-1510:46m1dnightHrm, just noticed. When I do emacsclient -c file.ext it opens an Emacs instance immediately but it blocks the terminal#2016-06-1510:47m1dnightwhen I do emacsclient -c -nw file.ext it opens emacs in the terminal itself.#2016-06-1510:47m1dnightAnyone experience with that?#2016-06-1514:11hrathodemacsclient -n -c file.ext will not block the terminal.
-n, --no-wait		Don't wait for the server to return
#2016-06-1514:14plexus-nw will open a new emacs "frame" on the current terminal, in other words it connects to your running emacs#2016-06-1514:15plexusit's like C-x 5 2 except now the other frame is in in a terminal instead of a GUI#2016-06-1514:15hrathod-nw actually just means "no window", meaning use terminal#2016-06-1514:15hrathodright, what you said#2016-06-1514:15hrathodI can't read#2016-06-1514:15plexus🙂#2016-06-1514:15plexusI've used this sometimes when doing remote pairing with tmux/tmate#2016-06-1514:16plexusso we can share a (terminal) emacs, but I can still edit the same buffers with the GUI if some keybinding stuff isn't cooperating in the terminal#2016-06-1514:16hrathodI have emacsclient aliased to emacsclient -nc#2016-06-1514:17hrathodthat's a neat idea for pair programming#2016-06-1514:17plexusI have a shorthand nc for emacsclient -n. I rarely use more than one frame#2016-06-1514:17plexusexcept when recording screencasts 🙂 then I have one frame with the episode script, and one frame that I record#2016-06-1514:18hrathodI tend to use one frame per project (mostly small NodeJS projects)#2016-06-1514:18hrathodusually helps me keep them separated in my head, as they tend to have many files with the same name#2016-06-1514:49pastafarisince we’re on the topic of frames, i have this in my initializer (set-frame-font "Monaco-16" nil t)#2016-06-1514:50pastafaribut it doesn’t set the font for frames launched with emacsclient -nc, until i eval it, and then it works fine for subsequent frames.#2016-06-1514:50pastafariany clues?!#2016-06-1514:59malabarba>(set-frame-font FONT &optional KEEP-SIZE FRAMES) > If FRAMES is non-nil, it should be a list of frames to act upon, > or t meaning all existing graphical frames.#2016-06-1514:59malabarbaIt doesn't apply to future frames 🙂#2016-06-1515:00malabarbaThere are ways to set default frame parameters, including font, that apply to all frames#2016-06-1515:00malabarbaBut what I do is this: (set-face-attribute 'default nil :font "SourceCodePro Medium")#2016-06-1515:06pastafarimalabarba: Thanks. I did read that, but the behavior I see is that it DOES apply to future frames, once eval’ed explicitly.#2016-06-1515:06pastafariwhich has me confused :S#2016-06-1515:07pastafariim also using prelude#2016-06-1515:07pastafariwhich might have something to do with it...#2016-06-1515:10malabarbaWell. Once you eval it, it reapplies to all existing frames again. #2016-06-1515:11malabarbaOr are you saying that after you eval it it also applies to future frames? #2016-06-1515:18hrathodI use
(setq default-frame-alist '((font . "Source Code Pro-13"))
and it seems to work with emacsclient
#2016-06-1515:51pastafarimalabarba: yes it applies to future frames.#2016-06-1515:51pastafariwhich has me confused.#2016-06-1515:56plexusI asked the exact same question here a few months back 🙂 https://clojurians-log.clojureverse.org/emacs/2016-04-29.html#2016-06-1515:56plexus> zzamboni 18:13:31 > @plexus: I always use customize-face and choose default, from which most other faces inherit#2016-06-1516:04pastafariplexus: thanks, trying that. It generated a giant incantation to custom-set-faces#2016-06-1516:05pastafariI’m going to put that in init and see what happens!#2016-06-1516:05plexusYou can put something like this in your init#2016-06-1516:06plexus
;; Keep emacs customize settings in separate file
(setq custom-file (expand-file-name "emacs-custom.el" user-emacs-directory))
(load custom-file)
#2016-06-1516:06plexusthat way emacs-custom.el contains everything that's configured through customized. otherwize it adds that to .emacs/init.el which I'm not a fan of#2016-06-1516:07pastafariplexus: yes, thats what i do.#2016-06-1516:07plexus👍#2016-06-1516:07pastafariplexus: and it works!#2016-06-1516:07pastafariw000t.#2016-06-1516:07plexus\o/ all hail to emacs emacs 🎉#2016-06-1516:09pastafariplexus: i was in two minds about committing custom.el to source control. but i guess that makes sense.#2016-06-1516:11plexusyeah that's a normal thing to do. I'm still never sure what to configure through customize and what through good old setq and friends#2016-06-1605:24escherizeIs there a way to make smartparens/paredit/??? respect #'s in things like: #{1 2}#2016-06-1605:25escherize
()#{1 2}
 ^---cursor here

> Slurp Right

What I want:
(#{1 2})

What I get:
(#){1 2}
#2016-06-1623:25hrathod@escherize: try putting this in your init:
(sp-with-modes '(clojure-mode)
  (sp-local-pair "#{" "}"))
#2016-06-1623:46hrathodafter much editing.. I think that's correct#2016-06-1700:52escherizeThank you very much. #2016-06-1700:52escherize🙃#2016-06-1700:52escherizeI also added #(#2016-06-1701:01malabarba@escherize: would you like to file a PR adding that to Clojure-mode? #2016-06-1701:02malabarbaWe already have something like that for paredit. No reason not to support smart parens #2016-06-1703:31escherizeThat's a great idea. I'll make a note to do so when I'm back from vacation. (5 days) :)#2016-06-1707:53borkdudewhich package/command should I enable in emacs to get suggestions/autocompletion with M-x?#2016-06-1707:53borkdudeit always worked in my setup, but no longer#2016-06-1709:10maximsmex or helm#2016-06-1714:01hrathodhelm + projectile works really well for me#2016-06-1714:02hrathodprojectile for project related stuff, not for M-x, but thought I'd throw it out there#2016-06-1714:20squiterHelm, projectile and magit are the best packages in emacs in my opinion 😄#2016-06-1714:56plexusYou forgot nyancat #2016-06-1714:57plexusOr CIDER 😁#2016-06-1717:00squiterthese two are awesome too!! \o/#2016-06-1718:26hrathodMagit is truely the best Git interface#2016-06-1719:06rmuslimovI’d say cider makes with clj-refactor is more magic for me#2016-06-1719:08zaneCIDER with clj-refactor is great on the one day per month that I have it actually working.#2016-06-1719:53hrathod@escherize, @malabarba: I've created https://github.com/clojure-emacs/clojure-mode/pull/385 for initial integration with smartparens-mode#2016-06-1720:52malabarbaMerged. Thanks! #2016-06-1801:36dedduhello gentlemen#2016-06-1801:36dedduI’m relatively new to emacs#2016-06-1801:37dedduI have a small question that is driving me insane#2016-06-1801:37dedduI’ve set (global-set-key "\C-a" 'org-agenda) in init.el, and I can use that shortcut everywhere but inside ORG files#2016-06-1801:38dedduwhat am I doing wrong?#2016-06-1802:57deddubut (global-set-key "\C-ca" 'org-agenda) works 😐#2016-06-1802:57deddu¯\(ツ)/¯#2016-06-1807:16benedek@zane what are the failures you're seeing?#2016-06-1808:22jimmydoes anyone have experience with large text region being sent from one buffer to another and then the destination buffer shows this
^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G
and it stops working ...
#2016-06-1812:05malabarba@deddu: org mode rebinds C-a. So it's overriding your customization #2016-06-1812:07deddu@malabarba: thanks! it had to be something like that..#2016-06-1812:07deddubut then why C-a doesn’t do anything at all?#2016-06-1812:08dedduand despite this philosophical question#2016-06-1812:08dedduany clue where can I find the source code for the org bindings?#2016-06-1812:12deddubeing new to emacs, I must admit I feel an incredible satisfaction with all the keyword shortcuts . It’s like playing an instrument#2016-06-2309:47jonpitherIs there a dedicated slack for emacs?#2016-06-2309:48jonpitherI'm wondering why items I change from TODO to DONE still show up in my org-agenda?#2016-06-2314:40fgiasson@jonpither: I just use org-agenda to get the global list of tasks, but could you try to put it in the front of the agenda to see if it get updated? C-c [#2016-06-2315:48dhruv1@deddu: i belive you can do C-h k and then C-a#2016-06-2315:49dhruv1it’ll open up a *Help* buffer and you can see it’s description and also jump to the source file where it’s defined#2016-06-2315:56dedduthat’s pretty sweet#2016-06-2315:56dedduthanks#2016-06-2315:56deddu!#2016-06-2315:59dhruv1no worries.#2016-06-2316:00dhruv1@deddu#2016-06-2316:00dhruv1@deddu: C-h f (describe function) might also be useful#2016-06-2406:23escherize@jonpither: would "emacs people" use a non-free product?? Having said that, I'm also interested in such a slack!#2016-06-2406:49benedekPerhaps irc? ;)#2016-06-2408:26jonpither@fgiasson: I'd messed up the TODO states by redefining them at the top of the org-mode. Have changed this, and scheduled items that are DONE are no longer showing in org-agenda#2016-06-2412:29bendyHey all - I would think this would be a common question, but I can’t seem to find an answer online. Is there a plugin/elisp enippet that anyone knows of to jump to and from the test file for a given namespace? I’ve manually switched the buffer so many times I feel like there has to be a more developed solution 😆#2016-06-2412:55bruceadamsC-c p t runs the command projectile-toggle-between-implementation-and-test#2016-06-2412:56bruceadams(That was a reply to @bendy: C-c p t …)#2016-06-2412:56bendywow#2016-06-2412:56bendythe amount of time I could have saved!#2016-06-2412:57bendyhaha that’s awesome, thanks! glad I asked#2016-06-2414:31dhruv1i constantly get this errorr: (error "Required feature 'eval-sexp-fu' was not provided”)#2016-06-2414:33dhruv1here is how i’m setting it up:
(use-package eval-sexp-fu
  :init (custom-set-faces '(eval-sexp-fu-flash ((t (:foreground “blue" :weight bold))))))
#2016-06-2603:35seyleriusHrm. Which makes sense for converting *foo* /bar/ from org-mode to HTML: <b>foo</b> <i>bar</i> or <strong>foo</strong> <em>bar</em>? (I'm working on improving organum with inline parsing and output rendering capabilities)#2016-06-2606:15m1dnightMaybe not what you are asking at all, but just throw a class around it and define it in the CSS later on?#2016-06-2616:32seylerius@m1dnight: Lolnope. Not what I'm asking. Thanks, though. The question is what tags to wrap these things in, classed or not, to mark them.#2016-06-2618:13m1dnightWell yeah, I was thinking about <span class=star></span> or something in that line.#2016-06-2618:13m1dnightBut whatever 😛#2016-06-2818:58vinnyataidehello, I've tried to enable to make my terminal clojure enabled so I've enabled clojure-mode but I can't disable right now, I'm in a shell command window. How can I disable it? I cant send my commands through enter or ctrl j#2016-06-2820:14rmuslimov@vinnyataide: if I understand you correct, just calling ‘M-x clojure-mode’ will solve the issue.#2016-06-2821:11vinnyataide@rmuslimov It doesnt#2016-06-2821:47hrathod@vinnyataide: Are you in an eshell window? or a shell-mode window? Or something else?#2016-06-2821:48vinnyataide*Async Shell Command* window#2016-06-2821:50hrathodso started with something like M-! to run a command?#2016-06-2903:12vinnyataide@hrathod: yeah with an & in the end#2016-06-2908:22zzamboni@vinnyataide: you cannot "disable" a major mode because every buffer needs one, rather you switch to the mode you want#2016-06-2908:27zzamboniso, e.g. if you want to switch to eshell-mode, you just do M-x eshell-mode#2016-06-2914:15hrathod@vinnyataide: I think you are looking at the output of the command that was run. I am not sure if that buffer should be used to do input/output.#2016-06-2914:37vinnyataide@zzamboni: thanks man ❤️ #2016-06-2914:38vinnyataide@hrathod and how I could proceed with a figwheel script that I run with clojure main? I dont see this option with cider#2016-06-2914:45hrathodI am not a figwheel expert, but I think that lein figwheel and then editing files was the normal workflow#2016-06-2914:46hrathodthe changes should then show up in the browser#2016-06-2917:36plexus@vinnyataide: you have a couple options for using figwheel from Emacs, from simple to complex: 1) run lein figwheel in a terminal outside Emacs 2) run lein figwheel with inf-clojure (don't use CIDER) https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-with-Emacs-Inferior-Clojure-Interaction-Mode 3) use CIDER to start a REPL (e.g. cider-jack-in), in the REPL launch figwheel with the figwheel-sidecar api https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl 4) configure CIDER so it knows how to start a cljs browser REPL through Figwheel, now you can use cider-jack-in-javascript https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#integration-with-emacscider#2016-06-2917:42plexus1) is the easiest, you need zero extra setup, it always works, but you don't get any fancy editor integration 2) is I think what the Figwheel author uses (or at least recommends), it's simple because it avoids nREPL. You can evaluate ClojureScript forms, but nothing fancy like looking up documentation or autocomplete 3) gives you all the cool CIDER stuff (and clj-refactor if you like) plus a Figwheel based browser REPL. Downside: you need a bit more setup, include figwheel-sidecar. Another "downside": you only get one REPL, so you have to choose between having a Clojure REPL or having a Figwheel REPL 4) gives you everything that 3) has, but with separate Clojure/ClojureScript REPLs, so you can evaluate forms in clj/cljs files and it will go to the right REPL. This is also the setup where there is the most that can go wrong#2016-06-2921:34jasonjcknhow do I check if cider-load-buffer succeeded without exceptions?#2016-06-2921:34jasonjcknafaik it always returns nil#2016-06-3004:28malabarba@jasonjckn: the evaluation commands are asynchronous. They don't return anything relevant. What is it you're trying to do? #2016-06-3022:53jasonjckn@malabarba: turns out I was looking for cider-refresh#2016-06-3023:03vinnyataideis there any format file command?#2016-06-3023:05vinnyataidefound it, its c-m-\#2016-07-0414:41dhruv1this is the output I see when I exectue the function describe-personal-keybindings C-c C-o `cider-repl-clear-buffer’ but when i execute C-c C-o it doesn’t do anything can anyone tell me how I can debug this? I don’t see any messages in the *Messages* buffer#2016-07-0710:44munen@dhruv1: You can check what your command is bound to by using the self-documentation feature of Emacs! Hit ctrl-h c for “Describe command” and then your combo C-c C-o. Depending on what mode you’re running it will give you different information for example that the keybinding is undefined.#2016-07-0714:16dhruv1@munen: I use ctrl-h k which prompts me to enter the key-binding ctrl-c ctrl-o. it opens up a new buffer with the description/documentation of the key-binding and where it’s defined#2016-07-0714:18dhruv1the problem I’m having is I’m trying to override the default keybinding in cider. I am using use-package and using the :bind option to do it. For some reason it’s not over riding the keybinding defined in the cider package.#2016-07-0808:04crocketHow can I make ~/.emacs automate package installation on the first startup without executing package-refresh-contents every time?#2016-07-0808:05crocket
;;; ~/.emacs
(package-initialize)
(package-refresh-contents)

;;; magit
(package-install 'magit)
#2016-07-0808:06crocketWhen I execute emacs for the first time, (package-install 'magit) fails without (package-refresh-contents).#2016-07-0808:06crocketAfter executing (package-refresh-contents) once, I don't have to execute it again in ~/.emacs.#2016-07-0808:07crocketHow can I make ~/.emacs execute (package-refresh-contents) only once?#2016-07-0808:11crocketHow can I check the presence of ~/.emacs.d/elpa/archives?#2016-07-0808:19crocketI guess this does the job.
(if (not (file-exists-p "~/.emacs.d/elpa/archives"))
    (package-refresh-contents))
#2016-07-0809:11m1dnighthttps://bitbucket.org/m1dnight/.emacs.d/src/8e4ae6da37a25267c2c38417dc9400e5401db9be/init.el?fileviewer=file-view-default#init.el-6:118#2016-07-0809:12m1dnightThat is what I have for automatic installation of packages#2016-07-0810:25munen@dhruv1: I am not aware of the use-package :bind option. The way, I'd bind a key when in cider-mode is this: (define-key cider-mode-map (kbd "RET") 'tab-to-tab-stop) Of course this is a ridiculous keybinding that I would not recommend(; However the syntax works!#2016-07-0813:48dhruv1@munen awesome! thank you. ill give this a shot if nothing else works#2016-07-0814:44munen@dhruv1: You're welcome!^^#2016-07-1221:17radonDoes anyone know how to make emacs indent properly when using a keyword as a function? What I’ve got currently is:
(some-function
  arg
  args)

(:some-function
 arg
 args2)
This comes up frequently with reader conditionals.
#2016-07-1221:46malabarbaThat's what I'd call proper. :-)#2016-07-1312:59kevin42Hello, does anyone knows if there’s a way to have the fringe margin when running emacs in a console?#2016-07-1313:00kevin42It works in the GUI but not in text mode. I’m not sure if it’s possible. Maybe something else can emulate it? Thanks 🙂#2016-07-1313:01radon@malabarba: Well, I now realize that the indentation is obviously correct for reader conditionals, because in that case the keyword isn’t a function, but is there a way to tell emacs to indent keywords-used-as-functions the same way as regular functions?#2016-07-1313:05malabarbaI'm confused #2016-07-1313:05malabarbaMaybe my browser is swallowing one of your spaces #2016-07-1313:05radonI’d like
(:some-function
  arg1
  arg2)
#2016-07-1313:05malabarbaIt looks like that's exactly what you have #2016-07-1313:05radonCurrently I have
(:some-function
 arg1
 arg2)
#2016-07-1313:05radonI.e. I have only one space of indentation and would like two.#2016-07-1313:06malabarbaGah. My browser is definitely small something. Both examples look the same to me #2016-07-1313:06radon😛#2016-07-1313:06malabarbaBut I see what you mean now #2016-07-1313:06malabarbaHehe #2016-07-1313:07malabarbaI'll have to recheck the code for that #2016-07-1313:07radonMy silly workaround is to add each keyword individually to the define-clojure-indent call in my init-file, but of course a regex-based solution would be more tenable in the long-term 😛#2016-07-1318:27radonSometimes when I press C-c C-k to compile a Clojure file, if there’s also a *cider-doc* buffer visible, the doc buffer closes, I get the error Wrong type argument: stringp, nil in the minibuffer, and the file isn’t compiled. Has anyone happened to run into this before?#2016-07-1318:27radon(Well, I assumed the file wasn’t compiled. I should actually check that.)#2016-07-1318:29radonIt’s erratic, and I haven’t been able to find a consistent reproducible case yet.#2016-07-1408:29weiwhat’s the simplest way to connect to a socket repl from emacs?#2016-07-1408:47benedekafaik cider does not have socket repl support yet. i would try with inf-clojure#2016-07-1408:48benedekhttps://github.com/clojure-emacs/inf-clojure#2016-07-1408:57weihow does inf-clojure have support but cider not? aren’t they both by the same author?#2016-07-1408:57weii do prefer inf-clojure though for its simplicity#2016-07-1409:03benedekcider needs a middleware (essentially clojure code backend) to do the smart stuff. that is packaged atm as an nrepl middleware#2016-07-1409:04benedekinf-clojure does not need a middleware (clojure code backend) as it is much, much simpler#2016-07-1409:04benedeksame author: indeed, afaik inf-clojure was specially created for those who rather go for simplicity over more features#2016-07-1409:14weihow do I specify which port to connect to in inf-clojure? didn’t see that in the doc#2016-07-1409:22weigot it, specified inf-clojure-mode-program#2016-07-1409:23wei
(setq inf-clojure-program "telnet localhost 7888”)
#2016-07-1601:47weiwhat’s a good way to redefine some of the inf-clojure shortcut keys? my elisp is weak..#2016-07-1602:34maxim@wei
(require 'inf-clojure)
(define-key inf-clojure-mode-map (kbd "C-j") 'delete-indentation)
#2016-07-1608:20wei@mkaschenko: thanks! works for me.#2016-07-1814:14anmonteirowhat’s the setq equivalent for faces?#2016-07-1814:14anmonteiroor is it also setq?#2016-07-1814:14anmonteirowhat I want to achieve is change the color for this face: https://github.com/dgutov/diff-hl/blob/master/diff-hl.el#L81#2016-07-1814:18anmonteiroI probably want set-face-attribute#2016-07-1900:20malabarbaYep 😉 #2016-07-1909:13plexuswhat are the main benefits of using inf-clojure over inferior-lisp?#2016-07-1909:13plexus(besides not having to set up your own keybindings) 🙂#2016-07-1909:34plexusto answer my own question, inf-clojure has a lot of clojure specific commands that send some code to the REPL behind the scenese, like macroexpand-1 or doc, so it mimics some of CIDER's capabilities#2016-07-1913:15mikepjbIs not having to setup your own keybindings really a benefit to most emacs users? 😉#2016-07-2118:08vermasometimes when I am editing code I need to peek at a function and then get back to what I was doing, is there a good way of doing this without having to switch files or scroll up and down and then jump back to point I was editing at?#2016-07-2119:20niamu@verma: There are probably way better ways to do this… C-u C-SPC may work for you. Set a mark with C-SPC first and then you can use C-u C-SPC to go back to where you were.#2016-07-2119:37vermaah, thanks @niamu#2016-07-2119:38vermaI use evil-mode so I kind of have a way to set a marker, may be I should use it more often 🙂#2016-07-2119:39vermaI think there’s a M-. to jump to definition that will help with it I would think#2016-07-2119:39radonM-* jumps back after M-. iirc#2016-07-2119:39vermaooh nice#2016-07-2119:39verma@radon: do you know which actual cider function it calls? .. seems like I have a conflict in evil-mode#2016-07-2119:39radonIn my setup I have C-x <left> bound to previous-buffer.#2016-07-2119:39radonThat’s pretty foolproof.#2016-07-2119:40radonOh… just a sec.#2016-07-2119:40radonpop-tag-mark#2016-07-2119:40radonIt’s from etags.el.#2016-07-2119:40vermaah ok#2016-07-2119:40vermatrying!#2016-07-2119:41radon
M-, runs the command tags-loop-continue
also seems to do a similar thing.
#2016-07-2119:41verma“No previous locations for find-tag invocation"#2016-07-2119:42radonDid you previously M-.?#2016-07-2119:42vermajust did it on a new symbol#2016-07-2119:42radonWhat do you mean?#2016-07-2119:42vermaI moved my cursor onto a function invocation and hit M-.#2016-07-2119:42vermajump to definition according to cider-docs#2016-07-2119:43radonAnd that worked, and pressing M-* immediately after doesn’t?#2016-07-2119:43vermawell, my M-. is bound to something else from evil, so I interactively invoked the command#2016-07-2119:43radonYou might have to enable something… I’m using https://github.com/RallySoftware/rally-emacs and unable to debug why it might not be working for you.#2016-07-2119:44vermaah, no problem#2016-07-2119:44vermaI will take a look at it, thanks for your help#2016-07-2420:22richiardiandreahello folks is there a place where https://elpa.gnu.org/packages/let-alist.html is stored as git repo? I don't seem to find it anywhere @malabarba#2016-07-2420:26malabarbaThere's a repo for submitting bugs#2016-07-2420:26malabarbabut the main development is done directly on Elpa#2016-07-2420:27malabarbaWait, now I can't find it either#2016-07-2420:28malabarbamaybe I deleted it and don't remember. 😳#2016-07-2420:30malabarbaAnyway, is there any reason you need the repo? @richiardiandrea#2016-07-2420:52richiardiandreano well it a dep of squggly-clojure and my setup uses submodules...in any case I can just copy the files no probz 😄#2016-07-2420:52richiardiandrea@malabarba: ^#2016-07-2420:53malabarbaOk#2016-07-2420:53malabarbathough I think I mispoke. The actual source is in Emacs core#2016-07-2420:53malabarbalisp/emacs-lisp/let-alist.el#2016-07-2420:54malabarbaThe elpa package is just a mirror#2016-07-2420:57richiardiandreaOh cool I like the fact that a lot of packages have a GitHub mirror#2016-07-2420:58richiardiandreaSubmodules really work well in my setup which is basically emacs-live#2016-07-2421:08malabarbaWell, I remember Tarsius was creating github mirrors for basically everything a while back#2016-07-2421:09malabarbaSo there might be a mirror for this package too#2016-07-2421:09malabarbaLook for a github user/organization called emacs-mirrors#2016-07-2422:25richiardiandrea@malabarba: is let-alist now included in emacs? https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/let-alist.el#2016-07-2422:26richiardiandreayeah it looks like it is in 25.x#2016-07-2422:28malabarbayep#2016-07-2422:29malabarbaIt's in 25.x, and it's available on Elpa for older Emacs versions#2016-07-2422:29richiardiandreaso I am going to need to keep that file around for not too long good 😄#2016-07-2422:29anmonteiro@richiardiandrea: FWIW, if you want to install emacs from HEAD I’ve been keeping a fork that works on macOS Sierra https://github.com/anmonteiro/emacs#2016-07-2422:30richiardiandrea@anmonteiro: lol I am keeping my fork of emacs-live as well#2016-07-2422:30anmonteiroto install just brew edit emacs to point to my repo and brew install emacs --HEAD --use-git-head --with-cocoa --with-gnutls --with-rsvg --with-imagemagick#2016-07-2422:30richiardiandreabut thanks for the offer 🍻#2016-07-2523:47cdinehow do I clear off a breakpoint in cider?#2016-07-2600:07jasonjcknreevaluate the code#2016-07-2600:47cdinere-evaluating the source func would clear the break point in the func??#2016-07-2613:29crankyadminHi, I'm setting (global-set-key (kbd "C-x b") #'helm-buffers-list) in my emacs config. But it never honours it and just shows me the built in buffer list. What I'm I missing (I have eval'd it and restart emacs).#2016-07-2613:33crankyadminIgnore me. I'm being a idiot! Meant to remap C-x C-b#2016-07-2614:01dpsuttonbeen there lol#2016-07-2701:02malabarba@cdine: reevaluating the source replaces the old (instrumented) definition with a new (clean) definition #2016-07-2701:02malabarbaEffectively clearing the breakpoint #2016-07-2701:19cdineThanks.. Will check it out wen I get back to work...#2016-07-2814:57robertoI’m using vanilla emacs, and I’d like to “expand the minibuffer”. It is kind of annoying, especially when searching for a file in a directory and the list is truncated, or when typing a command to run and the list is truncated, but I can’t remember the name and would like to scroll through the list.#2016-07-2814:58radon@roberto: https://tuhdo.github.io/helm-intro.html#2016-07-2814:58radonI couldn’t live without helm-projectile.#2016-07-2814:58robertocool, thanks#2016-07-2814:59radonMy init-file is at https://github.com/raxod502/dotfiles/blob/master/.emacs.d/init.el. You can search for “helm” to see how I’ve set things up, if you would like.#2016-07-2815:00robertocool#2016-07-2815:00robertohelm-projecticle is nice#2016-07-2815:01robertobut my mini-buffer is still tiny for other things 😞#2016-07-2815:01radon
(helm-mode 1)
#2016-07-2815:02radonPlus there’s helm-M-x, although I use helm-smex personally.#2016-07-2815:03robertoah, nice#2016-07-2815:03robertothanks#2016-07-2815:03radonnp#2016-07-2815:03radonMore information at https://github.com/emacs-helm/helm#helm-applications.
#2016-07-2815:04dpsuttoncan you try setting a max height and resize-mini-windows to nil?#2016-07-2815:59robertosetting those variables doesn’t work for me#2016-07-2816:00dpsuttonbummer.#2016-07-2918:58ccannAnyone know how to jump the cursor to the next (defn form in the buffer?#2016-07-2919:34ag<C-M-e>#2016-07-2920:15richiardiandreawhich package folks use for emacs and Java dev work? I know I should know utter the J word here, sorry about that 😁#2016-07-2923:58markhdavidWondering why in my emacs with clojure mode and cider running, the default binding for meta-q is fill-paragraph. I'd have thought it would be lisp-fill-paragraph (defined, reasonable default) or even clojure-fill-paragraph (not defined, could be specialized for clojure)? Anyone know? Is there a better topic for this?#2016-07-3006:30benedek@richiardiandrea: I used jdee ages ago and recently it got revived. Have not tried the new version but it worths I try I think#2016-07-3013:26andrea.crotti@richiardiandrea: https://www.reddit.com/r/emacs/comments/3wovee/what_modes_should_i_use_for_java/cxzidbx#2016-07-3015:33richiardiandreaThanks guys, there is also a malabar-mode, wondering if our friend Malabarba is the author ;)#2016-07-3017:52malabarba@richiardiandrea: oddly enough, that's just a coincidence 😄 #2016-07-3115:47lmergenfor the people that work under osx, what is the emacs build you use ? is aquaemacs anything ? or should i just run vanilla emacs ?#2016-07-3115:48radonhttps://emacsformacosx.com/#2016-07-3115:50lmergenright, that’s pretty much the same as i get with brew install —with-cocoa —srgb emacs, right ?#2016-07-3115:51radonNot sure; if you want more information (and a second opinion) try https://emacs.stackexchange.com/questions/271/what-is-the-difference-between-aquamacs-and-other-mac-versions-of-emacs.#2016-07-3115:52radon"If you just want Emacs without any complications: Emacs for Mac OS X” — I personally haven’t had any problems with it.#2016-07-3115:52lmergenright, yeah, i found that, i just wanted to hear other people’s rationale to use a specific version#2016-07-3115:56bruceadamsI use brew install emacs with some options (that I don’t remember 😦). My hope is that Homebrew will do a good enough job of keeping Emacs up to date, without my having to think about it.#2016-07-3116:06lmergenyes that’s what i was thinking to do as well#2016-07-3116:07lmergenand to keep my emacs environment as similar as possible to my non-osx desktops#2016-07-3116:07radonThat’s a valid point, but if you want to set up Emacs in the same way on non-OSX systems, you couldn’t use brew, right?#2016-07-3116:08lmergenright, so that statement was mostly related to using vanilla emacs, rather than aquamacs or something#2016-07-3116:33lmergenapparently osx is stealing my ctrl+up and ctrl+down etc keys#2016-07-3116:33lmergenhmz#2016-07-3116:33radonAre you using Emacs through the terminal, or through the GUI app?#2016-07-3116:33radonBecause if you’re going through the terminal, you’re going to have a whole mess of keybinding and colorscheme errors to sort through.#2016-07-3116:34radonThat’s not OSX specific, as far as I know.#2016-07-3116:34lmergennah, i’m using cocoa#2016-07-3116:34radonHuh. What do ctrl+up and ctrl+down do?#2016-07-3116:35lmergenthey provide some kind of application switcher#2016-07-3116:35lmergenit seems to be multi-desktop feature or something#2016-07-3116:35radonOh yeah, that’s just in System Preferences > Keyboard.#2016-07-3116:35lmergenshortcuts probably#2016-07-3116:35radonExtremely useful, by the way—couldn’t live without multiple desktops, but I use the trackpad gestures instead.#2016-07-3116:36lmergenright, this is exactly my current dilemma 🙂#2016-07-3116:37lmergenwell let’s first disable it, get myself set up completely with osx, and then start experimenting with fancy stuff#2016-08-0315:28akivaAnyone here using/used Deft? Running into an issue with Deft showing multiple entries after a note is modified. I’m going to do some searches later but I figured I’d query here as well.#2016-08-0315:31akivaIt clears up if I do deft-refresh but I’d rather not have to do that after each edit.#2016-08-0319:50chrisemacsforosx is not exactly the same as brew install emacs —with-cocoa#2016-08-0319:51chrisfor one, it has much smoother scrolling, but I had problems with it hijacking my option key and using it as a compose rather than meta#2016-08-0319:51chrisso M-a would give å#2016-08-0319:52chrisso, I went back to regular brew emacs on —devel#2016-08-0319:52radon(You probably know this, but that’s functionality provided by OSX, not emacsormacosx.)#2016-08-0319:52chrisI just couldn’t figure out how to turn it off and I never really tried#2016-08-0319:53chrisbrew emacs was good enough ¯\(ツ)/¯#2016-08-0319:54radonHm. I use emacsformacosx, and I didn’t have to configure anything to get Meta to work properly. I wonder why it doesn’t work for you.#2016-08-0319:54radonOh, well. ¯\(ツ)/¯#2016-08-0319:54chrisI think I was supposed to do something like (setq mac-option-key ‘meta) or something, but oh well#2016-08-0319:55radonI haven’t done anything of that sort—of course, if you use a terminal emulator, you have to tell it to interpret Alt as Meta.#2016-08-0319:55radonWith the GUI version you shouldn’t have to do that.#2016-08-0319:55akivaWhich one of those is the railwaycat one? That’s the version that has worked best for me.#2016-08-0319:55chrisrailwaycat is emacsforosx#2016-08-0319:55akivaAh. That one has been most reliable.#2016-08-0319:56akivaFor awhile, it was incredibly crashy but I think that might have been Spacemacs.#2016-08-0319:57radonI’ve never had any problems with emacsformacosx—it worked right out of the box for me, but YMMV.#2016-08-0319:58akivaYeah, I assume it was Spacemacs. I got into that early on and it was a bit of a beast until 1.0.#2016-08-0413:34jan.zyHow can I enable syntax highlighting in whole length of a line#2016-08-0413:34jan.zyThese magenta characters at the end of long lines are confusing#2016-08-0413:34jan.zyIt’s Prelude#2016-08-0413:35jan.zySummoning @bozhidar 😉#2016-08-0413:37niamuLooks like you have some rules set up for colors past the 80 character limit.#2016-08-0413:37jan.zyyeah, default Prelude rules 🙂#2016-08-0413:39niamuThis is where you’ll want to look to disable that. https://github.com/bbatsov/prelude/blob/555abd9a2fe3f55a0cb35d4b58f54d6cc32cebc6/core/prelude-editor.el#L346#2016-08-0413:40niamuMy guess is that if you simply redefine it to not include lines-tail it will solve your problem.#2016-08-0413:40lvh^#2016-08-0413:40lvhyou probably want to keep the other ones 🙂#2016-08-0413:41lvhalso you can reconfigure the font locking to just do a background instead of also front#2016-08-0413:42lvhProbably some useful emacs to learn: type such a long line, go on the thing you don’t like how it’s colored#2016-08-0413:42lvhM-x describe-char#2016-08-0413:43lvh
There are text properties here:
  cider-locals         [Show]
  face                 (whitespace-line)
  fontified            t
  help-echo            cider--help-echo
#2016-08-0413:43lvhclick on whitespace-line, it will take you to the part where you can configure it 🙂#2016-08-0413:43lvhit is probably themed#2016-08-0413:43jan.zy@niamu:
(setq whitespace-line-column 160)
fyi, it didn’t help
#2016-08-0413:43bozhidarhehe#2016-08-0413:43bozhidarseems you don’t really need me#2016-08-0413:43lvh@jan.zy: that is not the part you want to configure (also probably not setq)#2016-08-0413:43bozhidar🙂#2016-08-0413:44lvhif you just want to see it go away, M-x whitespace-mode, but as we discussed some parts are useful 😉#2016-08-0413:44jan.zyI am pretty sure that there is one var where I can pick another number#2016-08-0413:45jan.zyok, I am in a whitespace-line#2016-08-0413:45bozhidarhttps://github.com/bbatsov/prelude/blob/555abd9a2fe3f55a0cb35d4b58f54d6cc32cebc6/core/prelude-editor.el#L347#2016-08-0413:45lvhif you just want the whitespace highlighting for long lines to be less obtrusive, change the face; if you don’t want it at all, change what whitespace-mode highlights on, if you actually just want it to complain at 160….#2016-08-0413:45jan.zy
Face: whitespace-line (sample) (customize this face)

Documentation:
Face used to visualize "long" lines.

See `whitespace-line-column'.

Defined in `whitespace.el'.

           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: unspecified
            Slant: unspecified
       Foreground: #DC8CC3
DistantForeground: unspecified
       Background: #3F3F3F
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
          Inherit: unspecified

[back]

#2016-08-0413:45bozhidaryeah, this is what you want to change#2016-08-0413:45lvh“customize this face"#2016-08-0413:45bozhidarmaybe you even want to disable this#2016-08-0413:45jan.zyI just want to disable it#2016-08-0413:45bozhidarbasically you just need a setq in your personal config#2016-08-0413:46bozhidaror you can also disable whitespace mode#2016-08-0413:46lvh@jan.zy: entirely, or just for long lines#2016-08-0413:46lvh@bozhidar: I would expect that to live in customize#2016-08-0413:46jan.zyjust for long lines#2016-08-0413:46bozhidarhttps://github.com/bbatsov/prelude/blob/74b2b766180793409df77d65b8bf0115f3df45f4/README.md#disabling-whitespace-mode#2016-08-0413:47bozhidarit lives there, but I never use customize#2016-08-0413:47bozhidarI hate its horrible UI#2016-08-0413:47bozhidarand prefer to simply set stuff with setq#2016-08-0413:48jan.zyso if i want to disable whitespace highlighting for long lines only then I should customize the whitespace-line face?#2016-08-0413:49jan.zyjust making sure if i understood you correctly#2016-08-0413:49lvh@jan.zy: No; I thought what you were asking was about not breaking syntax highlighting#2016-08-0413:49lvhif you just want it to be e.g. a lighter background, but still tell you, then you want to customize the face#2016-08-0413:50jan.zyah, i see the difference.#2016-08-0413:50lvhif you just want to disable that portion of whitespace-mode, see bozhidar’s link, or customize that#2016-08-0413:51jan.zybozhidar’s link tells how to disable whitespace mode completely and i would like to disable only this one feature 🙂#2016-08-0413:51jan.zyok, I’ll just take a closer look at the source code#2016-08-0413:53jan.zyahh
(setq whitespace-line-column 1000)
this one works, I just had to reload a file
#2016-08-0413:53jan.zythanks for help !#2016-08-0413:55lvh@bozhidar: I wonder if that’s why I can’t seem to get customize to actually honor my customization for that face#2016-08-0413:55lvhoh, wait, you don’t set whitespace-line-face#2016-08-0413:55bozhidar@jan.zy: you could have also re-evaluated this sexp with C-M-x#2016-08-0413:59jan.zyI did that but I had to reload the file anyway#2016-08-0413:59lvhI go into customize, change the face, save, nothing changes, close customize, go back to the highlighted char, describe-char — customize has the foreground color in the face again#2016-08-0414:02lvhhuh, I didn’t realize themes could take precedence over customizations#2016-08-0414:02lvhI mean, apart from the obvious “themes are lisp code so they do whatever they want"#2016-08-0514:54chrisanyone else have a problem with emacs where it just stops responding to emacsclient? emacs still works but trying to connect to the frame with emacsclient just hangs until it’s canceled#2016-08-0514:54chrisI’m on OSX, if that helps#2016-08-0514:55chrisI’m at a loss here because it doesn’t happen often but the only recourse is to restart emacs. I’m not even sure how phrase this question to google#2016-08-0514:56chrisI’m connecting with emacsclient -n pom.xml#2016-08-0514:56chrisif I try to run a term instance in these cases it opens and then shuts almost immediately#2016-08-0515:24niamuI have only ever run into that problem when I evaluate something in Cider that causes Emacs to lock up.#2016-08-0515:35sarcilavI got a similar problem when I upgraded to “El Capitan”, the problem was that the system were using the default emacsclient that OSX provides that is way-way-way older than my emacs and I was not able to connect, and after each system update it seems like my aliases and emacsclient are replaced by the default OSX#2016-08-0515:53chrishmm well that’s too bad, I’ve already checked to make sure emacsclient is the correct one, thx though#2016-08-0609:06dottedmag@sarcilav: I have resigned to have emacs and emacsclient symlinks in $HOME/bin long time ago, otherwise it's a nightmare.#2016-08-0621:07sarcilav@dottedmag: thanks for the tip, have not try that solution#2016-08-0722:33anmonteiroany reason pop-to-buffer would be creating a new frame in my emacs?#2016-08-0722:33anmonteiroand what would be the solution to stop it from doing that?#2016-08-0722:34anmonteiroI don’t want new frames to be created, preferably just split windows#2016-08-0722:35radonThat doesn’t sound like default functionality. Are you using a pre-configured setup like Spacemacs or Prelude?#2016-08-0722:35anmonteironope#2016-08-0722:35radonWhich Emacs distro and OS?#2016-08-0722:36anmonteirohrm#2016-08-0722:36anmonteiroI’m using macOS Sierra#2016-08-0722:36anmonteiroand emacs master 🙂#2016-08-0722:37radonI thought Sierra was not released yet?#2016-08-0722:37anmonteiroI don’t really know how to repro it, it really only happens in certain cases#2016-08-0722:37anmonteiroyeah, it’s the public beta#2016-08-0722:37radonAh, OK.#2016-08-0722:38anmonteirospecifically in haskell interactive mode#2016-08-0722:39radon
C-h f pop-to-buffer
#2016-08-0722:39radon
If the window to show BUFFER is not on the selected
frame, raise that window's frame and give it input focus.
#2016-08-0722:39radonIt sounds like the buffer is on a different frame to start with, and pop-to-buffer is just respecting that.#2016-08-0722:39radonYou would want to look at whatever is creating the buffer, probably.#2016-08-0722:49anmonteiroactually the problem seems to be switch-to-buffer-other-window#2016-08-0923:13aengelbergHow could I change my emacs config so that the namespaces get indented like so:
(ns my.ns
  (:require
    [my.lib :as l])
  (:import
    my.Class))
instead of
(ns my.ns
  (:require
   [my.lib :as l])
  (:import
   my.Class))
#2016-08-1005:30escherize@aengelberg: maybe you want (put-clojure-indent :require 0)#2016-08-1005:31escherizealso, define-clojure-indent takes a list of size-2-lists, like:
(define-clojure-indent
    (defroutes 'defun)
    (GET 2)
    (POST 2)
    (PUT 2)
    (DELETE 2)
    (HEAD 2)
    (ANY 2))
#2016-08-1006:44lowl4tencywrong channel 😄#2016-08-1016:04radonDoes anyone know a way to specify define-clojure-indent for every keyword at once? I don’t want to have to put (:keyword 0) as a separate entry for every single keyword I use as a function in my code.#2016-08-1115:27richiardiandrea@radon: @aengelberg I recently fixed clojure-mode together with Malabarba for lambdas with value 0, I am using it in re-frame as in this issue: https://github.com/clojure-emacs/clojure-mode/issues/383#2016-08-1116:01radon@richiardiandrea: Does this fix my problem? It seems like, even with this change, you can only specify a function for the indentation rule, and not for the symbol.#2016-08-1116:21richiardiandreaOh sorry @radon I misread your problem, which I think this does not solve I guess...#2016-08-2116:18bozclj-refactor is very cool#2016-08-2117:28plexusAffirmative! #2016-08-2415:08benedekTake a look at @AnnaPawlicka's Tweet: https://twitter.com/AnnaPawlicka/status/768143289006559232?s=09#2016-08-2415:09benedeksry wrong channel, altho fits here too ;)#2016-08-2416:23mikepjbdoes anyone know how to open inf-clojure as a split?#2016-08-2416:23mikepjbcider/inf-ruby/inf-python on first launch will create a split on the current frame#2016-08-2516:48jcsimsany tips on investigating a hard freeze in emacs? (i.e. it requires a force kill after a repeatable action)#2016-08-2517:01jcsimsinteresting - it was related to the Fira Code ligature changes linked above#2016-08-2517:02jcsimsspecifically, helm-ag while using that font and the ligatures#2016-08-2521:34richiardiandreaInteresting thanks for sharing!#2016-08-2522:02ag@jcsims do you have helm-follow-mode on? in helm if you press C-c C-f? That makes Emacs freeze sometimes#2016-08-2522:03jcsimsI reproduced it consistently with just using helm-ag and typing enough characters to start the search. Before anything was displayed, it froze each time#2016-08-2522:03jcsimssimply change away from that font removed the issue#2016-08-2600:39maxim@jcsims This helps but not always 🙂 pkill -SIGUSR2 emacs http://irreal.org/blog/?p=4763#2016-08-2615:25jcsims@mkaschenko thanks, I’ll try to remember that for next time!#2016-08-2711:40hlolliIs there any way that emacs can auto escape when yanking a string, so that all " become \" ?#2016-08-2711:43jethroksy@hlolli: in what scenario would you like strings to autoescape?#2016-08-2711:43jethroksyThere's string-edit#2016-08-2711:44jethroksyhttps://github.com/magnars/string-edit.el#2016-08-2711:44hlollino probably not, maybe select range and do M-x some-fn#2016-08-2711:44jethroksyBut it doesn't do it unless you're in string-edit#2016-08-2711:44jethroksyI think Emacs has an escaping function #2016-08-2711:44hlolliah ok, that would work, hope theres something else available. Ok.#2016-08-2711:45jethroksySo the select range thing should work already#2016-08-2711:46hlolliI have org-escape-code-in-region, didnt do the trick. Well, I manually escape it this time with regex-replace 🙂#2016-09-0314:07hlolliis there any emacs equivalent to (atom {}) in clojure?#2016-09-0314:07hlollimutable hashmap there is to say#2016-09-0314:21chrisAn alist#2016-09-0316:27cvbalist or actual hash table which could be made with make-hash-table will work, they are mutable in elisp, and emacs work in single thread so you don't need sync tools like swap for atom#2016-09-0511:11biscuitpantsis it possible to tell clojure-mode not to ident after a certain symbol?#2016-09-0511:12biscuitpantssay, for instance, in the following form:
(defc my-thing < something
                             something-else
                             {:could-be :a-map}
  [args]
  (forms))
#2016-09-0511:13biscuitpantsI would like to align everything after the <, so that they fall under each other#2016-09-0511:13biscuitpantsso,
something
something-else
{:map :thing}
etc
#2016-09-0511:13biscuitpantsthe < is not a macro, though. just a plain symbol#2016-09-0511:42jethroksyfaced that same issue (using rum too)#2016-09-0511:42jethroksydidn't solve it#2016-09-0511:42jethroksy¯\(ツ)/¯#2016-09-0511:58biscuitpantswould love to be able to solve it. i’ve been using rum a lot, so i’ve switch to LightTable since it plays nicely with custom structure formatting. but, i do miss the structural editing of emacs#2016-09-0512:09jethroksyperhaps someone on their gitter im would know#2016-09-0514:30caiodefine-clojure-indentdoes the trick#2016-09-0514:34caioso you can call (define-clojure-indent (<clj-symbol> <property>)), where <clj-symbol> is the symbol you want to indent and <property> can be one of the following (from clojure-mode docs): - defun', meaning indent defun'-style; - an integer N, meaning indent the first N arguments specially like ordinary function arguments and then indent any further arguments like a body; - a function to call just as this function was called. If that function returns nil, that means it doesn't specify the indentation. - a list, which is used by `clojure-backtracking-indent'.#2016-09-0514:43caiohttps://github.com/clojure-emacs/clojure-mode#indentation-of-macro-forms#2016-09-0517:10scriptoris there a way to force the stack trace buffer to always appear in a specific window?#2016-09-0518:32hlolliIs there a keybinding in emacs to print docstring of a function in point to the repl (ie. not open another buffer like with C-c C-d d.#2016-09-0519:08cvbnot sure, but you always can make your own with something like (cider-insert-in-repl "(doc println)" t)#2016-09-0519:09hlollinice! thanks#2016-09-0609:38biscuitpants@caio thanks for the links. i tried that, with many different values. and couldn’t get it to work. i think its cause the < symbol can take variable arguments#2016-09-0622:30vinnyataidehello, I know this might be the wrong place to ask but I looked everywhere on the internet and couldnt find. Do you guys know any setup for flycheck with local project eslint executable and config?#2016-09-0622:30vinnyataideI tried with getting the project dir from projectile but couldn't find a way to get it simply#2016-09-0622:41tanzoniteblack@vinnyataide eslint will pick up a project config (eslint itself will go up directory trees to find the first applicable config file); don’t know about having a local eslint executable, I’ve always just installed it globally#2016-09-0622:44vinnyataideOh, so flycheck won't need to find the eslintrc?#2016-09-0622:44tanzoniteblacknope, eslint already deals with that#2016-09-0622:44tanzoniteblackhttps://emacs.stackexchange.com/questions/21205/flycheck-with-file-relative-eslint-executable looks like it will work if you really need a local eslint#2016-09-0622:45tanzoniteblack99.9% of use cases though, you can get away with having eslint globally installed and not dealing with that headache#2016-09-0623:43vinnyataidewell, I think my plugins needs to be installed globally too#2016-09-0700:21tanzoniteblackyeah; I just install eslint-babel and other ones I need globally too, to avoid having to set up per project local executables#2016-09-0700:21tanzoniteblackIf I recall correctly, they don’t get invoked unless your project’s config specifies, so they just stay out of the way on other projects#2016-09-0716:23ustunozgur@vinnyataide just configure eslint to the local eslint executable#2016-09-0716:23ustunozgurnot the global one#2016-09-0716:24ustunozgurM-x customize-variable flycheck-javascript-eslint-executable#2016-09-0716:24ustunozgurtto /path/to/my/project/node_modules/.bin/eslint#2016-09-0716:26ustunozgurAlso watch this thread to see if they fix it properly in eslint: https://github.com/eslint/eslint/issues/1238#2016-09-0716:26ustunozgurbut it is locked.#2016-09-0716:27ustunozgurI guess you could also set the variable to "npm run eslint"#2016-09-0716:27ustunozgurso that it can be project independent.#2016-09-0716:28ustunozguror even alias eslint to npm run eslint so that it behaves on command line too.#2016-09-1100:18vinnyataide@ustunozgur yeah your last answer looked the least hacky one#2016-09-1514:38erlissilly question, do you know if we have an emacs in slack in the same way we have the IRC channel #emacs @ (see EmacsChannel)#2016-09-1514:39erlisor is the IRC channel is the recommended point of contact#2016-09-1514:40erlisI have some questions on emacs development but I don't have IRC client at the moment#2016-09-1516:07jfntn@erlis yes you do, you even have two! M-x erc or M-x rcirc#2016-09-1517:31erliswow @jfntn didn't know that#2016-09-1518:13nkraftI’ve been using Emacs for 20 years and I’m embarrassed to say that I either never knew about erc and rcirc, or I simply forgot them. /cdn-cgi/l/email-protection#2016-09-1917:17dev-hartmannIs there Kind of a clojure emacs.d template with cider and clj-refactor you folks can recommend? I'm still a newly convert #2016-09-1917:44benedekyou can give a try to https://github.com/clojure-emacs/example-config#2016-09-1917:45benedeklet me know if you hit anything unexpected#2016-09-1918:14looselytyped@dev-hartmann Also check out https://github.com/bbatsov/prelude - Painless setup for clojure with cider#2016-09-2011:35andrewtropin@dev-hartmann try spacemacs. http://spacemacs.org#2016-09-2011:50dpsuttonHas anyone set geiser up recently for use with scheme? I'm getting some oddities and was wondering if it was still considered bullet-proof#2016-09-2020:13lvhI am usually an Emacs apologist, but…. https://github.com/emacs-mirror/emacs/blob/2c2b0cd07c143e33af9f7237ef4819c28764a90f/etc/NEWS#L2610-L2617#2016-09-2020:21dpsuttonmakes sense#2016-09-2020:22dpsuttonthe idea being that they provide software for non-free platforms, but they don't let non-free platforms have more features#2016-09-2020:22dpsuttonbut yeah the first time you see it it can be a little jarring#2016-09-2020:54lvhthe failure mode for this is random 5 second freezes every time it tries to load a new glyph#2016-09-2020:54lvhno warning in *Messages*#2016-09-2122:40radon@dpsutton, this may not be relevant but I recently set up geiser for Racket. All I had to do was put racket on the $PATH and install geiser with package.el. The REPL looked like it worked OK, but I haven’t done very much with it.#2016-09-2122:40dpsuttoni'm running into some issues where the autocomplete is slow#2016-09-2122:41dpsuttonif i enter a single opening parens without a closing something takes over the thread#2016-09-2122:41dpsuttonif i turn on paredit, it doesn't get lost in parsing#2016-09-2122:41dpsuttoni'm gonna try to debug later but i gotta run now. thanks for thinking about it though#2016-09-2201:04ag@dpsutton are you on Emacs 25? try disabling semantic#2016-09-2201:05dpsuttonI'm building from source from a little bit ago. I need to fast forward to the release before I complain from now on i suppose#2016-09-2201:05dpsuttonBut thanks for the suggestion. I'll try it as soon as I get home#2016-09-2207:12zzamboniBTW Startup time with Emacs 25.1 is much faster than with 24.3. Unchanged configuration (worked without errors), startup time went down from 3-5 seconds to almos instantaneous.#2016-09-2300:06crocketDoes anyone know how to bookmark emacs manual info page in emacs?#2016-09-2300:13crocketNever mind. I just found https://emacswiki.org/emacs/BookMarks#2016-09-2302:02crocketI upgrade Emacs 24.5.1 to 25.1, and clipboard-yank doesn't yank from X11 clipboard anymore.#2016-09-2302:02crocketIs it broken? Is it a regression?#2016-09-2308:46gregnwosu@crocket you may have old binaries kicking around, perhaps consider reinstalling#2016-09-2308:52borkdudeHow can I exclude directories from projectile-ag?#2016-09-2308:59gregnwosu
(add-to-list 'projectile-globally-ignored-directories “folder-to-ignore")
 
#2016-09-2309:15crocket@gregnwosu I have the following settings in ~/.emacs
'(select-enable-clipboard nil)
'(x-select-enable-clipboard-manager nil)
#2016-09-2309:16crocketIn emacs 24.5.1, x-clipboard-yank used to work fine. In emacs 25.1, there is no x-clipboard-yank, and clipboard-yank doesn't work if select-enable-clipboard is nil.#2016-09-2309:35gregnwosu@crocket , did it load correctly , any error messages in the message buffer on startup or from trying x-clipboard-yank#2016-09-2309:35gregnwosu?#2016-09-2309:35crocketx-clipboard-yank is absent in emacs 25.1#2016-09-2309:36crocketThere is no error in *Messages*, and it loaded correctly.#2016-09-2309:37gregnwosuunderstood. perhaps you might like to try xclip. Ive seen that there is a package for it in emacs 25#2016-09-2309:37gregnwosuhttps://www.reddit.com/r/emacs/comments/3rxfr5/xclip_copypaste_killyank_and_emacs_in_a_terminal/#2016-09-2309:37crocketSo, you're admitting that it's a bug?#2016-09-2309:37crocketOr, do I misunderstand clipboard-yank?#2016-09-2309:40gregnwosuwell if there is no package as you say , there is no package to have a bug. but perhaps i misunderstand#2016-09-2309:40crocketPerhaps, I should learn elisp and read the content of clipboard-yank.#2016-09-2309:49crocketOh, it seems x-clipboard-yank is available, but it's not available for auto-completion.#2016-09-2310:04borkdudeIs there a way to enable a post-commit hook in magit? Mine has a read-line in it, that might be problematic#2016-09-2315:20borkdudeWhat is the emacs package that highlights surrounding symbols the same as where point is at?#2016-09-2315:27dfanhttps://www.emacswiki.org/emacs/HighlightSymbol ?#2016-09-2315:55jcsims@borkdude I use https://github.com/nonsequitur/idle-highlight-mode#2016-09-2315:56borkdudethanks#2016-09-2318:47ag@borkdude I bet you can also use .agignore file to hide things from ag (program, not me)#2016-09-2320:13borkdude@ag I read on ag’s website that it reads .gitignore. But how about multiple .gitignores in subdirectories? it looks like it doesn’t handle that#2016-09-2320:15ag.agignore I think recursive you can add it to a directory at a higher level and it would ignore things down the directory structure.#2016-09-2320:17borkdudeour project is like this: - repo/.gitignore - repo/project1/.gitignore - repo/project2/.gitignore - repo/...#2016-09-2617:40borkdudeWhat do people here use to highlight symbols, e.g. when you put point at an argument, it is highlighted in the body (reposted from #cider)#2016-09-2709:47pesterhazyHas anyone tried evil-cleverparens? https://github.com/luxbock/evil-cleverparens This seems like it could be the long-awaited sexp-editing solution for Evil users.#2016-09-2713:42christhis looks really cool, I’ll have to check it out. I’ve been using evil-smartparens but this seems like so much more#2016-09-2718:18ag@pesterhazy what about evil-lisp-state have you tried that? I wonder how that compares to evil-cleverparens#2016-09-2718:18ag?#2016-09-2718:28pesterhazy @ag, just the fact that you can delete lines with dd while preserving parentheses is pretty cool#2016-09-2718:29pesterhazyI don't think evil-lisp-state can do that#2016-09-2718:29pesterhazyPlus I found the key bindings of the latter, as included in spacemacs, to be pretty bad#2016-09-2718:50agoh ok… gotta give it a try.. thanks!#2016-09-2813:47tianshuHi, I'm working on a parinfer-mode with oakmac's parinfer-elisp. I think it works pretty well now. https://github.com/DogLooksGood/parinfer-mode#2016-09-2820:19vermaI am trying to configure font-locking so that I can color/highlight unused symbols, has anyone here tried to do this?#2016-10-0212:28hlolliHey all, Im trying to make some custom faces in emacs, can someone see why this code wont create a box around FIXME: symbol in emacs?
(defface prufa-face
  '((((type graphic)) :box (:color "yellow" :line-width -1))
    (t :underline t :background "#066"))
  "prufa")

(add-hook 'emacs-lisp-mode-hook
	  (lambda ()
	    (font-lock-add-keywords nil '(("\\<\\(FIXME\\):" 1 'prufa-face t)))))
#2016-10-0212:39hlollinevermind, I just skip the defface macro and it will work fine
(font-lock-add-keywords nil '(("\\<\\(FIXME2\\):" 1 '(:foreground "red" :box (:color "yellow")) t)))
creates red text in yellow box....
#2016-10-0217:43jfntnHas anyone moved from a custom config to spacemacs?#2016-10-0217:44jfntnI don’t want to learn evil and I’m not sure I like the layers system, but it makes 90% of my config redundant so I’m sort of considering it#2016-10-0218:08dpsuttoni just know converts from vim to spacemacs and they are super happy. Haven't heard too many people going from "vanilla" emacs to such a vim-like experience. I prefer keeping the bindings of emacs as I hear there are a few rough edges in menus and other things#2016-10-0218:08dpsuttonbut i hear nothing but praise for spacemacs in general so just check it out#2016-10-0218:08dpsuttonif its like prelude, it'll bundle up your current .emacs.d anyways so there's no risk#2016-10-0218:27blueberry@jfntn prelude gives you a pre-configured system without the evil stuff#2016-10-0313:49christhe emacs mode in spacemacs works quite well, it’s only the hybrid mode (which is vim mode with emacs keybindings in insert mode) that has rough edges. spacemacs is great, but definitely back up your config before you change#2016-10-0316:40bja@chris that's been my experience as well (I'm a vim to spacemacs (vim-style) person). If you stick with emacs-style (using spacemacs as an opinionated set of emacs packages) or vim-style, things well-trodden. The hybrid mode is still a bit of untamed territory.#2016-10-0419:31dev-hartmann@jfntn: i actually just tried that#2016-10-0419:32jfntn@dev-hartmann ah interesting, did you stick with spacemacs?#2016-10-0419:34dev-hartmann@jfntn: started two days, love the look and feel. But I have a hard time with evil mode, even as a long time vim user. Today i switched back to holy mode 😁#2016-10-0419:35dev-hartmannBut i really like configuring spacemacs and the Layers concept#2016-10-0419:36dev-hartmannMaybe i'll try to incorporate some of that into my custom config#2016-10-0419:36jfntnholy mode is what I’d use, might try out hybrid mode once in a while to see what the fuss is about, but I do pretty much only lisp and it doesn’t work well for that
#2016-10-0419:37jfntnI’ve ripped a few things from spacemacs it can be tricky because there’s a lot a magic in there#2016-10-0510:25pesterhazyin helm (spacemacs if it matters), can I summon up old search terms?#2016-10-0510:26pesterhazyI know about helm-restore#2016-10-0510:26pesterhazybut if I used, helm-projectile-find-file previously but used other helm windows in the meantime, can I summon up the old term?#2016-10-0516:53ag@pesterhazy function you’re looking for I believe is helm-resume but in Spacemacs you can do SPC s l#2016-10-0517:04pesterhazy@ag, well that only brings back the previous session, not the one before that#2016-10-0517:06pesterhazyI don't understand why this was closed: https://github.com/emacs-helm/helm/issues/937#2016-10-0517:15ag@pesterhazy if you find out that this is possible in ivy, I may finally try it out 😉#2016-10-0517:21pesterhazyI don't get it, helm has too almost many features otherwise#2016-10-0517:32jfntnusually M-p/M-n in the minibuffer goes through the history#2016-10-0517:32jfntnnot sure about helm though#2016-10-0517:33pesterhazy@jfntn: will try that#2016-10-0522:37eraserhdHey, I need to install emacs on Mac for one application (Proof General, actually). I'm basically going to enable evil but otherwise keep it vanilla. Which one should I choose?#2016-10-0602:20ag@eraserhd just use Spacemacs. the easiest way possible.#2016-10-0607:55pesterhazy@jfntn, 💥 that works!#2016-10-0607:55pesterhazyyou're a #2016-10-0607:55pesterhazyI guess it pays to actually know some Emacs keybindings when working with Emacs#2016-10-0608:58zzamboni@eraserhd http://spacemacs.org/ is focused on Evil mode, and some people quite like it, but it's anything but vanilla, it comes heavily customized. For vanilla Emacs I'd suggest https://emacsformacosx.com/ (which is what you get if you "brew cask install emacs" btw), and just enable Evil and any other modes you need.#2016-10-0612:17tianshuFor Clojure development, maybe lispy is better than evil.#2016-10-0612:34crankyadmin> maybe lispy is better than evil. This#2016-10-0613:08tianshulispy provide mode too, insert mode and command mode. but user dont need to toggle it manually. which mode is enabled, depend on the cursor position. if cursor locate before ( or after ), it will be command mode, otherwise insert mode.#2016-10-0613:09tianshuthanks to the S-expression.#2016-10-0613:15eraserhdOoh, lispy looks interesting.#2016-10-0615:47pesterhazyevil-cleverparens gives you things like daf (delete a form) and dad (delete a defun)#2016-10-0615:48pesterhazylispy doesn't cooperate with evil though#2016-10-0616:50mattlyspacemacs has a "lisp mode" that hooks up to paredit#2016-10-0616:50mattlySPC k b is barf, for example#2016-10-0616:51mattlyand once you're in there you can forego the SPC k#2016-10-0616:51mattly...depends a lot on what you like though#2016-10-0617:01ag@mattly yeah I have mixed feelings about Spacemac’s lispy mode. I can use some improvements. for example - when you yank a sexp, why does it need to stay in the that mode? Does it make sense? To me it doesn’t. Anyway… One of these days I’ll find some time and try cleverparens.#2016-10-0617:08mattlyheh#2016-10-0617:08mattlyI came directly to spacemacs from vim pretty early in spacemacs developement, and around the time I was learning clojure#2016-10-0617:09mattlyI was using vim-paredit or one of those and couldn't keep all the keyboard shortcuts for that in my head#2016-10-0617:09mattlyso spacemacs' which-key mode helped a lot#2016-10-0617:09mattlybut I also started noticing that the vim paredit stuff relied a lot on chords and the sort of things vimmers make fun of emacs for#2016-10-0617:11mattlyI still have a ways to go on using spacemacs's lisp mode properly, but the utility for slurp/barf/wrap/unwrap are undeniable#2016-10-0617:15hlolliDoes someone have a function for comment line that inserts newline character before the parenthesis, hope this explains what Im after:
(def clojure
   | "rocks")
bad:
(def clojure
 | ;; "rocks")
wanted:
(def clojure
 | ;; "rocks"
)
#2016-10-0617:23tianshu@hlolli You want to comment a line without care about parentheses?#2016-10-0617:24hlolli@doglooksgood looking for something that guarantees a valid sexp after commenting 🙂#2016-10-0617:28tianshuI'm writing a plugin for Parinfer on Emacs, https://github.com/DogLooksGood/parinfer-mode I hope it would be the painkiller for lisp's parentheses.😎#2016-10-0617:30tianshuAnd a plugin lispy can do like this:
(def clojure
 | ;; "rocks"
)
#2016-10-0617:30hlolliahhh ok, Im starting at the gif on your github page.... trying to see where this fits my paredit world of view, impressed.#2016-10-0617:32hlollinice, I give this a try. Makes sense, that the last paren is alone there at the end.#2016-10-0617:32tianshuParinfer is not a 100% covered paredit solution, but using with paredit or smartparens, it's very handy.#2016-10-0617:33hlolliOk, I need to look into this, if I could start using the parts I like and discard others.#2016-10-0617:41hlolli@doglooksgood symbol void font-lock-flush, something to worry about?#2016-10-0617:41hlolliarent font-locks basically highlight, this could be a error on my side.. nvm.#2016-10-0617:42tianshuThe verison of Emacs?#2016-10-0617:42hlolli24.5.1#2016-10-0617:43tianshutry (require 'font-lock)#2016-10-0617:45tianshuor maybe M-x global-font-lock-mode, is this mode available on your Emacs?#2016-10-0617:45hlolliits on, some random warning, probably false alarm on my side. Otherwise I wouldnt know whats missing.#2016-10-0617:46tianshuYou can just paste the warnings, I think.#2016-10-0617:46hlollibut I guess something needs to be disabled, because if I comment, the parenthesis line up beautifully, but deleting them back causes unbalanced paren error. Probably from paredit?#2016-10-0617:47hlolli
parinfer-mode disabled aggressive-indent-mode for compatibility reason.
Caution: YES = Indent-mode (Buffer will be modified); NO = Paren-mode, which one? (y or n) n
Parinfer: Paren Mode
parinfer-ext::pretty-parens:paren: Symbol's function definition is void: font-lock-flush
#2016-10-0617:49tianshuparinfer-mode disabled aggressive-indent-mode for compatibility reason. ignore this line#2016-10-0617:51tianshuCaution: YES = Indent-mode (Buffer will be modified); NO = Paren-mode, which one? (y or n) n This line means, If you enable Parinfer Indent Mode, your buffer will be changed, you can use M-x parinfer-diff to see the changes. Parinfer has two modes, in Indent Mode you only care about indentation. and in Paren Mode, you only care about parens.#2016-10-0617:52hlolliok,#2016-10-0617:52tianshuParedit should not be enabled directly, and If you want auto pairs, you should switch to Indent Mode. better to test on a demo.clj.#2016-10-0617:53tianshuMaybe the document is bad, need to improve it:no_mouth:#2016-10-0617:56hlollino, looks fine, not sure if I should try to learn this before a music live-coding performance I have next week, where every ms counts. But it looks like it works, only paredit bit annying me, I could disable some of paredit functionality.#2016-10-0617:58hlollibut Im curious to see if this still would make editing faster, I do anything for speed!#2016-10-0618:01tianshuYou should take a look at lispy when you have time, I think that is the faster way.#2016-10-0618:01tianshuor maybe parinfer + lispy. both of them have some advantages and disadvantages 🙂#2016-10-0618:02tianshuIt's time for me to sleep zzzzz#2016-10-0618:07hlolliok thanks, sleep well#2016-10-0619:22verma@hlolli not sure what I have configured (highly unlikely anything other than cider) but it seems that its automatically doing it for me#2016-10-0619:25hlolli@verma yes that's right, it does so too for me when manually typing a semicolon before a word. But most of the time I comment with a custom keybinding, I think it comes with emacs, comment-line, and I can have the cursor anywhere on the line and it will find the beginning of the text and add ;;, the only time I dont use it is when the line ends with a closing bracket with the opening one missing from the line.#2016-10-0619:25vermaoh oh, I see#2016-10-0619:26hlolliI mean, its bit slow when commenting many lines (besides region comment, which also has this limitation) to press down, press left, type ;, press down press left.. etc...#2016-10-0619:27vermayou’re right, comment-region doesn’t take care of it#2016-10-0619:28vermaI probably haven’t run into it since I just discovered region commenting in emacs 🙂, usually with clojure stuff #_() and (comment ..) suffice for me#2016-10-0619:29hlolliI'd be curious to find comment keybinding that adds #_ or maybe I should just do it myself.#2016-10-0715:36mikepjbdoes anyone know if there is a emacs equivalent for comment commands in vim like this # vim: set ft=ruby:#2016-10-0716:12cmack@mikepjb sounds like you are looking for file variables or file local variables: https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#2016-10-0718:37gregnwosu#2016-10-0809:39mikepjbyes that is exactly what I needed, many thanks @cmack#2016-10-0916:56jwmjust found out about emacs artist mode - https://www.youtube.com/watch?v=cIuX87Xo8Fc#2016-10-0916:57jwmhttp://ditaa.sourceforge.net/#2016-10-1007:59tianshuIt seems that cljr add project dependency not work well with figwheel and I've same this problem in a video on youtube.#2016-10-1008:24benedek@doglooksgood: can u file a github issue pls with the details #2016-10-1008:43tianshunot sure if this is a bug.#2016-10-1023:55aghow do you folks do the vertical aligning? for example dependencies? I know recommended style guide goes against aligning dependencies but if you still would like to do that. How do you align something like this:
[com.cognitect/transit-clj   "0.8.288"        :scope "test"]
                 [com.cemerick/piggieback     "0.2.1"          :scope "test"]
                 [adzerk/boot-cljs            "1.7.228-1"      :scope "test"]
so every column is nicely aligned?
#2016-10-1023:58agI mean I expected Slack to totally ruin it, but in this case it surprised me with doing it right. Now, say I need to add some longer dependency, maybe something like this: [org.martinklepsch/boot-garden “1.3.2-0”], now that would require redoing everything. right?#2016-10-1100:04agoh… nevermind, I just found that Spacemacs implements improved version of https://www.emacswiki.org/emacs/AlignCommands#2016-10-1107:12tianshuIs there something like taglist(vim plugin) in Emacs for Clojure?#2016-10-1113:16chrisdo you need something more than speedbar? It’s installed by default#2016-10-1115:26tianshuYes, that's what I want. @chris#2016-10-1115:26tianshuThanks very much!#2016-10-1117:04chrisyep, no problem#2016-10-1208:38NiclasIs there a way to run a command within another directory, without changing the current directory? I’m thinking something along the lines of
(with-current-dir “..”
  (interactive)
  (cider-jack-in-clojurescript))
#2016-10-1208:42NiclasNever mind, I found the solution:
(interactive)
(let ((default-directory ".."))
  (cider-jack-in-clojurescript))
#2016-10-1320:29bozhidarCIDER 0.14 is out - https://github.com/clojure-emacs/cider/releases/tag/v0.14.0#2016-10-1320:29bozhidarEnjoy!#2016-10-1320:30bozhidar@looveh with a prefix argument the jack-in commands would prompt you for the folder in which to run them#2016-10-1320:30bozhidarthat's more convenient than messing with default-directory#2016-10-1320:44agHappy birthday Bozhidar!#2016-10-1406:47tianshu👍#2016-10-1407:19bozhidarThanks 🙂#2016-10-1705:23jimmyhi guys what is the plugin being used to create new function with current symbol under cursor in this vid : https://youtu.be/DHpk_-1H7Qo?t=2m40s#2016-10-1707:51benedek@nxqd clj-refactor#2016-10-1707:51benedekhttps://github.com/clojure-emacs/clj-refactor.el#2016-10-1816:53akjetmaDoes anyone know why my repl history is missing from a cider repl at startup?#2016-10-1816:53akjetmathis used to just work and now it doesn't and i am bamboozled#2016-10-1903:30radon@akjetma I’ve never had my REPL history be persistent in CIDER, but it would certainly be cool if it were! I’d be curious to know what part of your setup allowed for that.#2016-10-1903:30radonOh T_T it’s probably cider-repl-history-file#2016-10-1903:31radonSo I guess that’s not very helpful, since I wouldn’t know why that functionality would have stopped working. Sorry!#2016-10-2016:26jjttjjwhen i try to install clojure-snippets (https://github.com/mpenet/clojure-snippets) I keep getting the following errror
tar-untar-buffer: Opening output file: invalid argument, c:/Users/me/.emacs.d/elpa/clojure-snippets-20161017.58/snippets/clojure-mode/->
anyone know what might be happening here?
#2016-10-2116:12bozhidarseems this filename is not valid on Windows (`->`)#2016-10-2116:12bozhidarmaybe this extensions wasn’t tested on Windows...#2016-10-2802:41ghosss@mikepjb (tooltip-mode -1)#2016-10-2808:00mikepjbthanks @ghosss#2016-10-2812:37mikepjbdoes anyone know if including ;;;###autoload at the beginning of a function helps at all? Is it worth including of every function definition?#2016-10-3006:47agis there a way to get something like semantic-sticky-func in clojure?#2016-11-0221:00aganyone who’s using Emacs. have you seen this? basically anytime I edit .boot file Emacs creates .#build.boot temp file and then boot doesn’t want to do anything in repl, until .boot file is saved it would yell
java.io.FileNotFoundException: ./.#build.boot (No such file or directory)
#2016-11-0221:05caiodid you open the repl while editing the .boot file?#2016-11-0221:05caionvm, different issue#2016-11-0221:24ag@caio it’s turned out to be boot thing… figuring it out#2016-11-0316:23borkdudeHow do I copy the buffer’s filename to the clipboard? (I’m using Prelude)#2016-11-0316:35jethroksy@borkdude no in-built function afaik#2016-11-0316:35jethroksy
(defun jethro/add-curr-file-to-yank ()
  (interactive)
  (kill-new (buffer-file-name)))
#2016-11-0316:35jethroksythis will fail if buffers don't have a corresponding file#2016-11-0316:35borkdudeI read this post by @bozhidar http://emacsredux.com/blog/2013/03/27/copy-filename-to-the-clipboard/#2016-11-0316:35borkdudebut that function doesn’t seem to be in Prelude anymore?#2016-11-0316:36jethroksycan't help you there#2016-11-0316:36jethroksyit's not in crux either#2016-11-0316:37jethroksyi set this to a custom ivy-action, you should check if helm has something like that as well#2016-11-0317:03tianshuanyone use squiggly-clojure?#2016-11-0400:06agwhat do you guys use to sort namespaces in non-ns situations? like when using boot? How do you sort something like this:
(require
  '[adzerk.boot-cljs :refer [cljs]]
  '[adzerk.boot-cljs-repl :refer [cljs-repl start-repl]]
  '[adzerk.boot-reload :refer [reload]]
  '[adzerk.boot-test :refer :all]
  '[crisptrutski.boot-cljs-test :refer [test-cljs]]
  '[finops-admin.db-utils :as db-utils]
  '[finops-admin.tables :as tables]
  '[finops-admin.table-spec :refer [generate-db-data]]
  '[pandeiro.boot-http :refer [serve]]
  '[environ.boot :refer [environ]]
  '[degree9.boot-npm :refer [npm]])
#2016-11-0412:08dpsutton (define-key map (kbd "C-c C-r n s") #'clojure-sort-ns)#2016-11-0412:08dpsutton"Internally sort each sexp inside the ns form."#2016-11-0412:08dpsuttonthis is in clojure mode#2016-11-0412:08dpsuttoni've never used it before but might work#2016-11-0412:09dpsuttonah. i see your point#2016-11-0412:09dpsuttonmaybe just M-x sort-lines?#2016-11-0412:27yendaemacs --debug-init is not really helpful, is there a problem with my config or with smartparens ?#2016-11-0412:30yendawhen I remove smartparens it works again#2016-11-0416:11cmack@yenda did you visit position 7276 in your .emacs file to see the offending variable? (`M-g c 7276` or M-x goto-char RET 7276)#2016-11-0416:15yenda@cmack thank you it was slack that inserted some random invisible crappy char inbetween lines#2016-11-0416:16yendaNow I understand why I was unable to find the problem#2016-11-0417:36ag@dpsutton neither sort-lines nor clojure-sort-ns unfortunately work for that… clojure-sort-ns requires ns-form. The example I have demonstrated is not an ns form.#2016-11-0419:59aghave someone tried to get clojurescript working in org-babel? in Org 9.0?#2016-11-0421:16agdammit… tried and tried… couldn’t make it work. I wish @mfikes used Emacs and org-mode. he would’ve done org-babel for planck#2016-11-0621:41rui.yanghi, anyone use emacs on mac? i tried to learn paredit, found that C-M-d not working. it should bounded to paredit navigate foward down.#2016-11-0622:28cmack@rui.yang I use http://emacsformacosx.com builds and C-M-d is bound to paredit-forward-down after loading paredit.#2016-11-0622:47rui.yang@cmack what version of Mac? mine is 10.10.4.#2016-11-0622:47cmack10.11.6#2016-11-0622:47rui.yangok, maybe I should do an update firstly to try 🙂#2016-11-0622:49cmackso after loading paredit, if you use C-h b to examine bindings, paredit-forward-down is not bound at all?#2016-11-0622:49cmackI’m pretty sure paredit worked for me on previous versions of macos too...#2016-11-0700:09rui.yang@cmack it shows bounded to C-M-d. but when I type C-M-d, nothing happens. And if I do describe-key, the mini buffer will wait for me to type keys. When I tried to type C-M-d, nothing happens in mini buffer. seems my mac has a problem interpreting the C-M-d combination. but I can type ESC C-d to trigger paredit-forward-down. and ESC C-d in describe-key shows: C-M-d (translated from <escape> C-d) runs the command paredit-forward-down#2016-11-0700:11cmackinteresting… do any other Ctrl-Alt commands work?#2016-11-0700:12cmack@rui.yang e.g. if you mark a region, can you Ctrl-alt-\ to indent?#2016-11-0700:13rui.yang@cmack it works#2016-11-0700:21cmack@rui.yang in the non-working buffer, if you do C-h c C-M-d does it show a different binding?#2016-11-0700:23rui.yangsame behaviour. I assume it is an issue with my os, or keyboard setup or some mis configuration in my emacs. not related to paredit at all.#2016-11-0700:23cmackdo you use karabiner?#2016-11-0700:25rui.yangno#2016-11-0700:26rui.yangbut I modified my keyboard a little bit.#2016-11-0700:27rui.yangI have the following in my config#2016-11-0700:27rui.yang(when is-a-mac (setq mac-command-modifier 'meta) (setq mac-option-modifier 'none) (setq mac-command-key-is-meta t) (setq mac-option-key-is-meta nil) (setq default-input-method "MacOSX") ;; Make mouse wheel / trackpad scrolling less jerky (setq mouse-wheel-scroll-amount '(1 ((shift) . 5) ((control)))) (dolist (multiple '("" "double-" "triple-")) (dolist (direction '("right" "left")) (global-set-key (kbd (concat "<" multiple "wheel-" direction ">")) 'ignore))) (global-set-key (kbd "M-`") 'ns-next-frame) (global-set-key (kbd "M-h") 'ns-do-hide-emacs) (global-set-key (kbd "M-˙") 'ns-do-hide-others) (after-load 'nxml-mode (define-key nxml-mode-map (kbd "M-h") nil)) (global-set-key (kbd "M-ˍ") 'ns-do-hide-others) ;; what describe-key reports for cmd-option-h )#2016-11-0700:31rui.yanganyway, I will do a mac upgrading to see if there is any difference#2016-11-0700:31rui.yangif not, I’ll come back to ask for help again 🙂#2016-11-0712:21statonjr@ag I have ClojureScript and org-mode working. Haven’t tried in 9.0 yet. I’m using planck.#2016-11-0712:22jonpitheris there a general emacs slack site?#2016-11-0712:22jonpithermy Org-export has stopped working apply: Wrong type argument: listp, #("Jon Pither" 0 10 (:parent (#0)))#2016-11-0715:03cmack@jonpither I don’t think there is a general slack for emacs. I think most still prefer irc (#emacs on https://freenode.net) w.r.t to real-time chat.#2016-11-0717:41ag@statonjr how? can you share a gist or whatever? I would love to have clojurescript in org-babel#2016-11-0812:09jonpitherI have a map of data in an EDN file... how do I layout it nicely so the keys values lineup?#2016-11-0812:45mitchelkuijpers@jonpither cider-format-edn-buffer?#2016-11-0812:45jonpitherclose - I have a vector of individual maps and I'd like the keys of those maps to line up.... think I may be asking too much#2016-11-0812:45mitchelkuijpersAha hold on#2016-11-0812:46mitchelkuijpersthey have something#2016-11-0812:47mitchelkuijpersC+c space#2016-11-0812:47mitchelkuijpershttps://github.com/clojure-emacs/clojure-mode#vertical-alignment#2016-11-0812:48mitchelkuijpersis that what you mean? @jonpither#2016-11-0812:49jonpitherit doesn't work because the key/vals are spread across diff maps#2016-11-0812:56statonjr@ag I have a GitLab project that I need to push to MELPA. I hope to do it after I test against org-mode 9.0.#2016-11-0816:02benedekwould perhaps align-regexp help @jonpither ?#2016-11-0816:11jonpitherYep it does thanks!#2016-11-0816:14benedekno worries#2016-11-1018:58josh.freckletonis there a way to configure emacs+cider so that if I open a project with, say, a project.clj, emacs will split into a few frames, automatically find, say, core.clj, and start cider, showing the repl buffer in a given frame? And could I configure this on a per-project basis?#2016-11-1019:07normanI assume you probably don’t really want to start a REPL when you open a project.clj. But if you do start cider from the project, you can use :main to set your starting namespace.#2016-11-1019:07normanThat gets you 90% there#2016-11-1019:09normanIf you don’t own the project to update main, I suggest may trying projectile. C-c p f core would work pretty well.#2016-11-1019:09josh.freckleton@norman what I'm looking for is a bit of automation; as it stands, it takes a lot of key strokes to get all the right files, buffers, repl, etc. open and split into convenient windows... so a command that could launch all of that would be awesome!#2016-11-1019:11normanHonestly, I’d put all the repl stuff in dev/user.clj and have shell command that opened the correct namespace in emacs instead of the project.#2016-11-1019:11normancider-jack-in and then (init) in the repl#2016-11-1019:12normanand you have everything opened exactly the way you described#2016-11-1019:14josh.freckletonLaunching from shell sounds great. By dev/user.clj do you mean a project-local one, or a computer-global one? I'm not sure I see either way though, how that could direct emacs in opening files / windows in a configuration.#2016-11-1019:15normanproject-local, assuming it’s your project#2016-11-1019:16normanwhen you open core.clj and C-c M-j to start cider, you’ll get your core.clj at the top and the repl at the bottom. You’ll be in the user namespace#2016-11-1019:18normanSince you’d never want a repl to start automatically without being asked, that’s about as optimized as I can see getting there. Then if your user.clj has some sort of initialization function you can have it require the desired namespace and switch you into if you want#2016-11-1019:18normanand start up any services or any other initialization you want for that project#2016-11-1019:19normanEveryone has their own workflow desires, so perhaps that just doesn’t work well for you. No idea. Personally, I open project.clj. Start cider. Projectile to the namespace I want to be in, load and go#2016-11-1019:20normanAnd that namespace is almost never core.clj…. 🙂#2016-11-1019:21josh.freckletonthat makes sense, and is all good advice. I think maybe what I was looking for was M-x read-my-mind#2016-11-1019:21normanIn any case, you can certainly write an emacs function that will split up things, open files and send nrepl commands however you want. If you need some advice on how to write that, I’m sure there are plenty of people here can also help out there.#2016-11-1019:21josh.freckleton(it is emacs after all)#2016-11-1019:21normanBut there’s nothing like that built in.#2016-11-1019:22normanmaybe we need a M-x cider-jack-in-right-here#2016-11-1019:22normanthat would load the namespance you are in and switch you to it in the repl#2016-11-1019:22josh.freckletonthat wouldn't be tough to automate with an in-ns-related command#2016-11-1019:23josh.freckletonbut, not quite what i was looking for#2016-11-1019:23normancider already has commands for those things - they are just separate things to type#2016-11-1019:23normanHmm - it sounds exactly like what you are looking for, except you’d need to have the desired namespace open instead of being in project.clj#2016-11-1019:25mitchelkuijpersI think you could also write some elisp to do this#2016-11-1019:28chadhsis there a way to customize the cider modeline?#2016-11-1019:29chadhsdidn’t see anything in the manual#2016-11-1019:31chadhscider[clj: to [clj:namespace]#2016-11-1020:47bolivier@rui.yang There’s a binding that overrides C-M-d on the mac. I think it’s hiding the dock. You can turn it off via terminal and restarting, and maybe also in the keyboard settings.#2016-11-1020:48bolivier(it’s actually a word definition keyboard shortcut)#2016-11-1020:48boliviertype defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 70 '<dict><key>enabled</key><false/></dict>’ into your terminal#2016-11-1020:48bolivierand then restart the computer and it should be fixed#2016-11-1100:12richiardiandreasorry for the cross-post, but has anyone worked on a way to switch buffers from cider-mode to inf-mode and vice versa?#2016-11-1100:22richiardiandreasorry, I have just discovered that I actually don't need that, as cider is only activate when you jack-in#2016-11-1108:56rui.yang@bolivier Hooray for your magic! It got fixed. Thanks so much!!#2016-11-1111:22gregnwosu@josh.freckleton
(defun my-clojure-mode-hook ()
;; (insert other-commands-you-want-to-run-on-startup)
(cider-jack-in)) 
(add-hook 'clojure-mode-hook #‘my-clojure-mode-hook)
#2016-11-1111:24gregnwosuthis is untested just my 10 second hack, note it will probably continue to attempt to jack-in even if you already have a repl running, you may need to add some code to deal with that#2016-11-1413:08thomasHi all, what is a good starting place to install emacs on Mac OS X? I installed brew install emacs-mac but I can't install cider in that case. Any suggestions?#2016-11-1414:54mtgredhttps://emacsformacosx.com/#2016-11-1414:56ghosssI've been using the Emacs from brew install emacs and have had no trouble there.#2016-11-1415:02dpsuttonthere's a specific emacs version with a patch applied that brings extra features that have been removed or not added to gnu emacs#2016-11-1415:02dpsuttoni believe that most os x users prefer this version#2016-11-1415:26benedekthat is the one which have support for ligatures for example, is that right @dpsutton ?#2016-11-1415:27dpsuttonligatures and sub-pixel scrolling are the two big features that i remember. I believe there are many more and its most osx-y#2016-11-1415:28benedekyup that is the one. personally i don’t care much for the scrolling but firacode is just awesome. you don’t want to miss that#2016-11-1415:29benedekhttps://github.com/railwaycat/homebrew-emacsmacport#2016-11-1415:50thomasI have done the brew install emacs but then I can't load Cider 😞#2016-11-1415:52ghosssdid you install cider?#2016-11-1415:54dpsutton@thomas how did you attempt to load cider?#2016-11-1415:55dpsuttonand can you tell me the output of M-x version#2016-11-1415:55thomasM-x package-install [RET] cider [RET] from the installation instructions.#2016-11-1415:55thomasI also tried to do the M-x package-refresh-contents [RET]#2016-11-1415:55thomasbut that doesn't help#2016-11-1415:57ghossswhat happens when you M-x cider-jack-in?#2016-11-1415:57dpsuttoncan you tell us what M-x version returns?#2016-11-1415:58thomas
GNU Emacs 25.1.1 (x86_64-apple-darwin16.1.0, Carbon Version 157 AppKit 1504.6) of 2016-11-14
#2016-11-1415:59dpsuttonand M-x cider-jack-in from a file in a clojure project?#2016-11-1415:59thomasand I have to do Escape in stead of Alt for M- as well#2016-11-1415:59thomasok let me try...#2016-11-1416:12dpsuttonwhat's the word thomas?#2016-11-1416:14thomas[no match]#2016-11-1416:14thomas(sorry got interrupted by pointy haired person)#2016-11-1416:15dpsuttonwhat does no match mean?#2016-11-1416:17thomasI think it means that cider hasn't been installed...#2016-11-1416:17thomasand that is where I get the first failure.#2016-11-1416:18thomasso sorry... I should have said I can't install cider.#2016-11-1416:18thomasthat is a more accurate discription of my problem. 😇#2016-11-1416:21dpsuttonwhat does it exactly say?#2016-11-1416:21dpsuttonyou are able to run M-x cider-jack-in ?#2016-11-1416:21dpsuttonlike does that option appear?#2016-11-1416:27thomasit doesn't appear... except got [no match] as Cider isn't installed.#2016-11-1416:27thomasI have to go home now though... catch my train. I'll be online again later tonight and thank you for your help.#2016-11-1417:00mpingHi guys#2016-11-1417:00mpinghow can I bind the Meta key to Cmd, in emacs+iterm?#2016-11-1417:01mpingI have it working normally in emacs gui, but I’d like to keep it for terminal emacs -nw#2016-11-1418:47verma@mping that’s something I would like to know as well, if there are any iterm+emacs users on osx, I’d like to know more about their setup.#2016-11-1419:34leathekdIterm has a "keys" preference panel that lets you swap modifier keys. I have left option and command swapped and have added 3 key mappings to allow Cmd+space, Cmd+`, and Cmd+Tab fall through to the OS.#2016-11-1421:49bolivier@leathekd is that a configuration option in iterm or something else?#2016-11-1421:53leathekdYep, in the "Keys" tab of iTerm's preferences.#2016-11-1421:54bolivierI configured some of it, but can’t manage to wrangle my desired behavior#2016-11-1421:54bolivierI set both option-space and cmd-space to be ignored#2016-11-1421:54bolivierbut when I hit option space from within iterm, nothing happens.#2016-11-1509:27mping@leathekd I tried to find that setting, can you post a screenshot plz?#2016-11-1509:58mping@bolivier I figured it out#2016-11-1509:59mpingyou add a key binding, first choose “do not remap modifiers” then type the actual shortcut. it will appear as the “real” keys even if you swapped left alt and left cmd#2016-11-1510:44mpingthis sucks, I would have to add all of the shortcuts that I normally use.#2016-11-1516:14angelixdHonestly, it is much easier to run emacs in graphical mode, then run shells within emacs, than the other way around#2016-11-1519:06bolivierI’ve found that emacs has functionality to replace most of what I want shells for. dired + async commands cover 90% of use cases for me.#2016-11-1519:06bolivierThe only thing I’m really using iterm for these days is long running stuff like npm#2016-11-1519:09rmuslimov@bolivier can you please share any example#2016-11-1519:09bolivier@rmuslimov example of?#2016-11-1519:10rmuslimovhow you replace iterm commands with async#2016-11-1519:10rmuslimovyou mean this https://github.com/jwiegley/emacs-async right?#2016-11-1519:11bolivierI’m talking about async-shell-command#2016-11-1519:11bolivierwhich is bound, I think by default, to M-&#2016-11-1519:11bolivierIt just takes a shell command and spits the output into a new buffer#2016-11-1519:11rmuslimovah, got it#2016-11-1519:11bolivierso I’ll sometimes do greps or something with it#2016-11-1519:12rmuslimovyea, I’m using dired + prodigy for starting applications that I use, and it works great for me#2016-11-1519:13bolivierI’ll have to look into that#2016-11-1519:13rmuslimovdidn’t hear about async-shell, good to know, thanks#2016-11-1522:29mulchycross posting from #clojurescript incase you all have a better idea of the answer: I want to use cider to connect to a running nREPL server that is started using https://github.com/martinklepsch/tenzing If I cider-connect to it and run (start-repl) things work great and I can drive the browser, but cider doesn’t think this is a cljs repl, so I can’t do things like C-c C-k to eval the cljs file in the repl. Am I going about this the wrong way?#2016-11-1523:00rmuslimovjust wondering why you start external nRERL server? Asking because it works perfect started in emacs#2016-11-1523:00rmuslimovand supports all this clj/cljs routing#2016-11-1604:27mulchy@rmuslimov when I try to call (start-repl) after doing cider-jack-in I get this exception
boot.user> (start-repl)
<< started Weasel server on ws://127.0.0.1:59962 >>
<< waiting for client to connect ... java.lang.NullPointerException
	at $make_parents.invokeStatic(io.clj:443)
	at $make_parents.doInvoke(io.clj:438)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at adzerk.boot_cljs_repl$make_repl_connect_file.invokeStatic(boot_cljs_repl.clj:43)
	at adzerk.boot_cljs_repl$make_repl_connect_file.invoke(boot_cljs_repl.clj:41)
	at adzerk.boot_cljs_repl$write_repl_connect_file.invokeStatic(boot_cljs_repl.clj:59)
	at adzerk.boot_cljs_repl$write_repl_connect_file.invoke(boot_cljs_repl.clj:54)
	at adzerk.boot_cljs_repl$repl_env$fn__377.invoke(boot_cljs_repl.clj:104)
	at weasel.repl.websocket$websocket_setup_env.invokeStatic(websocket.clj:72)
	at weasel.repl.websocket$websocket_setup_env.invoke(websocket.clj:60)
	at weasel.repl.websocket.WebsocketEnv._setup(websocket.clj:27)
	at boot.user.Delegatingweasel_repl_websocket_WebsocketEnv._setup(boot.user9170595563573263087.clj:120)
	at cljs.repl$repl_STAR_$fn__10560.invoke(repl.cljc:781)
	at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1159)
	at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1150)
	at cljs.repl$repl_STAR_.invokeStatic(repl.cljc:778)
	at cljs.repl$repl_STAR_.invoke(repl.cljc:701)
	at cemerick.piggieback$run_cljs_repl.invokeStatic(piggieback.clj:169)
	at cemerick.piggieback$run_cljs_repl.invoke(piggieback.clj:155)
	at cemerick.piggieback$cljs_repl.invokeStatic(piggieback.clj:222)
	at cemerick.piggieback$cljs_repl.doInvoke(piggieback.clj:212)
	at clojure.lang.RestFn.invoke(RestFn.java:410)
	at clojure.lang.Var.invoke(Var.java:379)
	at adzerk.boot_cljs_repl$start_repl.invokeStatic(boot_cljs_repl.clj:120)
	at adzerk.boot_cljs_repl$start_repl.doInvoke(boot_cljs_repl.clj:107)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at boot.user$eval18903.invokeStatic(boot.user9170595563573263087.clj:43)
	at boot.user$eval18903.invoke(boot.user9170595563573263087.clj:43)
	at clojure.lang.Compiler.eval(Compiler.java:6978)
	at clojure.lang.Compiler.eval(Compiler.java:6941)
	at clojure.core$eval.invokeStatic(core.clj:3187)
	at clojure.core$eval.invoke(core.clj:3183)
	at clojure.main$repl$read_eval_print__9983$fn__9986.invoke(main.clj:242)
	at clojure.main$repl$read_eval_print__9983.invoke(main.clj:242)
	at clojure.main$repl$fn__9992.invoke(main.clj:260)
	at clojure.main$repl.invokeStatic(main.clj:260)
	at clojure.main$repl.doInvoke(main.clj:176)
	at clojure.lang.RestFn.invoke(RestFn.java:1523)
	at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1503.invoke(interruptible_eval.clj:87)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1963)
	at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1963)
	at clojure.lang.RestFn.invoke(RestFn.java:425)
	at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invokeStatic(interruptible_eval.clj:85)
	at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:55)
	at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1548$fn__1551.invoke(interruptible_eval.clj:222)
	at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1543.invoke(interruptible_eval.clj:190)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
which I have no idea how to interpret
#2016-11-1604:27mulchyHmm, not sure how to make that smaller#2016-11-1604:28mulchyI thought starting the nREPL server using the boot task in the terminal was the "right thing" to do#2016-11-1604:30rmuslimovhm, never worked with weasel and not sure how to fix that based on traceback#2016-11-2113:49lowl4tencyHey guys, how I could pass to (kbd) a key Fn of my macbook?#2016-11-2113:49lowl4tencyC - cmd, s - super, M - meta, which name for fn?:)#2016-11-2115:39chrisfn is not a regular key and it’s not picked up by emacs afaik#2016-11-2115:40chrisso if you type C-h k and then fn-<other-key> emacs only sees <other-key>#2016-11-2116:04richiardiandreaHello emacs channel! What is the best setup/mode for Java nowadays? #2016-11-2116:11cmack@lowl4tency if you are using a gui emacs, I think (kbd “<f5>”) should work#2016-11-2116:12lowl4tencychris yeah, seems so, before update to 25 I've got [Fn-right] as move-end-of-line. Now it's as End button#2016-11-2116:13lowl4tencyA bit annoyed but I used to C-e yet#2016-11-2116:15lowl4tencycmack it works pretty good for keys f{1-12} but I meant Fn key 🙂#2016-11-2116:15chris@richiardiandrea: java is unfortunately kind of a wasteland. some people use malabarba mode, but something I’ve seen gaining a lot of steam is ensime (which is a scala mode)
#2016-11-2116:15chrispeople are using ensime without scala, but I was unable to get it to work for my (very complicated) java build#2016-11-2116:15lowl4tency@richiardiandrea Inteleji Idea 🙂#2016-11-2116:17lowl4tencySeriously, Java is a monster, very complex to progrmming in Java w/o something like IDea or Eclipse#2016-11-2116:17richiardiandreaI read that the ensime team is working on a Java version (but slowly) on github#2016-11-2116:17richiardiandreaI was thinking of using Idea for refactoring and emacs for pure editing#2016-11-2116:18richiardiandrea(I am a former Java dev, who can't live without paredit/smastparens/emacs anymore)#2016-11-2116:20richiardiandreaBut I'll give ensime a try first#2016-11-2116:26mikepjbis anyone using ivy/counsel/projectile for fuzzy searching files in projects? I’ve found it to be a nice setup except that in large codebases it will grind to a halt#2016-11-2116:32jcsimsI use projectile and it’s always been super fast for me (silver-searcher + OS X for me)#2016-11-2116:33jan.zy@richiardiandrea I asked my friend who was searching for the best emacs-java setup and he suggests using meghanada or enjime#2016-11-2116:36richiardiandrea@jan.zy thanks! Enjime is what I was talking about ! Will try both anyways#2016-11-2116:36jan.zy👍#2016-11-2116:37benedekhave not tried myself (not working with java nowadays) but jdee is in active development again#2016-11-2116:37benedekmight worth a try?!#2016-11-2116:38benedekhttps://github.com/jdee-emacs/jdee#2016-11-2116:39mikepjbthanks @jcsims I’ll have a closer look at projectile - most likely there’s a setting that needs tweaking#2016-11-2116:40mikepjbthis particular project is within a git project but is not the root (there are multiple projects in the codebase)#2016-11-2116:40mikepjbI think it’s probably defaulting to something like git ls-files in the background and it’d probably be better off using find or similar#2016-11-2116:44jcsims@mikepjb I should clarify that I’m just using projectile and ag, not ivy/counsel, if that helps#2016-11-2116:47chrisprojectile has caching off by default now iirc#2016-11-2116:47chrisfor my large codebase I needed to turn it back on even with ag#2016-11-2116:47chrisjust remember that when you go to a different branch you may need to clear the cache#2016-11-2117:07mikepjbfzf.el works well, the interface isn’t nearly as nice as projectile/ivy/counsel however#2016-11-2119:15surreal.analysisIf I’m in a buffer, is there a cider command to open that buffer’s test file?#2016-11-2119:16surreal.analysise.g. I’m in my-ns.core, and I want to open my-ns.core-test#2016-11-2119:38christhis is implemented not in cider but in projectile#2016-11-2119:38chrishttps://github.com/clojure-emacs/cider/issues/734#2016-11-2119:38christhe issue where they came to that conclusion#2016-11-2119:39christhe projectile function is called projectile-toggle-between-implementation-and-test#2016-11-2119:39chrisyou can also use cider-test-jump which is a cider function but only works on the function level#2016-11-2119:40chrisso you have to be within a function, not just a namespace#2016-11-2202:50richiardiandreaComing back to a Java mode, actually jdee received the malabar-mode code so I guess I will try it first and see what happens#2016-11-2218:33surreal.analysisOkay, thanks!#2016-11-2302:14agDoes anyone know if it’s possible to stage hunks in Ediff? like in magit-diff?#2016-11-2423:06richiardiandreareport of my Java+emacs adventures: ensime kind of works but also requires you to install the scala things#2016-11-2423:06richiardiandreajdee is weird for me, the user manual shows menus that you can access with your mouse (which of course I completely disabled)#2016-11-2423:07richiardiandreamalabar-mode says it is going to be merged in jdee but I really don't see the feature parity#2016-11-2515:04jfntnsounds like a normal day in emacs land 🙂#2016-11-2619:01dpsuttonI'm writing some tests in emacs. Pretty simple function and I need to shadow a defcustom var and it works in the scratch buffer but not from executing my tests with buttercup#2016-11-2619:08dpsuttondoes anyone know why I can't shadow a defcustom with a let binding?#2016-11-2718:38richiardiandreaSummoning @ewen 🙂 he has developed a clj+cljs mode + tooling that is interesting to know more about!#2016-11-2718:38richiardiandreaI am talking about https://github.com/EwenG/replique.el, see #announcements#2016-11-2718:51ewenthx! please give me feedback if you try it out 🙂#2016-11-2719:24rmuslimov@ewen may I ask dumb question - is it cider alternative? What differs replique.el from cider? thanks,#2016-11-2720:03richiardiandreaalways interested in alternatives, what are "The Cool Features" of replique I should absolutely try 🙂 @ewen#2016-11-2721:23ewen@richiardiandrea easy to setup clojurescript repl (no configuration needed)#2016-11-2721:24ewenloading cljs files works just like in clojure, no file watcher needed#2016-11-2721:25richiardiandreainteresting, are you using tools.namespace for that, I mean, there must be a watcher right?#2016-11-2721:25ewenjs file are written to disk, everything works across browser refresh, unlike the raw cljs repl (see http://dev.clojure.org/jira/browse/CLJS-1300)#2016-11-2721:26ewenautocompletion works in cljs and cljc#2016-11-2721:26eweneldoc style documentation works in cljs and cljc#2016-11-2721:26ewenjump to definition works in cljs and cljc#2016-11-2721:27richiardiandreavery cool, there was some talking around tooling just a bit ago on #clojurescript#2016-11-2721:27ewenwhen i say cljc, i mean files are loaded both in the clojure runtime and the clojurescript runtime, and tooling stuff is aware of reader conditionals#2016-11-2721:27richiardiandrea@ewen that's a killer feature indeed#2016-11-2721:27ewencss reloading#2016-11-2721:27ewenjs reloading#2016-11-2721:28eweni had sass reloading also but i'm heading towards a custom css preprocessor now for better integration#2016-11-2721:29ewenno i don't use tools.namespace#2016-11-2721:31ewenno there is no file watcher, when you reload cljs file, it is compiled to disk and sent to the browser#2016-11-2721:32ewenjust like clojure.core/load-file, with the difference that a js file is written to disk because of the possibility for the browser to be refreshed#2016-11-2721:36richiardiandrea@ewen sounds awesome, I'll have a go, you convinced me 👍 #2016-11-2721:36ewengreat 🙂#2016-11-2721:53ewentell me if you encounter installation issues, I guess nobody tried replique yet beside me 😛#2016-11-2906:24tianshusounds great, i'm going to have try#2016-11-2906:35tianshu@ewen How can I use it with my figwheel project? or is it neccessary still using figwheel with replique?#2016-11-2909:31ewen@doglooksgood No, you don't need figwheel#2016-11-2909:32tianshuwhen I start replique/cljs-repl, It let me to open a port with browser. But that page is not the page that contains my cljs code.#2016-11-2909:36tianshuIf there's a tutorial or video for development basic setup, step by step, that will be great help.#2016-11-2909:36ewenif you are not using the cljs repl in the context of a web app, cljs files are not loaded automatically, you must manually load a cljs file to execute something in the browser#2016-11-2909:36ewenif you want somthing to execute automatically, you must use a web server and output a main js file#2016-11-2909:36tianshuI'm using cljs repl of a web app. My cljs code will be run in browser#2016-11-2909:36ewenin both cases it will run in the browser#2016-11-2909:37ewenis your cljs repl started ?#2016-11-2909:39tianshuWhich cljs build will be used by replique/cljs-repl?#2016-11-2909:39ewenthe one which does not automatically load you cljs code#2016-11-2909:40ewenyou must M-x replique/load-file a cljs file#2016-11-2909:42ewenhum sorry i misread you question#2016-11-2909:42ewenreplique/cljs-repl starts a cljs repl, which is not dependant of the js runtime#2016-11-2909:43ewento execute js code, you must connect a browser to the cljs repl#2016-11-2909:43ewenthe easiest way is to open a browser tab on localhost:<repl-port>#2016-11-2909:43ewenand then typing something at the REPL or loading a file#2016-11-2909:44ewenbut sometimes you want to use the cljs repl to develop a webapp (ie you are serving web assets from a webserver and want the web pages served by the web server to automatically connect to the cljs repl)#2016-11-2909:45ewenwithout writing cljs repl specific code#2016-11-2909:46ewenoutputting a main-js file let you do that, you can output a main js file and link it into you html markup (thats the main entry point of your application, which also happen to connect to the cljs repl)#2016-11-2909:50tianshuwith cljsbuild I have a main.js, included in index.html. if my web server is running at localhost:5000. I can open my index page with localhost:5000/index.html.#2016-11-2909:51tianshuhow can main.js find replique/cljs-repl?#2016-11-2909:55ewenyou must start a cljs repl, load your main cljs namespace (ie your entry point, and then use replique/output-main-js-file -> you will be prompted for the ouput path of the file (ie the "main.js" file in you comment above) and then you will be prompted for the main cljs namespace (ie the namespace that will be executed on startup)#2016-11-2909:55ewenthen you can link this file in you index.html#2016-11-2909:56ewenof course you must output this file in your web server assets folder#2016-11-2909:58ewenand the reason the cljs namespace must be loaded before using replique/output-main-js-file is because replique will query the cljs compiler in order to prompt you for a cljs namespace, thus this namespace must be loaded beforehand#2016-11-2909:58tianshuthis make sense, I will have a try, thank you!#2016-11-2909:58ewengreat 🙂#2016-12-0208:18tianshuHi, @ewen does replique support hot reload? now I have main.js and linked in my index.html. now It works when I save changes, replique/load-file then reload browser page.#2016-12-0213:36ewenHi @doglooksgood, replique/load-file pushes the code to the browser. You should not need to reload the page#2016-12-0213:38tianshu@ewen Maybe I missed the correct way to open my index.html?#2016-12-0213:40tianshumy browser open two tab, tab for replique port, the other for my index page(url is something like file:/// ...)#2016-12-0213:43tianshuand another question, I have a core.cljs, I load this file. then I add another foo.cljs, and require foo in core.cljs. then I reload core.cljs, It seems that foo.cljs is not been loaded. I have to load it manually, is it the correct behavior?#2016-12-0213:46ewenYou only need 1 tab. The tab open on the replique port is only needed when you don't want to start a web server (in which case replique will start one for you)#2016-12-0213:48ewenYes you have to call replique/load-file on both file. The semantic is the same than clojure.core/load-file.#2016-12-0213:49tianshuwhich folder will be served by replique? resources/ ?#2016-12-0213:52ewenReplique serves target/cljs (by default)#2016-12-0213:59ewenI will try to improve the documentation#2016-12-0214:19tianshuI have done output-main-js#2016-12-0214:19tianshuso that every time I load file, the js file updated.#2016-12-0214:20tianshubut my index.html should move to target/cljs/index.html ?#2016-12-0214:35tianshuIf there's an example project, that will be great help#2016-12-0216:21ewen@doglooksgood: no your index.html must stay in the assets folder of your webserver#2016-12-0216:41ewenI will setup an example project #2016-12-0222:22ewen@doglooksgood Here is an example project: https://github.com/EwenG/replique-pedestal#2016-12-0304:19tianshu@ewen I following the example project, It works. thanks!#2016-12-0304:22tianshuWhat's the road map for replique?#2016-12-0306:21jfntnWow replique is fast! I just tried to (println (range 10000)): in Cider it takes 10 seconds and the repl stalls updating only a couple of times, inf-clojure doesn’t choke but takes almost 15 seconds, finally replique completes in about 4 seconds with a dozen repl updates#2016-12-0309:38ewen@jfntn that's probably because nrepl encodes everything in bencode#2016-12-0309:39ewenthe difference between inf-clojure and and replique is probably because the raw cljs repl tries to reorder messages sent by the browser#2016-12-0309:44ewen@doglooksgood I would like to add less, sass and stylus support#2016-12-0309:47ewen@doglooksgood cljs autocompletion for js interop things#2016-12-0309:48ewenif I find a way to do it right#2016-12-0309:52ewen@jfntn oh, you mean at the clojure REPL? then I don't know where the difference between inf-cojure and replique comes from#2016-12-0313:24jfntn@ewen as far as inf-clojure is concerned it’s definitely the comint filter#2016-12-0313:33jfntn@ewen curious to hear 1) why you started replique rather than build upon cider or one of the existing projects? and 2) what are your thoughts in terms of roadmap and things you want to add?#2016-12-0315:40tianshuI think there's a feature should be added, whenever I save the file, it reload the relative namespaces. so that the browser can reload.#2016-12-0315:41tianshuAnd I wonder if it is possible to have es5 syntax for output js file. maybe some additional shim for react native. currently react native did not have a perfect solution.#2016-12-0316:01ewen@jfntn 1) because I did not want to use nrepl and because adding replique style clojurescript support to cider would be a lot of change to cider, so 1) it would be harder to implement than starting from scratch, 2) it would probably not have been accepted into cider anyway#2016-12-0316:04ewen2) there is a lot of things I want to add to replique, css preprocessors support, spec based completion and documentation, classpath reloading#2016-12-0316:04ewenbut i may change my mind of course#2016-12-0316:10ewen@doglooksgood if you mean reloading a file on file save, that's not something i am going to add, I want to keep control when files are reloaded, although you can easily hook into emacs buffer saving to implement something like that#2016-12-0316:10jfntn@ewen totally agree on 1), I think it’s time to move away from nrepl but unfortunately cider is so dependent on it that it seems to make more sense for them to try and retrofit socket repl into nrepl rather than build on the native stuff directly#2016-12-0316:13ewen@doglooksgood if you mean automatically reloading dependent namespaces, I think it could be useful but I'm not going to add it because 1) that's hard to implement, it requires some amount of global static analysis and because 2) I don't think that's needed in a repl driven workflow where files are often reloaded right after beeing edited#2016-12-0316:14ewen@doglooksgood the es5 output configuration would definitively be useful#2016-12-0316:15ewen@doglooksgood concerning react native, I have no idea what's needed to support react native, but i'm definitively interested in adding that#2016-12-0316:19jfntn@ewen are there any large chucks of cider functionality you’d like to implement/port? I can see myself missing the stacktrace popup/navigation and most definitely the debugger#2016-12-0316:19ewen@jfntn you can't retrofit a stream oriented REPL into nrepl. a stream oriented REPL (or socket REPL) is more fundamental than a message oriented REPL. you can build a message oriented REPL on top of a stream oriented REPL but the opposite is not true#2016-12-0316:20ewenactually replique have both, the REPL is stream oriented, and the tooling stuff uses a message oriented REPL#2016-12-0316:20jfntnHmm couldn’t you have an adapter that wraps the socket and parses the stream into messages to restore compatibility? Not saying I’d wanna do that, just doesn’t seem impossible...#2016-12-0316:21ewenyes you can parse stream into message but not the opposite#2016-12-0316:23jfntnDon’t wanna bikeshed here since we’re both not interested in a socket-based nrepl, but I don’t understand why you couldn’t do it 2way. Have a proxy take messages in nrepl format and write them to the socket…? Not familiar with nrepl internals at all, so disregard if I’m totally wrong!#2016-12-0316:25ewenyou mean by using 2 sockets ?#2016-12-0316:26ewenyou can do that but the second socket is still message oriented then, ie the reader still has to parse messages#2016-12-0316:27jfntnYeah I see your point#2016-12-0316:28ewenthere is a good discussion about that on the mailing list https://groups.google.com/forum/#!topic/clojure-dev/Dl3Stw5iRVA#2016-12-0316:29jfntn@ewen What are your thoughts on emacs/clojure interop? I’ve seen mostly the clj code as strings sent over the wire, as well as the nrepl request payloads with lists of strings. Both of which seem like a maintenance nightmare esp on the client side#2016-12-0316:29jfntnThanks will take a look#2016-12-0316:31jfntnIt seems like the clojure code should have a clear api for exposing methods to the client, and possibly use macros/templating/code-generation to spit a emacs-lisp library that clients can use?#2016-12-0316:36ewenwell the emacs client of replique prints EDN data and reads elisp data, the server read EDN and prints elisp. Implementing a printer is much easier than implementing a reader. On the server side, tooling message handling is done by a multimethod so adding a new tooling message means adding a new method#2016-12-0316:37ewenAt first I implemented an EDN reader on emacs side. That worked but was MUCH slower that reading elisp#2016-12-0316:37ewen(and it was much more code too :p)#2016-12-0316:37ewenthe only downside I can see is that elisp cannot be extended like edn#2016-12-0316:38ewenIf I ever need it to be extensible, I would probably have to implement something like transit#2016-12-0316:38jfntnLike an elisp transit codec?#2016-12-0316:39ewenmore like a transit-elisp spec#2016-12-0316:39ewenrather than transit-js#2016-12-0316:39ewenbut i don't think that will ever be needed#2016-12-0316:40jfntninteresting thought though 😉#2016-12-0316:45jfntnDo you have any thoughts on debuggers? I’ve been wondering how feasible it’d be to write one as a library to work with socket repl.#2016-12-0316:46jfntnThe one in Cider is pretty decent, but still pales in comparison to what people use in CL or even scheme and at a glance it seems like this could be a symptom of the implementation being too much of a emacs hack as opposed to a clojure-first effort with an emacs ui on top#2016-12-0316:47jfntncljc support certainly seems like it’d make it tricky...#2016-12-0316:51eweni have never use a debugger in cl or scheme so i can't tell#2016-12-0316:52ewenbut the cursive debugger looks very good, i think that's just a matter of spending a lot of time to make it good#2016-12-0316:54jfntnCertainly not a CL or scheme expert but what they have is basically a debugging mode right in the repl. When an error occurs, the repl switches to the debugger right at that frame, and you have a bunch of commands to inspect the environment, step through the code etc#2016-12-0316:54ewenlike the emacs one#2016-12-0316:55jfntnThe emacs tools like slime that build upon that makes for a really great experience#2016-12-0316:56ewenbuilding upon a separate platform (the jvm) definitively makes a good integration harder, although not impossible#2016-12-0316:56jfntnWell slime has the same problem really#2016-12-0316:57ewen+ the jvm debugger has good support for multithreading debugging, I'm not sure that's the same story in CL or scheme#2016-12-0316:57jfntnThere’s probably a lot to be learned from it, though the codebase is huge at this point#2016-12-0316:59ewena downside of the jvm debugger is that it only keeps track of line numbers, which is not sufficient for lisp languages#2016-12-0317:00jfntnActually this is a lot better in CL because of the restart system that’s more powerful than exceptions. Any error in any thread will yield a debugger prompt, you can inspect and redefine the code while execution is paused, and once it looks like the bug is fixed you exit the debugger and execution resumes from the last restart point (think the last try block) as if the bug never happened. Really cool#2016-12-0317:03jfntnWas referring to multi-threaded support, interesting point about line numbers, wasn’t aware of that, not sure how this’d work...#2016-12-0317:04ewenthat's the last time i looked though, maybe it improved since#2016-12-0317:08jfntnquick google search hints at method entry breakpoints on the jvm#2016-12-0317:10ewenyes but you need the associated line number and column number in the source file#2016-12-0320:23jfntn@ewen do you have any interest in supporting boot-clj as well?#2016-12-0320:28ewen@jfntn yes if it does not affect the REPL startup process too much#2016-12-0323:25kzeidlerI'd like to follow along with this clojure setup tutorial (http://www.braveclojure.com/basic-emacs/) but I have an existing Spacemacs config I'd like to keep. What's the preferred way to manage multiple configurations?#2016-12-0400:27jfntnhttps://www.youtube.com/watch?v=ipDhvd1NsmE#2016-12-0400:27jfntnAwesome tracing tool with good emacs integration#2016-12-0400:28jfntnHaven’t tried yet but demo was super impressive#2016-12-0401:15chris@kzeidler: Is there any reason to not just use the clojure layer? It's quite good and full featured. #2016-12-0409:23tianshu@ewen since reload dependency namespaces is difficult, how about add a on-jsload function? I can have rerender React in that function. otherwise reload the namespaces (except the main namespace) will not cause the rerender.#2016-12-0410:31ewen@doglooksgood I will think about that, having a way to trigger a rerender on file load would be very useful#2016-12-0416:12hlolliparedit users, does anyone use M-; from paredit. Seems very pointless function paredit-comment-dwim. I'm trying to find a conveinient way to comment in emacs terminal mode, kowing that C-; is not possible witin a terminal. Just trying to unbind this paredit command and rebind it with my function, but its not as straightforward as it sounds.#2016-12-0416:22hlolliahh so its a known problem https://stackoverflow.com/questions/16605571/why-cant-i-change-paredit-keybindings as previously recommended here on this slack channel by @doglooksgood (I think) there are alternatives to paredit worth to try. Im off to explore 🙂#2016-12-0416:24tianshuno, I'm using parinfer, paredit is hard to me.#2016-12-0416:27hlolliyes Im giving parinfer another shot as we speak, remember last time I was bit shorter on time, I try lispy too while Im at it#2016-12-0416:40hlolli@doglooksgood how do you make a new-line in parinfier. Also wondering if parinfier makes sense if Im not using evil mode?#2016-12-0416:42hlolliahh one needs to make () or [] first before sending it down, took me few mins to realize this, interesting!#2016-12-0416:44tianshumake a newline by simply pressing enter, you will get something like this:
(foo bar)
        |
When you type something at newline, the close paren will move down.
(foo bar
     baz|)
#2016-12-0416:46tianshuyou can use parinfer with or without evil, lispy, smartparens.#2016-12-0416:47hlolliok, what you show there in your foo bar example, do you have Parenfier:Paren or Parenfier:Indent set on?#2016-12-0416:48hlolliand also, would you recommend against using aggressive-indent?#2016-12-0416:49hlolliahh yes, got it! the closing paren becomes "dissolved". But that is in Indent mode.#2016-12-0416:53tianshubasically, you'll always use Indent mode. the Paren mode used for 3 case: 1. the parens is unmatched in the code, with Paren mode, you can fix parens. 2. you want to change the function (for example, foo -> balabala), you have to switch to Paren mode at this moment. otherwise your code struct may change, because Indent mode will adjust parens by indentation. 3. you want to wrap an expression, the reason is same to 2.#2016-12-0416:58hlolliok, that is totally alien for me coming from paredit. But sounds like Paren mode is like turning off paredit mode. It would be nice if you had a bit better documentation, just a bit more. So I hope you forgive my questions 🙂#2016-12-0417:00tianshuIf you enjoy the feel of parinfer and want to know the detail how it works. there's a home page of parinfer: https://shaunlebron.github.io/parinfer/ I think this can help you#2016-12-0417:01hlolliok, I also see that parinfier will not work at all with aggressive indent mode on.#2016-12-0417:01hlolliok I check it out#2016-12-0417:02tianshu🙂#2016-12-0501:41kzeidlerI haven't been using emacs for very long, so maybe this is something I'll just "get used to." But by far the biggest obstacle to me has been the lack of a static visual project tree in the margin of the editor (typical of sublime & most IDEs)#2016-12-0501:42kzeidlerI found a popup-based view (neotree?) but that's not quite what I had in mind. Is there an equivalent that opens in a buffer window?#2016-12-0502:11tianshu@kzeidler another option is speedbar or sr-speedbar.#2016-12-0502:13kzeidler@doglooksgood do either of those have an option to embed the filesystem view as a static "widget" in emacs, or is that simply not how emacs works?#2016-12-0502:14tianshuthis sr-speedbar will not affected by C-x 1, C-x 0 and some window commands like these#2016-12-0502:15tianshuIt will always stay there until you close it.#2016-12-0502:15kzeidlerThat sounds promising!#2016-12-0502:18kzeidler@doglooksgood As for workflows, I'm curious – this obviously isn't a "pure emacs" feature, and I'm sure other developers like to quickly survey the filesystem of the project (which might be quite wide/deep). What do emacs users normally use to find their way around these forests?#2016-12-0502:19kzeidlerJust C-x C-f?#2016-12-0502:22tianshuprojectile is a good plugin, It provides you a lot of commands with project level. If you want to switch to an opened buffer, you can use C-x b. If you want to switch to a file in project, you can use C-c p f (projectile) If you want to search in project, you can use C-c p s s (projectile + ag) If you want to browser your file system, you can use C-x d (built-in feature, dired)#2016-12-0502:24kzeidlerOoh so that's what projectile is. I noticed it came bundled in my distro of spacemacs, but I wasn't sure what it was for#2016-12-0502:24kzeidlerMany bells and whistles in spacemacs of uses to me that are as-yet-unclear 🙂#2016-12-0502:26tianshuIf you just want to learn emacs for writing clojure code, maybe you can DIY your configuration piece by piece. just some necessary plugins, won't cost too much time.#2016-12-0502:27kzeidlerI've been wondering precisely this. Do you think it's best to start with a minimal distro and extend it as necessary, or a fat, full-featured distro and pare it down as required?#2016-12-0502:30kzeidlerI don't know if I've found the happy medium between the "pure emacs" experience (which is virtually unusable on mac due to the mapping of meta key to control) and one that has some sensible extensions to make the dev experience more productive#2016-12-0502:30kzeidlererr.. to command#2016-12-0502:35tianshuI prefer the minimal distro, just some necessary plugins, and nearly zero custom keybinding.#2016-12-0502:36tianshubut some people prefer full-featured distro, because with a heavy customize, emacs can look like a modern editor. just like spacemacs.#2016-12-0502:39kzeidlerI won't lie – the aesthetics of emacs, right out of the box, are very jarring. I've seen enough screenshots of customized workflows that I know it can look quite nice, but it seems to be no simple matter#2016-12-0502:42kzeidlerSometimes I'll look up some lovingly crafted dotfiles, paste them into my config, and reboot with the new fancy UI loaded. But inevitably the dotfile is customized in other ways that are quite personal and unexpected and I end up deleting it 🙂#2016-12-0502:44tianshuto beautify your emacs UI, what you need is just theme + powerline/smart-modeline/spaceline. there's no need to copy others' dotfile.#2016-12-0502:46kzeidler(to clarify – by "UI" I mean also the view mode, like the various panes that people have configured as part of their emacs setup, the side-by-side REPL, etc.)#2016-12-0502:50tianshuI think view mode is flexible and free, the emacser won't want a fixed view mode. just split the window whenever you need. for example, most of time, I only have one window. when I need REPL, press C-c C-z. when job is done, just close that window.#2016-12-0502:56kzeidlerInteresting. I'll keep that advice in mind. I do suspect some of my hangups with emacs are related to features I'm just used to having in IntelliJ, but don't truly "need"#2016-12-0502:58kzeidlerSpecifically w/r/t the view components. I think the feature set of emacs is actually quite a bit more robust#2016-12-0502:58kzeidlerAnd I would think/hope, less bug-ridden as well#2016-12-0503:04tianshuto have some feeling how emacs should be used, some video on youtube may help. I enjoy the way the author using emacs in this video: https://www.youtube.com/watch?v=aWJPlRVZX90 🙂#2016-12-0503:09tianshu@kzeidler A little question, my english is poor, what is w/r/t stands for? w/ is with i think?#2016-12-0503:11kzeidler@doglooksgood w/ is with! "w/r/t" = with respect to, it's a bit academic, I picked up the convention in school and never quite dropped it 🙂#2016-12-0503:11kzeidlerthis tutorial is great, thanks for linking it. I'm simultaneously trying to build my first sockets-based app, so this is perfect#2016-12-0503:12tianshusounds great:slightly_smiling_face:#2016-12-0605:41tianshuseems found a bug for cojure-mode c-c spc. it will separate # and () for #().#2016-12-0913:35thegeezHi, when I do C-u C-x C-e the result is put into the buffer next to what I just evaluated. If I do C-x C-e the result is in the mini-buffer and will disappear from the buffer on the next action. Is there a key combo to insert the result into the buffer after doing C-x C-e?#2016-12-0913:40hlolliwow, don't have the answer but thanks for sharing this C-u C-x C-e trick#2016-12-0914:36dpsuttonM-x eval-print-last-sexp#2016-12-0914:54thegeez@dpsutton using that lands me in a debugger backtrace buffer#2016-12-0914:55dpsuttonare you evaluating clojure or emacs lisp code#2016-12-0914:55thegeezit works for (+ 3 4) but not for (or (println "evalling") :xyz)#2016-12-0914:55dpsuttonah#2016-12-0914:55dpsuttonbecause the former is valid elisp#2016-12-0914:55dpsuttonits an elisp evaluation#2016-12-0914:55dpsuttoni saw emacs channel i thought you wanted to eval emacs lisp#2016-12-0914:55dpsuttonmy bad#2016-12-0914:56thegeezAh yes, I meant for clojure code. Although if there is a common way to refer to the last output in the minibuffer then that might work for both#2016-12-0914:57dpsuttoncider-eval-last-sexp-to-repl (C-c M-e)#2016-12-0914:57dpsuttondoes that meet your needs?#2016-12-0914:58dpsuttoncider-eval-defun-to-comment C-c M-;#2016-12-0914:58dpsuttonlooks handy as well#2016-12-0914:59thegeezthose are helpful, but both seem to do the evaluation again. My use case is more for "crap, I lost the output of that long running operation"#2016-12-0915:00dpsuttonoh i think i misunderstood your original intent#2016-12-0915:00dpsuttonwhat are you looking to do?#2016-12-0915:01thegeezOh I see that the results are also in the Messages buffer, that is helpful too#2016-12-0915:01thegeezWell sometimes I do C-x C-e when I wanted to do C-u C-x C-e, so I want to be able to have the output somewhere after running something#2016-12-0915:04dpsuttonso you want to save the output of code?#2016-12-0915:04dpsuttonmaybe bind the print to repl one to a convenient shortcut?#2016-12-0915:04dpsuttonand always stick it out to the repl?#2016-12-0915:07thegeezFor me it works to use C-u C-x C-e and if I do C-x C-e instead I now know that I can lookup and paste the result from the Messages buffer. That works for me#2016-12-0915:08thegeezI use this when adding a (comment ..) section in a clojure file and trying out some things in there to see how code works.#2016-12-0923:03christianromneycan someone answer a really stupid question for me please? 🙂 is there a standard elisp package / lib providing the function “first” that I ought to know about? I know I can just use “car” or define my own. but a couple of packages I have seem almost to expect that it be there. tia#2016-12-0923:03christianromneysomething like dash.el but which contains things like first, last, butlast, etc#2016-12-0923:04dpsutton/usr/local/share/emacs/26.0.50/lisp/emacs-lisp/cl.elc (defalias first) /usr/local/share/emacs/26.0.50/lisp/emacs-lisp/cl-lib.el (defun cl-first)#2016-12-0923:05dpsuttonlooks like the cl and cl-lib are what you're looking for#2016-12-0923:05dpsuttonnot sure how to ensure they are imported#2016-12-0923:05christianromney@dpsutton thanks so much!#2016-12-0923:05dpsuttonno prob#2016-12-0923:06christianromneyi didn’t really know how to formulate the question for google “elisp first function” gets misinterpreted#2016-12-0923:06dpsuttonhaha yeah#2016-12-0923:06dpsuttonluckily i had that package in my environment, so i just went to its definition#2016-12-0923:06dpsuttonand it had those two options#2016-12-0923:06dpsuttonthe alias and defun#2016-12-0923:06christianromneypretty sure now that you mention it that i’ve seen (require ‘cl) before#2016-12-0923:06dpsuttonthere's weird stuff like require on compile#2016-12-0923:06dpsuttonand some other weird stuff#2016-12-0923:06dpsuttonand the emacs crew don't like cl, even though everyone uses it#2016-12-0923:06dpsuttoni'm not really sure#2016-12-0923:07christianromneyman, really thanks, lol. this was really irritating me 🙂#2016-12-0923:07christianromneyyou’ve contributed to the net happiness in the universe#2016-12-0923:08dpsuttonwell, i didn't hold the door open for someone coming into the coffee shop so this just makes the universe net even again#2016-12-0923:08christianromneywell, you have restored balance to the force#2016-12-0923:16christianromney@dpsutton don’t suppose you have function* ?#2016-12-0923:16christianromneyi’m trying to run 4clojure mode and getting errors for a bunch of missing defs#2016-12-0923:16dpsutton?#2016-12-0923:16dpsuttonfunction* ?#2016-12-0923:17dpsuttoncl-macs#2016-12-0923:17dpsuttonweird#2016-12-0923:17dpsuttonthey should bring in their own dependencies#2016-12-0923:17dpsuttoncl-macs.el is the file you are looking for it seems#2016-12-0923:18christianromneythanks again. yeah, 4clojure mode depends explicitly on json and request but apparently assumes cl and cl-macs#2016-12-0923:18christianromneyi may file an issue after i ascertain that i’m not the bozo#2016-12-0923:27christianromneyah there’s a PR https://github.com/losingkeys/4clojure.el/pull/8/commits/63f40a39932fd31cc82a713d6546b71569ffdd88#2016-12-0923:29dpsuttonnice#2016-12-1301:02radonIt just occurred to me that paredit doesn’t seem to have a command for swapping two adjacent s-expressions.#2016-12-1301:02radonAm I missing something?#2016-12-1301:44tianshu@radon seems there's a built-in command. C-M-t#2016-12-1303:26radon@doglooksgood: Doesn’t that transpose words rather than s-expressions?#2016-12-1303:27radonIt’s from Emacs core rather than paredit.#2016-12-1303:28tianshuit depend on where your cursor is, if you want to transpose sexp, you should place your cursor at the beginning of sexp.#2016-12-1303:30radonWow, wait. My terminal is dropping the control key!!#2016-12-1303:30radonNice, thanks!#2016-12-1303:30radon#terminalproblems#2016-12-1303:30tianshu🙂 that will exchange this two lines, but the cursor will move to the end, not very handy.#2016-12-1303:31radonEh, not really a problem with paredit. I can just C-M-b my way back if need be.
#2016-12-1611:15luposlipNewbie with Emacs (not Clojure), just shared my ErgoEmacs+Clojure setup here: https://github.com/luposlip/emacs-cheatsheet Any comments are welcomed! 🙂#2016-12-1618:53surreal.analysisC-c M-j works instead of cider-jack-in#2016-12-1618:54surreal.analysisOther than that, looks good! I’m not too familiar with ErgoEmacs, though, so that’s about all I can comment on#2016-12-1618:55surreal.analysisAnd I find that C-c C-t C-t is more natural to hit for test at point, but that’s a personal preference#2016-12-1711:20luposlipThanks for your input @surreal.analysis#2016-12-1711:23luposlipAgree on your points.#2016-12-1711:25luposlipUpdated the cheatsheet accordingly 🙂#2016-12-1716:59dpsuttondoes anyone know how to turn off edebug for all functions? I find that I build up a few debugged functions and then i have to remember which ones are and go reevaluate them manually#2016-12-1716:59dpsuttonis there a way to at least get a list?#2016-12-1717:00dpsuttonit looks like edebugging just puts that function into the function plist#2016-12-1717:00dpsuttonso i'm thinking (mapatom (lambda (x) (when (get x 'edebug-on-entry) blah)) but this seems to not work. And not work really quickly, almost like emacs knows the get never returns anything and immediately bails#2016-12-1717:01dpsuttonwhen i run a count function over it, it takes a minute and returns back like 63,000 or so#2016-12-1717:01dpsuttonso it would appear its not mapping at all#2016-12-1719:23surreal.analysiscider-refresh should clear out all debugged functions, right?#2016-12-1719:50dpsuttonedebug is the emacs debugger for elisp#2016-12-1719:50dpsuttoni'm actually instrumenting CIDER functions in elisp#2016-12-1817:19martinklepsch👋 I've been using helm all the time but I just realized how primitive it's suggestions are. For example is there a mixture of helm-projectile-recentf and helm-projectile-find-file where recent files have "a higher score" than other files in the project?#2016-12-1817:23martinklepschKind of thinking along the lines of metrics like frecency described here: https://github.com/rupa/z#2016-12-1820:53xk05i recall seeing a package or two off melpa or marmalade that address that#2016-12-1823:54richiardiandrea@martinklepsch that's very interesting! Maybe helm folks are interested in adding it?#2016-12-1914:04hlolliFinding a needle in heystack... but heck, are some folk getting Fatal error 11: Segmentation faultAborted (core dumped) after update to emacs25?#2016-12-1914:39cmack@hlolli I haven’t had this issue on macosx or linux versions yet. What is your emacs version string?#2016-12-1914:40hlolliGNU Emacs 25.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.22.1) of 2016-10-12 I must add that Im programming in cider when I crash, if that combination is a contributor factor.#2016-12-1914:42hlollimaybe start emacs with gdb, never did much c debugging#2016-12-1921:24angelixdI always have to look this up. IIRC you’re stuck in a recursive edit: https://www.gnu.org/software/emacs/manual/html_node/emacs/Recursive-Edit.html#2016-12-1921:24angelixdexit-recursive-edit or abort-recursive-edit should work in your case#2016-12-1921:26angelixdIf you haven’t figured it out already @dpsutton#2016-12-1921:27dpsuttoni'm not sure what you're talking about#2016-12-1921:27dpsuttonif you mean recursive edits, etc#2016-12-2117:50normanI’m looking for a function that reformats the current expression (or current top level expression) and collapses dangling parenthesis. indent-sexp (which is called from paredit-reindent-defun) does not do this. It preserves#2016-12-2117:52normanparedit-close-round un-dangles, but it’s somewhat context-sensitive and has to be run multiple time#2016-12-2118:41jfntnnorman: lispy has something like that: special-lispy-tab#2016-12-2118:41normanI’ll take a look - thanks#2016-12-2118:45ag@norman maybe cider-format-edn-region and buffer?#2016-12-2119:07normanAh.. Dug around from there and found cider-format-defun. That seems to do the trick. I think I’ll replace M-q (paredit-reindent-defun) with that#2016-12-2200:46naomarikdoes something exist where you can add an additional layer over a file to pollute it with your own nonsense comments and that exists outside of it?#2016-12-2201:42jfntn@naomarik https://github.com/bastibe/annotate.el#2016-12-2201:57naomarikthanks!#2016-12-2217:56hlolliDoes someone know an emacs tool where you can take an html text and remove the tags but somehow add structure, at least faces where bold and h1 tags are found. Im trying to find a way to spit html docs into a repl buffer with humar readability if possible. I may end up developing my own solution. I wonder what emacs users use to view html formatted emails?#2016-12-2219:01chrisiirc they either use w3 or eww#2016-12-2219:01chrisso, nothing that helps you out here#2016-12-2219:03chrisalthough apparently a simple html renderer ships with emacs which is the basis of eww#2016-12-2219:03chrisso you can use html2text and see what that gives you#2016-12-2219:42ballpointcarrotanother option is pandoc, which is a command line tool to convert different types of markup (incl. Markdown, html, org-mode, docbook, etc.#2016-12-2219:58dpsuttona user on here named plexus wrote this utility: https://github.com/plexus/html-to-hiccup#2016-12-2219:58dpsuttonthis uses a parsing library and emits hiccup#2016-12-2219:58dpsuttonyou could maybe add some interpreter for hiccup data#2016-12-2221:20munen@hlolli I'm doing my (loads of daily) emails in Emacs with mu4e and mu4e-shr2text. It's not awesome, but the best that I could find after benchmarking all options that I could find on a semi-vast set of html emails.#2016-12-2221:22munenBut to be honest, quite often I use a shortcut to open HTML mails in the Browser.#2016-12-2221:22munenThis happens for those fancy auto generated mails. Mails from Outlook, Gmail and what not are totally readable with mu4e-shr2text.#2016-12-2221:22hlollisorry channel, I literally got message that my message delivery failed and therefore wasn't checking if I got any replies. And my message is not visible on my slack as I write. (now reading the replies...)#2016-12-2221:24munen@hlolli Here's my Emacs mail configuration if you're interested: https://github.com/munen/emacs.d/blob/master/configuration.org#mail I'm quite happy about it. Many years ago I had mutt with vim, then Mail.app, all the good web mailers and now I'm having the best mail experience of my life thanks to mu4e(;#2016-12-2221:28hlolliok, thanks @munen I see that mu4e has Html2text functions that may do what Im looking for. Of curiousity, since I never actually used emacs for mails, are you using gmail (because most serious emacs users I know have serious cia paranoia 🙂 ).#2016-12-2221:32hlolliwell nevermind that gmail question. I think I can't see myself using emacs email, as I acess my mail on so many different devices.#2016-12-2615:14hlolliHere's a backtrace of an emacs crash, which crashed while doing c-x c-s then figwheel then compiled that particular cljs document. Just a far fetched paste if more emacs 25.1+cljs users have been experiencing similar things https://pastebin.com/FdjT3ah8#2016-12-2621:49jfntnintellij cursive and clojure-mode don’t agree on clojure indentation, this is very annoying in our team, has anyone worked around this issue?#2016-12-2622:43caiocan you provide some examples? I work with ppl using intellij and only had mismatches on midje-mode, not clojure-mode#2016-12-2622:44caioeither way, I fixed it using clojure-mode’s indent config:
(defun set-nu-clj-indent ()
  "Reset midje indent to default."
  (define-clojure-indent
    (fact 0)
    (facts 0)
    (against-background 0)
    (provided 0)))

(eval-after-load 'clojure-mode
  '(set-nu-clj-indent))
#2016-12-2622:45caio(this is on a .el file on our org’s repo. I just link it on my local emacs config#2016-12-2622:50jfntnok interesting, I may have to check with my coworker if he has any special settings#2016-12-2622:51jfntnI’m seeing lots of differences on major things like function bodies, single semicolon comments and then some...#2016-12-2923:56richiardiandreaI would like to officially send tele-kudos to the creator and maintainer of undo-tree. You save me many hours of CTRL-Z#2016-12-3000:13rickmoynihan+1 undo-tree is amazing#2016-12-3120:23lvhHi! I used the indent spec as per: https://github.com/clojure-emacs/cider/blob/c698df1c905127f190efee3403822b2b09a811c3/doc/indent_spec.md on clojure.spec/fdef like so:
(alter-meta! #'clojure.spec/fdef assoc :style/indent :defn)
.. but it doesn’t appear to be doing anything. I was expecting it to indent like defn, i.e.
(s/fdef name
  …
but instead the is alonged with name.
#2017-01-0308:07agdoes anyone use Emacs in OS X with brew install —HEAD? Lately I seems to be broken. more details: https://github.com/d12frosted/homebrew-emacs-plus/issues/12 Does anyone know how to fix this?#2017-01-0315:34agoh, wow. that was fast. they’ve fixed it!#2017-01-0316:50qqqI'm using cider + helm + projectile + neotree + speedbar; does icicles provide anything new, or is it largely already covered?#2017-01-0721:22madstapHi, starting earlier today, when I start emacs I get a buffer with:
Warning (emacs): Unable to activate package `flycheck'.
Required package `let-alist-1.0.4' is unavailable
Warning (emacs): Unable to activate package `flycheck'.
Required package `let-alist-1.0.4' is unavailable
Warning (emacs): Unable to activate package `flycheck'.
Required package `let-alist-1.0.4' is unavailable
Does anyone know what this might be caused by? I have an almost totally vanilla prelude installation on emacs 24.5.1
#2017-01-0721:28dpsuttoncan you list packages?#2017-01-0721:28dpsuttonM-x list-packages#2017-01-0721:28dpsuttonand youre looking for let-alist#2017-01-0721:30madstapYeah, I can find it#2017-01-0721:30madstapIt says available, just like your screenshot#2017-01-0721:31dpsuttoncan you install it?#2017-01-0721:32dpsuttonand then restart emacs#2017-01-0721:32dpsuttonit looks like it goes from a package to inside emacs with 25#2017-01-0721:32dpsuttonwondering if maybe there's a bug in loading dependencies#2017-01-0721:34madstapthe weird thing is that it worked this morning...#2017-01-0721:34madstapI can't install it#2017-01-0721:35madstapThe relevant part of *messages* (maybe)
Contacting host: 
Type "q" to delete help window, M-x scroll-up to scroll help.
Install package `let-alist-1.0.4'? y
Contacting host:  [2 times]
File mode specification error: (void-function flycheck-mode)
Making version-control local to let-alist-autoloads.el while let-bound!
run-hooks: Symbol's function definition is void: flycheck-mode
Install package `let-alist-1.0.4'? y
Contacting host:  [2 times]
run-hooks: Symbol's function definition is void: flycheck-mode
#2017-01-0721:36dpsuttonwow#2017-01-0721:37dpsuttonit almost sounds like a hobbled version of flycheck-mode is running without a dependency and just ruining everything#2017-01-0721:37dpsuttoncan you disable flycheck mode and then try again?#2017-01-0721:37dpsuttonset flycheck globally off#2017-01-0721:38madstapHow do I disable flycheck?#2017-01-0721:39dpsutton(global-flycheck-mode nil)#2017-01-0721:39dpsuttontry that#2017-01-0721:41madstapI get: Debugger entered--Lisp error: (void-function global-flycheck-mode)#2017-01-0721:42dpsuttoni think you've got a half state of something#2017-01-0721:42dpsuttonnuke flycheck out of your elpa dir and try installing again?#2017-01-0721:43madstapThat worked!#2017-01-0721:43madstapThanks!#2017-01-0721:44madstapSo, basically, the old "turn it off and turn it back on"#2017-01-0721:44dpsuttongood deal#2017-01-0721:44dpsuttonhaha yeah#2017-01-0721:44dpsuttonthere may have been an error loading or downloading a dependency#2017-01-0721:44dpsuttonbut it tried to struggle on in its malformed state#2017-01-0721:45dpsuttonand happily threw errors in that message buffer as it tried and prevented everything from working haha#2017-01-0721:45madstapYeah, it worked for the most part, except for the paren stuff like paredit and rainbow delimiters#2017-01-0723:04chris_johnsonEmacs newbie moment: I finally bothered to learn dired a little bit. It’s bliiiiiiiissss#2017-01-0908:47beppuI wrote an intro to Spacemacs that may be useful to some of you. https://beppu.github.io/post/spacemacs-tips/#2017-01-0908:50beppuI may do a post on Spacemacs' clojure layer which I've found very pleasant although it has one minor bug that could be very confusing. (It's cider-jack-in doesn't switch to the repl automatically, so it's hanging around in a hidden buffer.)#2017-01-0920:31bja@beppu to be fair, SPC m s s will jump to that hidden buffer for you#2017-01-0920:32beppuDoes it? Let me try that.#2017-01-0920:32bjaI think. Let me make sure it's not one of my customizations....#2017-01-0920:33bja
SPC m s s runs the command cider-switch-to-repl-buffer, which is an interactive
compiled Lisp function in `cider-mode.el'.
#2017-01-0920:34beppuYeah, that works.#2017-01-0920:35beppuIt just wasn't obvious the first time I did SPC m ' -- I was waiting around for the repl to show up, and then I discovered the buffer when I was switching around buffers.#2017-01-0920:36beppuI could have sworn back when I was using emacs-live, cider-jack-in would drop you right in the repl.#2017-01-0920:39caioit does#2017-01-0920:39beppuI wonder why that's not the case in Spacemacs' clojure layer.#2017-01-0920:45caiocider-repl-pop-to-buffer-on-connect controls this#2017-01-0920:47beppu@caio That's good to know. Thanks.#2017-01-1215:12ejelomeanyone using Spacemac's github layer? magit-gh-* I can't seem to send a pull request, I've check the token, it's working, it can fetch but cannot send a pull request#2017-01-1314:35joost-diepenmaatDoes anyone feel like trying out my minor mode for editing string literals/docstrings? I wrote it to make it easier to edit long markdown-formatted docstrings. Some final touches need to be done but it’s fully functional: https://github.com/joodie/literal-string-mode#2017-01-1314:37joost-diepenmaatthe idea behind it is similar to org-mode’s org-edit-src-code#2017-01-1314:38joost-diepenmaatwhen point is at a (doc)string, you can press C-c ' and it will open the content of the string in a separate buffer, with quotes unescaped and markdown-mode switched on, ready for editing, then another press on C-c ' will paste the editing buffer content back into the original string literal#2017-01-1314:39christhis sounds like a great idea tbh#2017-01-1314:39joost-diepenmaatI’ve got some code with multi-page docstrings, and at that point it becomes very useful#2017-01-1314:40joost-diepenmaatthanks. yeah I found it very handy in org-mode, so I just copied the idea#2017-01-1320:29qqqI'm a big fan of helm. One thing I can not figure out how to do is the following: (1) I provide a bunch of lines of text; and (2) I narrow through them via helm. Is there a way to do this?#2017-01-1320:29qqqI want to define my own 'helm window thingy', where I manually provide the lines of text / where it should djump to, and then I leverage the helm interface to narrow through it.#2017-01-1321:24caiohttp://wikemacs.org/wiki/How_to_write_helm_extensions#2017-01-1321:25qqq@caio: this is exactly what I needed; thanks!#2017-01-1405:36ejelomeanyone remembers how to execute a keybinding in .emacs? e.g. I want to execute C-x C-b using .emacs for example, I forgot this XD#2017-01-1422:54dottedmagejelome: C-x C-b runs the command list-buffers, so I suppose it's just (list-buffers).#2017-01-1422:54dottedmagOr do you mean something completely different?#2017-01-1422:56ejelomeI meant executing a key press from the .emacs file itself#2017-01-1422:56ejelomeit was just a sample but fortunately, I got the right command and the idea became unnecessary XD#2017-01-1513:35caioyou can always check what the keypress executes by doing C-h k and then doing the keypress#2017-01-1602:48qqqhow do I say : here is a list of packages I want; if they're not installed, please package-install them?#2017-01-1606:34benedekcheck out use-package#2017-01-1606:35benedekand its :ensure option#2017-01-1606:49beppu@qqq Also, the package-install function seems to already check to if a package is installed and will return early if so. You could do something like:
(setf my-packages '(livescript-mode clojure-mode))
(mapcar (lambda (p) (package-install p)) my-packages)
#2017-01-1606:52beppuIf you really want to check if a package is installed yourself, you could use package-installed-p:
(package-installed-p 'clojure-mode)
#2017-01-1606:53qqqare you guys using 24 or 25? I just switched from OSX (25) to ubuntu#2017-01-1606:53qqqand not sure if it's worth installing 25 from source#2017-01-1607:10beppuI'm using 25.1.1#2017-01-1607:10beppu(on ubuntu)#2017-01-1607:10beppuIt looks like I compiled from source.#2017-01-1607:13beppuThe version packaged w/ Ubuntu 16.04.1 (Emacs 24.3) wasn't good enough for Spacemacs which requires 24.4+.#2017-01-1607:22qqq@beppu I just got 25.1 compiled#2017-01-1607:22qqqAre you also stuck with the "gtk / multi monitor close emacs may crash bug" ?#2017-01-1607:22benedekcider requires 24.4+ afaik too#2017-01-1607:29beppu@qqq I haven't experienced that bug yet.#2017-01-1608:19qqqhttps://github.com/ch11ng/exwm <-- anyone used htis? I used to be xmonad + vim; now emacs + no window manager; but this would make so much sense#2017-01-1608:20qqqwhy not script winow manager in elisp too?#2017-01-1608:22qqqbad signture from gnu elpa on xelb#2017-01-1609:19qqq========== is there a way to fire off an chrome/firefox from emacs (but have emacs not wait for it to finish) ?#2017-01-1612:09malabarba@qqq browse-url #2017-01-1701:03qqqanyone else getting "fingerprint for http://melpa.org:433 just changed" ?#2017-01-1701:53beppuI have not seen that error yet.#2017-01-1709:22dottedmag@qqq They have a new certificate (Not Valid Before 9 Jan 2017) issued by Let's Encrypt.#2017-01-1709:37qqq@dottedmag that'd explain it; thanks for the insight!#2017-01-1715:13ustunozgur@qqq also see helm-occur#2017-01-1723:19beppuhttps://skillsmatter.com/meetups/8856-workshop-developing-clojure-with-spacemacs-emacs-cider-clj-refactor#2017-01-1723:19beppu^-- I believe this already happened. I think there will be a video of this soon.#2017-01-1819:00bjais there an option to make powerline span a frame (i.e. across two split windows) such that the selected window populates the contextual parts of the powerline?#2017-01-1819:01bjait seems the default is a powerline per window, which doesn't give me a ton of space inside the powerline when vertically split#2017-01-1820:16adamfreydoes anyone know off-hand how to make Emacs profiler report columns wider? I’m running into this problem: https://emacs.stackexchange.com/questions/7344/make-profiler-report-columns-wider#2017-01-1910:00pesterhazyI'd like to write Markdown in Emacs without adding line breaks, i.e. one line per paragraph. Reasons: - less diff noise - easier editing - less mental overhead Is anyone doing this? It seems like the standard Emacs way is to introduce newlines.#2017-01-1910:00pesterhazyWhat do you use, @plexus?#2017-01-1911:30pesterhazyAlso the one-line-per-paragraph style is better when composing emails, to be pasted into Gmail.#2017-01-1917:00cmack@pesterhazy I follow this method in org-mode with visual-line-mode enabled and auto-fill-mode disabled. Should be similar in markdown-mode#2017-01-1918:05pesterhazy@cmack interesting#2017-01-1918:44beppu@cmack visual-line-mode is pretty cool. I did not know about it before.#2017-01-1923:07qqqI'm using EVIL in Emacs. I want to bind evil-normal-mode-map 's key "e" to "whatever C-x C-e does in this environment" -- this means executing eval-last-sexp in .el files and cider-eval-last-sexp in .clj files. In emacs, how do I say "whatever C-x C-e is doing in this buffer?"#2017-01-1923:13dpsuttonah, do you know how to set keybindings in general?#2017-01-1923:13dpsuttonbecause the function (key-binding ...) will tell you what function is bound to a key press#2017-01-1923:14dpsuttonso you could make a major mode hook change (global-set-key (kbd "whateveryouwant") (key-binding (kbd "C-c C-e")))#2017-01-1923:27qqqI know how to use (global-set-key and (kbd, but I did not know about key-binding; I was searching for functions named things like "get key binding" lol; this solves my problem; thanks!#2017-01-1923:46dpsutton👍#2017-01-2001:25qqq(keybinding (kbd "C-x C-e")) ;; works <-- gets me name of function (funcall (keybinding (kbd "C-x C-e"))) ;; // throws error: wrong number of arguments (1 . 1), 0 what I doing wrong? ^^ @dpsutton#2017-01-2001:27dpsutton
(funcall (key-binding (kbd "C-n")))
(funcall (key-binding (kbd "C-n")))
#2017-01-2001:27dpsuttonworks for me#2017-01-2001:27dpsuttonare you using key-binding?#2017-01-2001:33beppuIn the scratch buffer, Something like (funcall '+) will work but (funcall 'eval-last-sexp) will yield the error @qqq mentioned. I wonder if it's getting into some kind of crazy recursive loop where (funcall 'eval-last-sexp) is the last sexp so it keeps trying to evaluate itself. (just a theory.)#2017-01-2001:34beppuI could be completely wrong.#2017-01-2001:34dpsuttonah#2017-01-2001:34dpsutton@qqq can you post the exact message?#2017-01-2001:35dpsuttonmaybe a stacktrace as well?#2017-01-2001:35dpsuttonyou might be evaluating random code into nrepl#2017-01-2001:36qqq1 minute; slack / dev machiens on diferent machines, let me install emacs on this machine real quick#2017-01-2001:37dpsuttonhaha sounds good#2017-01-2001:39qqq@dpsutton: please see DM for stack trace / screen shot#2017-01-2001:41dpsuttoneval-last-sexp takes an argument#2017-01-2001:42dpsuttonyou're not calling it interactively so you must supply it#2017-01-2311:05plexus@pesterhazy a bit late to the party 🙂 I use fill-paragraph a lot, which does the wrapping for me. It's basically a reflex now to M-q whenever the paragraph doesn't look nicely wrapped#2017-01-2311:25pesterhazyI've discovered visual-fill-column-mode#2017-01-2311:26pesterhazythis gives you a nice 80-char wrapping but internally emacs doesn't insert newlines#2017-01-2311:26pesterhazyso I can just copy'n paste to gmail#2017-01-2315:05jfntnHas anyone used the stream.el library? I don’t understand what I’m doing wrong with my usage of stream-cons in: (seq-into (stream-cons 1 (stream '(1 2 3))) ‘list)#2017-01-2412:12qqqhow od I run inferior-lisp with a particular working directory?#2017-01-2415:59qqqso I just spent about 5 hours debugging with a (defun ... ) was causing all types of problems#2017-01-2415:59qqqturns out, I was overwriing an emacs builtin#2017-01-2415:59qqqwtf#2017-01-2415:59qqqthere should be warnings for things like this "you're overwriting an emacs builtin#2017-01-2417:15radonUsually, all the function names in a package are prefixed with the package name. Generally, people try to do the same thing in their init-file. Don’t define get-file, define qqq-get-file or somesuch. That prevents such an error from happening.#2017-01-2417:19qqqyeah, I'm now prefixing everything with my#2017-01-2417:19caioi think qqq:get-file is prettier 💅#2017-01-2417:19qqqso it's now my-select-frame instead of overwriting emacs's builtlin select-frame#2017-01-2417:19qqqis : a valid char in emacs symbols?#2017-01-2417:20caioyep#2017-01-2417:20qqqwhile this channel is semi active#2017-01-2417:20qqqcan anyone point me at docs at writing my own inferior lisp mode?#2017-01-2417:20qqqI need something to interface with boot in a particular way, and inferior lisp seems to be documented nowhere#2017-01-2417:20qqqI just need "send this string to this buffer, wait for response, and display response"#2017-01-2419:03madstapNoob question: I'm using prelude, and I can't figure out where I'm supposed to put (define-clojure-indent ...). I can eval it in *scratch* without a problem, but if I put it in a file in emacs.d/personal/ I get Symbol's function definition is void: define-clojure-indent#2017-01-2421:10ghosss@madstap if clojure-mode isn't required before your emacs.d/personal stuff is evaluated, define-clojure-indent won't be defined yet. It looks like adding (prelude-require-package 'clojure-mode) before calling define-clojure-indent should work: https://github.com/bbatsov/prelude#personalizing#2017-01-2421:13ghosssalternately, you could wrap it in eval-after-load:
(eval-after-load 'clojure-mode
  '(define-clojure-indent ...))
#2017-01-2421:40madstapThanks, wrapping it in eval-after-load worked.#2017-01-2422:55richiardiandrea@qqq I am curious now 😀 why writing a new inf-clojure? Which part of boot do you want to target?#2017-01-2423:06qqq@richiardiandrea : recently switched form lein to boot, saw how simple boot was, andbecame curious whether I could get a inf-lisp to work with boot; turns out it was pretty easy#2017-01-2423:54richiardiandrea@qqq yes because inf-clojure just needs a server that can accept input, so I was kind of wondering if it would work out of the box with boot#2017-01-2507:17martinklepsch@richiardiandrea @qqq inf-clojure works perfectly with boot 👌#2017-01-2508:19plexusAre any Emacs people coming to ClojureD? We're having an Emacs Berlin meetup a few days before, and we're thinking of making it a Clojure-themed one#2017-01-2508:20plexusIt would be super awesome if we could have one or more talks on CIDER/clj-refactor/clojure-mode/inf-clojure/parinfer/...#2017-01-2508:28plexusIt'll be Wednesday 22 February, so three days before ClojureD. We could make it an early pre-event for people already in town. Lambda Island is happy to sponsor some pizzas 😉#2017-01-2514:09benedekoi @plexus I would love to but can’t make clojureD this year unfortunately… however i may be in berlin on 16th-17th Feb#2017-01-2514:14plexus@benedek cool! ping me a few days in advance, would love to meet up#2017-01-2514:15benedekwill do#2017-01-2515:37munen@plexus I'm planning on travelling with a friend from Zurich to ClojureD and would love to go to the Emacs meetup. Three days earlier is a lot too early, unfortunately.#2017-01-2515:38plexusthat's understandable, some people might not mind spending a few days in Berlin though. The meetup is always the last Wednesday of the month.#2017-01-2515:41munenI'll try to remember in case I might find myself stranded in Berlin on the forth week of a month^^#2017-01-2515:41munenBtw, I also wouldn't mind spending some more days(;#2017-01-2517:32qqqdoes emacs have a kill-9 buffer ?#2017-01-2517:32qqqwhere instead of kill-buffer, kill-9-buffer does not ask for any confirmation and executes with extreme prejuditce ?#2017-01-2519:05beppu@qqq In the docs for kill-buffer it says....
The functions in ‘kill-buffer-query-functions’ are called with the
buffer to be killed as the current buffer.  If any of them returns nil,
the buffer is not killed.  The hook ‘kill-buffer-hook’ is run before the
buffer is actually killed.  The buffer being killed will be current
while the hook is running.  Functions called by any of these hooks are
supposed to not change the current buffer.
Perhaps you could temporarily override kill-buffer-query-functions with an empty list. (Just a guess. I have not tried it myself.)
#2017-01-2617:01qqqI'm trying to use imenu via regex in emacs. It works fine inside .clj files; but does not work at all inside .org files. Now, my question is: while in org mode, how do I figure out what regex imenu is using to search for things?#2017-01-2617:10qqqokay, so in org-mode, I now have setup a hook to setup imenu-generic-expression#2017-01-2617:10qqqI can verify via C-h v in org mode that imenu-generic-expression is setup properly#2017-01-2617:10qqqhowever, it appears that helm-imenu is completely ignoring imenu-generic-expression and just doing its own things with org mode headings#2017-01-2617:10qqqhow do I disable that and tell helm to use imenu-generic-expression instead of whatever org mode thing it's using?#2017-01-2618:13qqqorg/imenu seems to only search through headings; is there a way to have org/imenu also search through code blocks ?#2017-01-2618:21bja@qqq You might do something similar to this, but for code blocks: https://emacs.stackexchange.com/a/29614#2017-01-2621:23gtrakdoes anyone have an example of how to modify refactor-nrepl configuration? I specifically want to turn off ns prefix-rewriting. EDIT: wait, i found the right thing to google, The prefix rewriting can be turned off by tweaking cljr-favor-prefix-notation.#2017-01-2621:41hlolliIs there a built in emacs function that can align words into equal width columns via whitespaces only, so lets say that I have this region selected
10 200 3000 40000
1 2 3 4
10000 200 300 40
and a function that potentially wound transform it into
10    200 3000 40000
1     2   3    4
10000 200 300  40
#2017-01-2623:44beppu@hlolli There's a command line utility called column that can do that. You can select the region and then type C-u M-| column -t.#2017-01-2623:46beppuIf you're using Spacemacs (or vim), select the region and :!column -t#2017-01-2623:49hlolli@beppu thanks for that! Not using spacemacs and cant see this function at a quick look. But there must be a synonimous function that I should look for. But for now I need sleep 😐#2017-01-2701:32ag@hlolli I think align.el is what you need https://www.emacswiki.org/emacs/align.el I know you’re not using Spacemacs, but if you suddenly decide to switch (when you wake up) - SPC x a#2017-01-2707:01beppu@ag Wow, that's awesome.#2017-01-2708:42vinaiGood day everyone! I'm new here as well as still getting started with, well, Clojure, and Emacs. Today I want to explore a debugger, more precisely the cider debugger. Is this the right place to ask noob questions or is it better to ask about that in #beginners?#2017-01-2708:46benedekor #cider @vinai#2017-01-2708:46vinaiAh, thanks!#2017-01-2717:12qqqthis is sorta blackmagic: is there a way to get org tangle to work with tramp?#2017-01-2717:12qqqi.e. from org, I want to write a file to a remote server 🙂#2017-01-2717:13qqqoh, it just worked 🙂#2017-01-2718:31hlolli@ag wake up -> 8 hours of Scrum training -> now to the serious stuff, optimizing emacs. Align cols, perfect, thanks a lot!#2017-01-2723:16qqqis there a nice way to use org-mode as as a wiki?#2017-01-2801:34beppu@qqq I link to other org files with file: and cross link my org documents.#2017-01-2802:40qqq@beppu: is there a nice way to link to a particular heading in another file?#2017-01-2802:40qqqI was going to say "location", but exact file offsets probably change over time#2017-01-2805:32beppu@qqq I think you can link to org headings and lines in other types of files, but beyond that, I don't know. https://orgmode.org/manual/Hyperlinks.html#2017-01-2816:07qqqqqq [9:04 AM] I've written my own helm via (helm ... ), however, the only "action" I have available is "identity" -- how do I get other actions ? [9:04] or rather, how do I implement other actions?#2017-01-2816:07qqq@beppu : (re org/links) thanks!#2017-01-2816:16qqqanswer: :action (re helm)#2017-01-3020:18beppuThis is not specific to Clojure, but those of you who want to try org-mode for the first time may find this useful: https://beppu.github.io/post/org-mode-basics/#2017-01-3020:29pesterhazy@beppu, good job on the spacemacs post#2017-01-3020:29pesterhazyI didn't know about SPC j I, that's very useful#2017-01-3020:30beppuI discovered that one evening while talking to @qqq about imenu. There are so many little gems hidden in Spacemacs.#2017-01-3021:15qqqbeppu: this is why you should answer as many of my questions as possible -- you learn new, unexpected, and awesome features 🙂#2017-01-3021:15bepputrue!#2017-01-3021:16qqqare you yourself using "evil lisp state", "evil-paredit" (what I use) or "lispy" ?#2017-01-3021:22beppuI'm still on evil lisp state. I haven't tried the others. Didn't even know about them, tbh.#2017-01-3020:31pesterhazyI use SPC r m a fair bit to go back to a place I just left#2017-01-3020:31pesterhazyg i is useful#2017-01-3020:32beppuI will try those out.#2017-01-3020:32pesterhazywe should share our findings here 🙂#2017-01-3020:33beppuSPC r m is pretty nice.#2017-01-3020:33beppuDefinitely.#2017-01-3020:33pesterhazymy latest discovery is lispyville#2017-01-3020:34pesterhazyif you enable it, you can dd lines or d regions while keeping parentheses balanced#2017-01-3020:34pesterhazyit's so useful that it's surprising to me that spacemacs doesn't come with it enabled by default#2017-01-3020:35beppuMaybe they don't know? I'm relatively new to the Emacs universe having been a vim user for 15+ years, so there's so much I don't know.#2017-01-3020:36beppuI do use evil lisp state to slurp and barf but that's about it.#2017-01-3020:36pesterhazyI mean spacemacs developers write lisp code all day#2017-01-3020:36pesterhazyyeah me to, I use slurp, barf, raise, wrap and unwrap#2017-01-3020:37pesterhazyother than that lisp state is clunky#2017-01-3020:37beppuThank god for undo.#2017-01-3020:37pesterhazyhaha#2017-01-3020:37jfntnCurious how spacemacs users edit lisp? I never used vim but tried evil a few times, and just gave up after trying to write some clojure and elisp#2017-01-3020:38beppu@jfntn Spacemacs seems to favor something they call evil lisp state over paredit.#2017-01-3020:38jfntnEven the spacemacs lisp layer is really slow and clunky compared to say paredit#2017-01-3020:39pesterhazyevil is better for everything... except for lisp#2017-01-3020:39pesterhazyI mean it's not aweful but not as good as paredit or lispy#2017-01-3020:40jfntnIn paredit you might have to M-C-S-something but it’s more like one keystroke since you do it over and over, in that lisp state it like “SPC l k j” or whatever and now i need to repeat “l k j” ?#2017-01-3020:40pesterhazy@jfntn no it has this "state" (the little bar goes pink) where keystrokes are interpreted as lisp-state movements#2017-01-3020:40jfntnlispy is great, I’ve been using it for a long time and almost never missed paredit#2017-01-3020:41pesterhazyso one thing I can't do in spacemacs:#2017-01-3020:41pesterhazyselect a form, and then select the next form too#2017-01-3020:41pesterhazysuppose I want to kill them together, or move them somewhere else#2017-01-3020:42jfntnDo that all the time, C-M-space#2017-01-3020:42jfntnoh wait, 😛#2017-01-3020:43pesterhazyprecisely!#2017-01-3020:43pesterhazythat's the kind of thing that should be easy#2017-01-3020:44pesterhazyI suppose I could just bind that to some vim key I don't use?#2017-01-3020:44pesterhazy@jfntn do you have a list of sexp-related movements/commands in emacs?#2017-01-3020:47jfntn@pesterhazy what do you mean?#2017-01-3020:47jfntnlike useful ones?
#2017-01-3020:47pesterhazyyeah#2017-01-3020:47pesterhazylike C-M-space, I didn't know about that#2017-01-3020:48jfntnHere is my keyfreq data filtered for ‘lispy\|sexp'#2017-01-3020:49beppuI just tried C-M-space - it's wonderful.#2017-01-3020:49jfntnmostly lispy#2017-01-3020:49beppu^-- how did you generate that file @jfntn ?#2017-01-3020:50jfntnNothing too interesting now that I’m looking at it#2017-01-3020:50jfntnThere’s a package called `keyfreq#2017-01-3020:50dpsuttondamn emacs#2017-01-3020:50dpsuttonthat's awesome haha#2017-01-3020:54pesterhazyI have keyfreq turned on as well 🙂#2017-01-3020:54beppuI'm going to install keyfreq now.#2017-01-3020:55beppuDo you know about SPC s w g and SPC s w w ? Google Search and Wikipedia Search (with autosuggest via helm)#2017-01-3020:56beppuIt was recently retweeted by @spacemacs on twitter.#2017-01-3020:56pesterhazya window into my soul#2017-01-3020:57jfntnlol I paused for a second when posting mine#2017-01-3020:58pesterhazyyou're way ahead of me man#2017-01-3020:58jfntn9.85% evil-normal-state wut#2017-01-3020:58pesterhazyperhaps as an evil user I have to type less?#2017-01-3020:59pesterhazy@beppu, s w g is actually pretty cool#2017-01-3021:01pesterhazylispy-clone, that sounds useful#2017-01-3021:02beppu@jfntn I'm surprised you don't use cider-eval-buffer, opting for the finer-grained cider-eval-last-sexp and cider-eval-defun-at-point. (I guess Spacemacs makes cider-eval-buffer easier, so I end up using it more.) , s b.#2017-01-3021:03pesterhazy@beppu, I agree, , s b is more useful#2017-01-3021:03beppu@pesterhazy There's some other crazy stuff under s that the guys in the Spacemacs gitter channel showed me.#2017-01-3021:05beppuGo into a Clojure project and type SPC s p and then search for a common string like "defn". This is a normal project-wide search. However.... then type C-c C-e.#2017-01-3021:05beppuYou can edit the search results and then type C-c C-c to save your edits.#2017-01-3021:06beppuYour edits can span multiple files.#2017-01-3021:06jfntnivy does that too it’s really cool, though for clojure clj-refactor is way better when it works#2017-01-3021:07jfntn@beppu I only have commands matching lispy and sexp in that list, I use cider-load-buffer usually#2017-01-3021:07pesterhazyyeah that editing is kinda cool#2017-01-3021:07beppuI see.#2017-01-3021:08pesterhazyhelm-ag is my most-used command#2017-01-3021:08pesterhazy(well not according to keyfreq but if feels that way)#2017-01-3021:09jfntnlol I was surprised not to see some commands in my list too#2017-01-3021:10beppu@pesterhazy Did you know you could add command line arguments to your ag searches? For example, search for a string and then add -C to the query to give you context.#2017-01-3021:12pesterhazyyes I did#2017-01-3021:13pesterhazyvery useful too#2017-01-3021:13pesterhazyyou also need to escape spaces for some reason#2017-01-3021:13pesterhazyvery happy with rg by the way#2017-01-3021:13beppuWhat's rg?#2017-01-3021:13pesterhazyit's used automatically instead of ag if it's installed#2017-01-3021:13pesterhazyit's even faster than ag#2017-01-3021:14pesterhazyhttps://github.com/BurntSushi/ripgrep#2017-01-3021:14beppuI started with ack. I only just recently installed ag. Can't believe I have to upgrade again.#2017-01-3021:14pesterhazyI moved from git grep to rg recently and couldn't be happier#2017-01-3021:14pesterhazyyeah I was on git grep for like 5 years#2017-01-3021:17qqqsince we only get 10,000 msgs#2017-01-3021:17qqqsomeone should take this and put it in a wiki somewhere, lots of knowledge, would be sad for it to disappear#2017-01-3021:20beppuSurely someone has written a slack archiving bot.#2017-01-3021:20pesterhazythere is one#2017-01-3021:20pesterhazyhttps://clojurians-log.clojureverse.org/emacs/2017-01-30.html#2017-01-3021:20pesterhazywe're all on camera#2017-01-3021:21beppu@pesterhazy cool. I didn't know that existed.#2017-01-3021:22pesterhazymy achievements for the day:
(evil-global-set-key 'normal ";" 'mark-sexp)
  (evil-global-set-key 'visual ";" 'mark-sexp)
  (evil-global-set-key 'normal "U" 'backward-up-list)
  (evil-global-set-key 'normal "R" 'down-list)
  (evil-global-set-key 'normal "F" 'forward-sexp)
  (evil-global-set-key 'normal "B" 'backward-sexp)
#2017-01-3021:23pesterhazyI'm going to see if those help my lispy editing skills#2017-01-3021:23pesterhazy@jfntn you helped me quite a bit there, thanks!#2017-01-3021:26pesterhazywait what's lispy-flow?#2017-01-3021:27jfntn@pesterhazy you’re welcome!#2017-01-3021:28jfntnlispy-flow is kind of an odd one, it goes down the sexp tree inwards but tries to not get stuck in a leaf and moves back up and down again, kinda hard to explain and not sure I totally understand it but you quickl build an intuition for it#2017-01-3021:28qqqI found the best help for my lisp skills -- was purchasing an kinesis advantage pro keyboard. It gives room for modifier keys, and thus shorter bindings.#2017-01-3021:28dpsuttonwow, @qqq that's jumping in the deep end#2017-01-3021:29qqqhttps://www.anandtech.com/show/7125/kinesis-advantage-review-longterm-evaluation <-- for example, hitting the "END" key (right next to the DELETE key) with the thumb, makes hjkl all paredit comands#2017-01-3021:29dpsuttonyou like it?#2017-01-3021:29pesterhazyI have the keyboard as well#2017-01-3021:29dpsuttoni love emacs because with capslock mapped to control i never leave the homerow#2017-01-3021:30dpsuttonand i've written a library to help manage window resizing, splits, killing, etc#2017-01-3021:30qqqon that keyboard, I have DELETE, which is. right under my thumb, mapped to CTRL#2017-01-3021:30dpsuttonso i almost never leave homerow#2017-01-3021:30dpsuttonah nice#2017-01-3021:30qqq@pesterhazy : I'd love to know of any keybindings you have that exploit the kinesis design.#2017-01-3021:30qqqI'm currently trying to get all my emacs keybindings to be 2-3 keys total.#2017-01-3021:31pesterhazyI use only one: I remap delete to escape#2017-01-3021:31qqqfound the vim user#2017-01-3021:31pesterhazy🙂#2017-01-3021:32qqqbecause I search with "/", I have mapped C-f to evil-normal-mode#2017-01-3021:32pesterhazyunfortunately it didn't help my rsi but rather compounded it#2017-01-3021:32qqqso I can keep DELETE zs CTRL, but ESCAPE is just CTRL-F#2017-01-3021:32pesterhazybut it's an amazing layout#2017-01-3021:32jfntnThe main emacs usability improvement for me is to map the cmd keys on the mac to ctrl, and the caps lock key to meta#2017-01-3021:32jfntnMakes C-M-f etc a breeze#2017-01-3021:32qqqI can not believe we have a number of adults, supposedly with professional jobs, talking about keyboards and key bindings.#2017-01-3021:33qqqThe other thing I found relaly helpful is Hydra mode.#2017-01-3021:33jfntnwell rsi is no joke#2017-01-3021:33dpsuttonand comfort is what actual professionals talk about#2017-01-3021:34dpsuttonthere's a saying that you can tell professional photographers because they'll talk about shoes; amateurs talk about cameras#2017-01-3021:34beppuSpacemacs is comfy#2017-01-3021:34pesterhazy@dpsutton I'll steal that line#2017-01-3021:35dpsuttongo for it#2017-01-3021:35dpsuttonit comes out of the lineage of news photographers#2017-01-3021:35dpsuttonyou might be on your feet for hours#2017-01-3021:35dpsuttonand what you care about in cameras is that they don't fall apart when they get wet or dropped#2017-01-3021:37qqqwe should ahve screencasts sometimes#2017-01-3021:37qqqI want to see cool emacs combo tricks#2017-01-3021:37pesterhazynice idea @qqq#2017-01-3021:38qqqhttp://www.parens-of-the-dead.com/ is what got me to doubt vim and consider emacs#2017-01-3021:38qqqI've never found anything of same quality since.#2017-01-3021:39beppuI liked http://emacsrocks.com/ but he hasn't put out new content in a while.#2017-01-3021:39dpsuttonhttp://emacshorrors.com/#2017-01-3021:39dpsuttonfor a love/hate take on emacs#2017-01-3021:39dpsuttonit highlights some of the warts of the codebase#2017-01-3021:40dpsuttonbut from someone who really cares about the platform#2017-01-3021:40qqqwhat's a good package for selecting a dark color scheme in emacs?#2017-01-3021:40dpsuttonalso, he or she has a really nice emacs.d on github#2017-01-3021:40beppu(I didn't realize until now that the emacsrocks guy and the parens of the dead guy were the same.)#2017-01-3021:40qqq@beppu: the voice is distinctive#2017-01-3021:40dpsuttonhttps://github.com/owainlewis/emacs-color-themes#2017-01-3021:43qqq@dpsutton : the spolsky theme really is nice#2017-01-3021:46dpsuttoni think i run a modified version of odersky#2017-01-3021:46pesterhazysolarized-light all the way#2017-01-3021:48qqqthis is borderline heresey, but is there a evil-normal-mode optimized for LISPY interaction ?#2017-01-3021:51dpsuttonhave you seen the lispy package?#2017-01-3021:53beppuI'm quite fond of the default spacemacs-dark. I also like gruvbox from time to time (from the spacemacs themes-megapack (http://themegallery.robdor.com/))#2017-01-3022:33qqq@dpsutton: I tried lispy, but found I liked paredit far more#2017-01-3022:33qqqlispy's 'context sensistive' and 'movement keys' were confusing for me#2017-01-3102:01tianshu@qqq evil-cleverparens is a good option#2017-01-3103:38richiardiandrea@qqq or smartparens, I kind of wanted to switch to it at some point, but for now paredit still wins#2017-01-3113:53dpsuttoni've recently updated my package resize-window to help with resizing windows and splits in emacs. I added the ability to create splits and also to save window configurations onto a stack. https://github.com/dpsutton/resize-window#2017-01-3123:22qqq@doglooksgood , @richiardiandrea : resolved my emacs/lispy/paredit problem -- wrote a bunch of functions for hjkl and slurp/barf/raise when in a special "evil lispy" mode#2017-01-3123:22richiardiandreaha ah great#2017-01-3123:24qqqmy ideal nagivation is pretty simple: h/l should be prev-next#2017-01-3123:24qqqj/k should be down/up (into / exit) sexps#2017-01-3123:24qqqthis seems to map to standard vim movement#2017-02-0100:37qqqI'm editing http://foo.org. I am editing a codeblock. I popped up a spcial buffer ot edit the codeblock (to get all the right major modes). Now, I want to add an item back to http://foo.org -- is there a way to do this without leaving my "special" buffer [which is editing a code-block region of http://foo.org] ?#2017-02-0100:51tanzoniteblackif you save your special buffer, it'll save the changes you've made into the parent org file, if that's your question?#2017-02-0100:51tanzoniteblackor do you want to edit a part of the org file that's not being edited in the "special" buffer?#2017-02-0117:08qqqI should clarify, I want to add TODO item back to http://foo.org, while I'm editing a doe-block of http://foo.org#2017-02-0119:07ag@qqq what exactly are you trying to achieve? If you popped-up 'edit special' buffer, do you want to “save” the progress or something?#2017-02-0119:49qqq1. I'm in http://foo.org 2. I'm editing a #+begin_src #+end_src block in http://foo.org, in a separate buffer. 3. I think of a new todo item. 4. I want to add this new TODO item to http://foo.org without leaving my current special buffer.#2017-02-0120:10caioidk if there’s a generic solution to this. your file could be formatted in different ways and even have different TODO/DONE statuses defined. where would the default position to add the item be?#2017-02-0120:16caiolooks like the last element on org-src-babel-info is the position of the source code on the org buffer. maybe you can write a fn to do what you want using this#2017-02-0120:26caio@qqq (pop-to-buffer (marker-buffer (car (last org-src-babel-info)))) would send you to the org buffer you came from, maybe this helps#2017-02-0120:26caioit won’t change its pointer position (if you moved it after going to the src buffer, for example) tho, so you’d have to write a function that would insert the TODO on the right position no matter where your pointer is initially#2017-02-0120:26caioand then pop back to the source buffer#2017-02-0120:31caio
(let ((src-buffer (current-buffer)))
  (pop-to-buffer (marker-buffer (car (last org-src-babel-info))))
  (message "Your fn to add the TODO item here. Will be evaluated on the org buffer")
  (pop-to-buffer src-buffer))
#2017-02-0205:41qqq@caio: thanks for the pseudocode! one question: can the two pop-to-buffer be simplified via a single "with-current-buffer" ?#2017-02-0215:31caio@qqq yep. I was trying to find that function, but couldn’t remember the name 😄#2017-02-0215:32qqq@caio: thanks! the key function was org-src-babel-info -- there's on way I would ahve guessed that it's last item contains the info#2017-02-0215:34qqqhere's another org problem I'm running into:#2017-02-0215:34qqqI mostly have code blocks of the following form:
*** some heading
#+begin_src ...
#+end_src
basically, it's a heading containing only a single element, and that element is a code block
#2017-02-0215:35qqqright now, my actions are () navigate to heading, do org-cycle, then move down two lines, and do "insert special mode"#2017-02-0215:35qqqI'm wondering if there is a way, when the cursor is over a heading, to say : get me a list of all code blocks within this heading#2017-02-0215:47qqqah, org-babel-next-src-block#2017-02-0217:39qqqin an org file, is there a way to declare a "ENVIRONMENT VARISBLE" that I can use in all my :tangle options ?#2017-02-0316:52hkjelsSOMEVAR=val org tangle#2017-02-0316:52hkjelshttps://github.com/hkjels/org#2017-02-0320:54aghas anyone used ob-clojure? I have source block, I have cider jacked-in, yet no results being shown when evaluating the code block#2017-02-0323:26statonjr@ag Did you set org-babel-clojure-backend to cider?#2017-02-0323:27statonjr(setq org-babel-clojure-backend ‘cider)#2017-02-0323:28ag
org-babel-clojure-backend is a variable defined in ‘ob-clojure.el’.
Its value is ‘cider’
#2017-02-0323:28agit seems to be evaluating the code, yet there’s nothing in the results#2017-02-0323:29agI’ve tried playing with :result prop of the source block - still nothing#2017-02-0323:32statonjrHmm. Yeah, the default :result prop should display a #+RESULTS block. Are you using lein?#2017-02-0323:47agyup#2017-02-0403:50statonjr@ag What version of Emacs and org-mode are you using? I’m on 25.1 and 9.0.4. I upgraded to 9.0.4 and ran into the same issue as you. I changed some code in ob-clojure.el and now I see results in the #+RESULTS block.#2017-02-0414:01hlolliWhat would be a smart way to wrap messaging buffer sending to stdout and/or to api endpoint. In short I have logs arriving from an app, and I want to print them into emacs buffer in the same way as nrepl or Message buffers are printing logs. I'm tempted to use some async libs to ask if the buffer-queue has any logs, then print the log and pop the buffer. But somethign tells me there must be a way to redirect stdout into emacs (though I cant start the process with sentiel as I'm using emacs modules). Well, can't get my question out probably, but any reading material on logging would be also appreachiated.#2017-02-0414:19cmack@hlolli are the logs only going to stdout or are they going to a file? I’ve not tried it, but here is a snippet where someone uses emacs in place of tail -f : https://www.commandlinefu.com/commands/view/11556/use-emacs-in-place-of-tail-f#2017-02-0414:26hlolliyes, its going to stdout if I want. Very cool hack there, did consider using emacsclient and start server and do emacsclient --eval. Maybe I should reconsider that. Another way Im considering is to somehow connect two processes togeather. Because Im using comnit mode buffer, and to get it started Im starting a noop emacs process called "hexl" which has TTY: /dev/pts/0, maybe its possible to set stdout from my logs into stdin of /dev/pts/0?#2017-02-0414:28hlollibamm echo "olafur" > /dev/pts/0 prins the string in the emacs buffer.#2017-02-0414:30cmackif you don’t want to lose stdout you could use tee too#2017-02-0414:31cmackecho “olafur” | tee /dev/pts/0#2017-02-0414:31hlolliah yes I see the difference.#2017-02-0414:32hlollithanks, Im a noob in this area.#2017-02-0414:35cmackno problem. I hope it works out. 🙂#2017-02-0505:05beppuI feel like monitoring a log file with emacs might be hell on your memory consumption.#2017-02-0505:16qqq@beppu: I don't understand the internals of emacs -- why is the above true? don't things get GC-ed when buffers (or portions of buffers) are killed ?#2017-02-0505:17beppuI don't know if it's true, but it was just a hunch. I could be wrong.#2017-02-0505:19beppuDoes auto-revert-tail-mode keep all of the contents of stdout?#2017-02-0505:20qqqI don't know either. But I do admit, running 3 shells in emacs (boot client-dev, boot server-dev, dev_appserver.sh) has resulted in certain "lag" for me when editing files#2017-02-0505:21qqq(it's sorta like tailing files since whenver I save stuff, all the auto recompile from boot client / boot server flood the screen)#2017-02-0505:21beppuInteresting. 3 shells is probably the most I've run inside emacs too, but I've not anything as heavy as you just mentioned yet.#2017-02-0505:21qqqthey're also more "read-only" than "shells" in that I'm reading the output / scrolling, but not really interacting#2017-02-0505:21beppuAre you using helm-mt to manage your shells?#2017-02-0505:22qqqno, but I should look into it, right now, I have them bound to in a way they pop up new frames which contain the shell#2017-02-0505:22qqqso when I run them, I get 3 new frames, anmed boot-client boot-server and gae -- then I reasize / rearrange them in OSX#2017-02-0505:22beppuIt doesn't come bundled with Spacemacs, but I liked it so much I installed helm-mt and multiterm myself.#2017-02-0505:22beppuOh wait, you run your own super custom emacs, right.#2017-02-0505:27qqqI have a 915 line org file that tangles into my .emacs.d/init.el -- but I feel that's relatively tiny compared to what emacs experts accumulate over the years#2017-02-0505:27beppuI have to learn how to do that with org-mode one of these days.#2017-02-0505:27qqqI started using org mode for the weirdest reason:#2017-02-0505:27qqqI didn#2017-02-0505:28qqqI didn't like how hide-show hid/shown my code blocks, and I liked the headings way to manager hiding/showing codeblocks#2017-02-0505:28beppuYour code probably looks very cool.#2017-02-0505:29qqqthen I found helm-org and "helm rifle" -- and that sold me on org-mode#2017-02-0505:29qqqhelm mt looks very intersting#2017-02-0505:29qqqit does full term emulation, instead of whatever eshell does right?#2017-02-0505:31qqqjust installed helm-mt -- I like it#2017-02-0505:32beppuhelm-mt makes it easy to switch between shells. Also, with spacemacs, it was really hard to run multiple terminals without something like helm-mt to help me out.#2017-02-0505:33qqqspacemacs is brilliant; at the same time, I can't believe it took people that many years to invent it 🙂#2017-02-0510:00beppu@hkjels I was looking through https://github.com/hkjels/org and your shell programming is very good.#2017-02-0510:41hkjels@beppu: thanks. I built a little helper for that sort of thing https://github.com/hkjels/house-of-commands#2017-02-0510:53beppuVery nice. I may use it the next time I feel like writing shell scripts with subcommands.#2017-02-0517:46richiardiandrea@hkjels a very simple but super useful project right there, thanks!#2017-02-0519:23qqqI'm clearly missing something -- what does this quite provide for org-mode ?#2017-02-0609:11hkjels@qqq : Not much at this point, it just makes what you wanted to achieve a little less verbose. You could also stick your environment variables into one of your code-fences and just execute it before you tangle I guess#2017-02-0617:35qqq@hkjels : is there anyway to inject your work into the #+begin_src part of org code blocks? My ideal solution would be store everything in the headers#2017-02-0618:24hkjels@qqq: could you ellaborate on what your trying to achieve? It sounds like you could tangle to a file with environment-vars in it and also define the execution-order there or am I missing something?#2017-02-0618:25qqq@hkjels : I have a number of code blocks, which together tangles into a foo.hy file ( https://github.com/hylang ) then I have to run "hy2py foo.hy > foo.py" since I need an actual py file I'd like org to somehow let me specify "after this is all tangled, do a post processing step of running hy2py"#2017-02-0618:31hkjels'org-babel-post-tangle-hook'#2017-02-0618:39qqq@hkjels : for some weird reason, I only searhfed C-h f, but not C-h v, and totally forgot about hooks#2017-02-0619:35richiardiandreawhat folks use to paste "strings" in a docstring escaping the apices?#2017-02-0619:39tanzoniteblackif by "escaping the apices", @richiardiandrea , you mean the quotation marks (`"`), you can escape those in a docstring the same way you can in a normal string in Clojure, with a slash: \"#2017-02-0619:40richiardiandrea@tanzoniteblack yep but I would like to paste a string and have the machine do that for me 😄#2017-02-0619:42tanzoniteblackyou could probably get something set up via a defadvice with yank and https://smartparens.readthedocs.io/en/latest/automatic-escaping.html#2017-02-0619:43tanzoniteblackbut I've never bothered before, so not sure 🙂#2017-02-0619:44richiardiandreaoh smartparens, great#2017-02-0622:21qqqwhen would emacs xreate the file src/.#main.cljs ?#2017-02-0622:21qqqsomehow this happens when I use org, and the existence of this file is causing boot watch to die#2017-02-0622:45tanzoniteblack@qqq I believe that's an autosave file used to not clobber over the existing file; you can change those settings (such as having it go to a directory in your tmp folder instead of in the same directory as the original): https://www.emacswiki.org/emacs/AutoSave#2017-02-0704:11qqqomg ; I just turned off backups/autosave ; then I overwrote my http://emacs.org#2017-02-0704:11qqqI think this means I just nuked my entire eamcs config file 😞#2017-02-0705:53qqqemacs rewritten -- henceforth, I shall git commig every day#2017-02-0705:54qqqcommit#2017-02-0710:19beppuhttps://i.imgflip.com/1getj5.jpg#2017-02-0710:58pesterhazyFrom the "How did I not know this?" department: In all helm buffers you can enable "follow mode" using C-c C-f, which lets you cycle through results while seeing the occurrences in context in the main window#2017-02-0715:51richiardiandreaFor search in context there is also the awesome helm-swoop 😀#2017-02-0718:41sonnytoparedit key binding does not work for me when I'm connecting on an android device. for example ctrl-arrows do not work #2017-02-0718:42sonnytoit works however when I'm connecting from a normal ubuntu latop #2017-02-0718:42sonnytoany idea why it paredit keybindings don't work when connecting from an android device? #2017-02-0718:45tanzoniteblack@sonnyto try calling the function describe-key and make sure that the C-<arrow> is actually being passed through from the OS properly to emacs. It's possible that it's grabbing that keyboard combination long before it makes its way into emacs#2017-02-0718:47sonnyto@tanzoniteblack thanks. you're right. the ctrl is not sent. emacs just sees an arrow key #2017-02-0718:48sonnytoany idea how do I force android to send the ctrl key? #2017-02-0718:49sonnytostrange thing is the other key bindings using ctrl works #2017-02-0718:49sonnytojust the ctrl-arrow combination doesnt work #2017-02-0718:50tanzoniteblackno idea, sorry. I don't think I've ever tried to use emacs on Android before#2017-02-0718:54sonnytothanks. my first time too. i'm traveling and my laptop died. so now i'm coding on a 7" android tablet via ssh. everything works except paredit. without paredit manipulating sexpressions manually is a pain in the butt #2017-02-0718:55tanzoniteblackYou could try re-binding the paredit keys to M-( and M-) (which are the default of smartparens, I think)#2017-02-0718:55tanzoniteblackat least solves your problem of not having access to those functions#2017-02-0718:55tanzoniteblackeven if it will annoy you everytime you go to use them because your muscle memory is leading you astray#2017-02-0719:59sonnytofound an ssh client on android that works with paredit emacs keybindings. its life saver! now I can ssh into my linux box to code from android device. https://play.google.com/store/apps/details?id=com.termux#2017-02-0720:01sonnyto@tanzoniteblack thanks for the tip on rebinding. but i found an ssh client that works #2017-02-0720:38tanzoniteblackawesome, much better idea!#2017-02-0720:42pesterhazy@plexus and I talked today about the possibility of a structural editor using touch gestures#2017-02-0720:43pesterhazythink "expand" and "contract" gestures#2017-02-0720:43pesterhazyso many possibilities#2017-02-0814:45ejelomeit seems that swapping alt and ctrl gives a better comfort (swap cmd to ctrl on mac keyboard), then just use C-g to escape stuff (instead of remapping capslock to esc)#2017-02-0814:47ejelomealthough, probably becomes better with foot pedal then forget the C and M keys (and even S if triple pedal)#2017-02-0815:00rabbitthirtyeightI swapped ctr and alt (meta) on my laptop keyboard. Pretty happy with it. But it's a bummer that it's not possible to remap them within emacs. (The last time I looked into it, it didn't seem like emacs could rebind keys for C and M)#2017-02-0815:12ejelomeyes, I think you are forced to change it in the os level, although I'm not sure completely#2017-02-0815:14ejelomeI was actually forced to do this because the kinesis freestyle2's left ctrl is too far, so doing C-x C-* becomes painful#2017-02-0815:16ejelomemy initial approach was to use both pinky when pressing keys just to minimize the left pinky's over usage, even using the knuckle approach but still getting numbness when done too long#2017-02-0815:18ejelomeso I guess using the thumb for ctrl is the most suitable and comforting (although confusing at first, esp. when you change from work to home computers, and keyboards)#2017-02-0815:19ejelome... and I've read one of Xah Lee's posts and learned that the emacs was originally designed for the lisp machine keyboards, which ironically, has the ctrl keys near the thumb: https://en.wikipedia.org/wiki/Space-cadet_keyboard#/media/File:Space-cadet.jpg#2017-02-0816:08rabbitthirtyeightI mostly use the Kinesis Advantage now, and have both ctrl and alt mapped to thumb keys#2017-02-0816:08rabbitthirtyeight(I was in part inspired by that article)#2017-02-0818:21qqqis evil-lisp-state basically evil+paredit done right?#2017-02-0902:23tianshuwhen using cider, sometime M-x cider-connect RET <my-host> RET, It will prompt for input password.#2017-02-0902:23tianshubut sometimes It will prompt for input port. only this case works.#2017-02-0903:27rabbitthirtyeightI've only seen the prompts for the host and the port. Is it asking for the password to an SSH key or something?#2017-02-0906:45tianshuIf I use lein repl :connect <host>:<port>, it will works. I don't think it need password. the cider-connect use ssh instead of direct connect to the nrepl server?#2017-02-0907:27hkjels@qqq looks like there’s almost feature-parity indeed, but with more vim-like bindings I guess. If I’d start fresh today, I would defiantly give it a shot#2017-02-0908:33sooheon@qqq @hkjels I’d put in a word for lispy, which is not exactly evil+paredit, but paredit if it was designed to be modal (in a different way from evil, but orthogonal enough that they can easily work together). If vi is a language for editing text, I think of lispy as a DSL for editing lisps. It’s easier to understand as you use it, but to me it is the tree editor that was promised.#2017-02-0908:35qqq@sooheon : lispy, is that the one where certain keys have special meaning if you're right before a ( or right after a ) ?#2017-02-0908:35qqqthe idea being, you never want to type j( or k(, so if you're right in front of a (, and you type j or k, interpret it special ?#2017-02-0908:36sooheonYep that’s it. It has intuitive keys for navigating across those |( or )| points, and editing.#2017-02-0908:36sooheonAs well as selecting symbols of course#2017-02-0908:36qqqactualy, I found t's notion of forward/backward/up/down very confusing 😞#2017-02-0908:36qqqhow do you use it, with evil or without evil?#2017-02-0908:36sooheonIt works well with evil because I and A in normal mode can take you to |( or )| very easily#2017-02-0908:37sooheonI use it with evil, it’s pretty much second nature to me.#2017-02-0908:37qqqhere's something I could never get it to work with lispy (and I spent a good two days configuring it)#2017-02-0908:37sooheonTry looking at some of abo-abo’s example usages. They’re really enlightening#2017-02-0908:37qqqI want h/l to move me to the nearest-left and nearest-right (#2017-02-0908:37qqqand I want j/k to move me to the ( on the prev/next line#2017-02-0908:38sooheonDon’t forget that f and b exist as well.#2017-02-0908:38qqqhttps://github.com/abo-abo/lispy#demos ?#2017-02-0908:38sooheonAs well as d#2017-02-0908:38sooheonfor Forward-sexp, Backward, and Different-paren#2017-02-0908:39sooheonYep those demos.#2017-02-0908:39sooheonI think that prev/next line is a less useful way to think of it than parent/sibling, which hjkl navigate#2017-02-0908:40sooheonVisually, f/b work well, as well as q, a, -#2017-02-0908:41qqqalot of the time the issue is: 1) I'm looking at a place on my screen (not where my cursor is) 2) I want to move my cursor there 3) hjkl makes sense, but thikning of "parent/nesting" not so much#2017-02-0908:42sooheonFair enough. In that case, q a - should help. I think a lot of the rest of the time, you’re thinking “I want to move up in this if expression” or “I want to go to the other clause”#2017-02-0908:43sooheonAnyways, if you’re interested, the demos do a better job of selling than I could just yapping :)#2017-02-0908:43qqqwell, the demos don't talk back to me#2017-02-0908:44sooheonHaha yeah I’m happy to proselytize#2017-02-0908:45sooheonOther keys of interest: g G m 2spc 3spc 4spc C-9 C-8#2017-02-0908:45qqqso a number of things that I find confusing about h/l suppose I Have:
(let [a1 ...
    a2 ...]
  (b1 ...)
  (b2 ...)
  (b3 ...))
a very common thing I want to do is place cursor on a1, then move down to a2, then move down to b1, then b2, then b3 /// and if I try to move with forward/backward sexp, I have to get on the right sexp, then I have to hit l which is weird when my brain says "dude, we want to move to next line"
#2017-02-0908:46sooheonTo do what you just said, I’d just be pressing j j j#2017-02-0908:47sooheonIf I want to edit a2, I’d press a to select a2, delete, then type#2017-02-0908:47sooheonIf after selecting a2, (i.e. it’s marked), I decide not to edit it, and I want to get to b1, I’d probably do hmj#2017-02-0908:48sooheonWhich puts the cursor just before the b1 paren#2017-02-0908:48qqqyou know what you could do to really convince me and would also convince lots of other people?#2017-02-0908:49qqqwrite a elisp module, which does the following: it records the sequence of the last 20 evil/paredit commands I'm editing; then it finds subsequences that can be optimized, and say "dude, this took you 15 strokes; in lispy, the following 4 strokes are equiv"#2017-02-0908:49qqqBAM BAM BAM, maybe people converted overnight#2017-02-0908:49sooheonbahaha yeah that’s a great idea#2017-02-0908:49qqqs/maybe/many/#2017-02-0908:49qqqthis is not maybe ocnvert people; this is definite convert many people#2017-02-0908:49qqqI probably have really shitty lispy habits, which is why I find lispy hard to use#2017-02-0908:50sooheonyeah I’ll say it again, try some of the demos ;)#2017-02-0908:50qqqif it could look at my edits, get a diff, and compute the optimal lispy solution, I'd learn lispy faster and also realize it's full power#2017-02-0908:50sooheonI didn’t grok lispy until I tried a few of them#2017-02-0908:50qqqyeah, currently watching #4; will try them after done watching#2017-02-0908:50sooheonBut yes, that’s a great idea which if I can’t do I’ll try to persuade the package author to try :)#2017-02-0908:51qqqmy dev machine has 8 cores; I am willing to let lispy use 7 of them to watch me code / teach me better editing skills#2017-02-0909:02sooheonHey after demo 4, I recommend demo 2 it’s pretty great#2017-02-1008:33arthur@cappy2112 I'll try to help get your emacs setup going, and there are others in here that know much more than I do this is a good place to chat about it#2017-02-1008:35arthurI sent an emacs init.el file that used the "use-package" package to install the basic packages for a decent experience with Clojure.#2017-02-1008:36arthurAnd it seems that the calls to the package system are not working for you, so it's unable to actually install any packages.#2017-02-1008:37arthurDoes this sound like I've gotten remotely close to understanding what's going on?#2017-02-1020:43jeffh-fphey now - new Emacs user here... setup based on http://www.braveclojure.com/basic-emacs/ and now I'm trying to get auto-completion to work with https://github.com/clojure-emacs/ac-cider -- I installed it and added it to my init.el file, and it says
ac-cider should now automatically be enabled when you visit a buffer in which cider-mode is active and auto-complete is enabled. (The symbols “cider” and “AC” should appear in the modeline.)
but I'm not seeing that. Ideas?
#2017-02-1020:45jeffh-fpauto-complete was working fine in the REPL even before messing around with ac-cider...#2017-02-1021:03dpsuttonjeff, brave clojure uses an ancient version of CIDER (0.8 vs 0.15). I spent two hours with someone recently who tried to use it and upgrade and we couldn't figure it out#2017-02-1021:04jeffh-fpI see#2017-02-1021:04dpsuttonif you're looking for a nice out of the box solution, I would recommend bbatsov's (creator of CIDER) emacs init called prelude#2017-02-1021:04dpsuttonhttps://github.com/bbatsov/prelude#2017-02-1021:04dpsuttonthat's what i run and i've been immensely happy with it#2017-02-1021:05dpsuttonbut is your problem here that you're just not seeing the modeline minor modes?#2017-02-1021:05dpsuttonstuff like this?#2017-02-1021:05jeffh-fpok I can look into using Prelude#2017-02-1021:05dpsuttonor are you having issues with the autocomplete?#2017-02-1021:06jeffh-fpmy issue is that autocomplete isn't working -- minor modes aren't getting activated (but I have no idea how they do get activated)#2017-02-1021:07jeffh-fpbut if I should upgrade first that's fine you tell me#2017-02-1021:07dpsuttonhonestly, I would just jump on prelude#2017-02-1021:07jeffh-fpok#2017-02-1021:07jeffh-fpI'll give that a shot and see#2017-02-1021:07dpsuttonthat version you are on has a checked in, byte compiled, old version of cider. i think there have been changes in bytecode and other things#2017-02-1021:07dpsuttonit was just nasty#2017-02-1021:08jeffh-fpok#2017-02-1021:08jeffh-fpthanks!#2017-02-1021:08jeffh-fpI'll report back 🙂#2017-02-1313:58jeffh-fphey @dpsutton - the prelude setup you recommended is working really nicely, thanks for the help#2017-02-1313:58dpsuttonno problem. glad its working#2017-02-1313:59dpsuttoni've been using it for a while and have had no complaints. i kinda wish they would change the brave clojure setup to that#2017-02-1313:59dpsuttonits just simple and really well done#2017-02-1314:00jeffh-fpI think my next step is to get fast at text editing/manipulation#2017-02-1418:21hkjelsI’m getting a bunch of these messages on a fresh install: Failed to verify signature: spinner-1.7.3.el.sig#2017-02-1418:22hkjelsIt seems every package from gnu.elpa fails#2017-02-1418:22hkjelshow can that be?#2017-02-1420:43qqqmy eyesight is not very good; I like solarized, but I need more contrast#2017-02-1420:43qqqwhat's a uber high contrast color scheme for emacs/clojure ?#2017-02-1421:42mattlynot to plug myself but to totally plug myself, I created my theme Farmhouse after realizing that I liked the solarized colors but needed way more contrast https://github.com/mattly/emacs-farmhouse-theme#2017-02-1421:42mattly@qqq ^#2017-02-1421:46tanzoniteblackI use moe-theme, which isn't super-high contrast, but way more than solarized: https://github.com/kuanyui/moe-theme.el#2017-02-1421:51qqq@mattly @tanzoniteblack : thanks!#2017-02-1421:52mattlyI've got another one I've been working on but haven't published yet, light version only, and higher-contrast#2017-02-1421:52mattlygui-mode only though#2017-02-1421:53qqqI need frames; no longer use emacs in terminal.#2017-02-1421:53mattlyheh#2017-02-1507:23qqqin paredit, "asdf|" if I type ", it exits the string; in lispy, it inserts a \" --> how do I tell lispy to 'exit" the string when I'm at "asdf|", where | = cursor#2017-02-1508:27pesterhazyMaybe )#2017-02-1508:29qqqnope, inserts it normally#2017-02-1508:29qqqthere is something else though, lispy-end-of-line or something, which moves to just after end of string if inside a string -- just bound that to a hydra#2017-02-1521:26qqqI'm trying to use multiple cursors with emacs. Everything is working fine. Until I start using hydra -- because hydra constantly asks me "Do hydra-... for all cursors?" I want this to default to "yes" all the time.#2017-02-1521:41qqqanyone running into the following problem? if you call lispy-cursor-down from inside a hydra, it adds TWO cursors instead of adding just ONE cursor?#2017-02-1522:46qqqanyone know why lispy uses multiple-cursors for first demo? (out of the 6) // it basically breaks under evil mode#2017-02-1523:32qqqthe jump from "vim -> paredit" is about the same as "paredid -> lispy" -- lispy is something else#2017-02-1600:43amdtDoes anyone have experience with Parinfer? https://shaunlebron.github.io/parinfer/#2017-02-1600:43amdtI use Paredit but gave Parinfer a go the other day and just couldn’t get the hang of it.#2017-02-1600:44amdtIt probably didn’t help that the implementation I tried seemed incomplete. https://github.com/DogLooksGood/parinfer-mode#2017-02-1601:12tianshu@amdt Hi, what problem you met?#2017-02-1601:14amdtOne thing I had trouble with was changing indentation: the tab key did nothing.#2017-02-1601:22tianshu@amdt Since emacser's TAB key is highly customized, I didn't make indent with TAB by default. If you use company to auto complete, and trigger it with TAB. here's my configuration(use with paredit).
(use-package parinfer
  :bind
  (:map parinfer-mode-map
   ("C-'" . parinfer-toggle-mode)
   ("M-r" . parinfer-raise-sexp)
   ("<tab>" . parinfer-smart-tab:dwim-right-or-complete)
   ("S-<tab>" . parinfer-smart-tab:dwim-left))
  :config
  (parinfer-strategy-add 'default 'newline-and-indent)
  (parinfer-strategy-add 'instantly
    '(parinfer-smart-tab:dwim-right
      parinfer-smart-tab:dwim-right-or-complete
      parinfer-smart-tab:dwim-left))
  :init
  (require 'ediff)
  (setq ediff-window-setup-function 'ediff-setup-windows-plain)
  (setq parinfer-lighters '(" Parinfer:Ind" . " Parinfer:Par"))
  (setq parinfer-extensions '(defaults pretty-parens smart-tab smart-yank paredit))
  (setq parinfer-auto-switch-indent-mode-when-closing t)
  (add-hook 'emacs-lisp-mode-hook 'parinfer-mode)
  (add-hook 'clojure-mode-hook 'parinfer-mode))
#2017-02-1601:26tianshuIf your company will popup automatically, use ("<tab>" . parinfer-smart-tab:dwim-right-or-complete) instead of ("<tab>" . parinfer-smart-tab:dwim-right)#2017-02-1601:30amdtI see. I don’t use company-mode or customise my tab key at all.#2017-02-1601:32amdtHow do you use Parinfer and Paredit together? I wouldn’t have expected them to complement each other.#2017-02-1601:39tianshuyou can try this
(use-package parinfer
  :bind
  (:map parinfer-mode-map
   ("C-'" . parinfer-toggle-mode)
   ("M-r" . parinfer-raise-sexp)
   ("<tab>" . parinfer-smart-tab:dwim-right)
   ("S-<tab>" . parinfer-smart-tab:dwim-left))
  :config
  (parinfer-strategy-add 'instantly
    '(parinfer-smart-tab:dwim-right
      parinfer-smart-tab:dwim-left))
  :init
  (setq parinfer-extensions '(defaults pretty-parens smart-tab smart-yank paredit))
  (add-hook 'emacs-mode-hook 'parinfer-mode)
  (add-hook 'clojure-mode-hook 'parinfer-mode))
I use paredit and parinfer together, paredit's command will always keep your code in right indentation, so there's no particular compatible issue.
#2017-02-1601:42tianshuI don't enable paredit-mode directly, because it have some hooks that will affect parinfer. I just do (require 'paredit), then bind paredit commands. there's the implementation in parinfer. I didn't bind all commands. but it's easy to do that https://github.com/DogLooksGood/parinfer-mode/blob/master/parinfer-ext.el#L121#2017-02-1609:07lowl4tencyWhich way is better to implement windows and mac os support at same time?#2017-02-1609:07lowl4tencyCreate 2 different init and load it depends from a platform#2017-02-1609:08lowl4tencyor wrap each platform dependent part to condition with platform check?#2017-02-1609:08lowl4tencyMy goal is same config on windows and macos laptops#2017-02-1609:50sooheon@mattly it’s a bit late, but I like your theme. Also if I’m not mistaken that’s the Input font, which is all I use, so our aesthetic senses must really line up :)#2017-02-1609:51qqqinstead of (1) having an org mode file which tangles out .clj files, is it possible to (2) have a .clj file which has org mode components, i.e. things like
* <-> ;
** <-> ;;
*** <-> ;;;
?
#2017-02-1609:52sooheonI think abo-abo does something kinda similar in his elisp files#2017-02-1609:52sooheonThe syntax is something like ;; ;; ;; etc#2017-02-1609:52sooheonand he has functions for navigating between them and so on#2017-02-1609:52qqqwtf#2017-02-1609:53qqqdid abo-abo write hydra and lispy too ?#2017-02-1609:55qqqhttps://github.com/abo-abo/oremacs/blob/github/init.el#2017-02-1609:55sooheonhaha yep he’s a elisp wizard. Kinda reminds me of vim’s tpope in that he has his own “philosophy” if you wan to call it that#2017-02-1609:55qqqlooks like he is using precisely the mode you described#2017-02-1609:56qqqin aboabo's system, is he able to (1) say "show all headings of level 2"?#2017-02-1609:56qqqthat's basically the main feature I want from org-mode when writing clojure code#2017-02-1609:57sooheonWhat I’ve noticed is section folding by header is level-aware (ie if I fold at ;; then it folds all ;;* below it)#2017-02-1609:57sooheonAlso there was a counsel interface to show all the headings#2017-02-1609:57qqqsooheon: which package are you using for "section folding" ?#2017-02-1609:57sooheonsimilar to lispy-goto#2017-02-1609:57qqq
The config comes with its own .Xmodmap that makes ; into an additional modifier. RSI savers:

;-v instead of Enter.
;-o instead of Backspace.
;-f instead of Shift-9 and Shift-0.
;-a instead of -.
;-s instead of Shift--.
;-q instead of Shift-'.
;-e instead of =.
;-u in addition / instead of C-u.
^^ this is insane
#2017-02-1609:58sooheonAh yeah I’m not using all that#2017-02-1609:58sooheonjust installed lispy, and pressing i with cursor before header will fold it#2017-02-1609:58sooheonshift tab will fold all headers like org#2017-02-1609:59qqqwait wait -- what are you using for showing headings jumping around?#2017-02-1609:59qqqthe once nice thing with org files is that I have something like C-8 = helm completion based on org mode header in all my *.org files#2017-02-1609:59qqqso I can jump anywhere I want in a few keystrokes#2017-02-1609:59sooheonOk, so I think what you need to replicate this is jsut lispy and ivy counsel swiper#2017-02-1610:00sooheonI think the latter three are all under swiper these days not sure#2017-02-1610:00qqqI have lispy, will look into ivy / counsel / swiper#2017-02-1610:01sooheonSo I’m folding stuff in my init file, and I’ve just called counsel-outline which gets me just those headings#2017-02-1610:02sooheonfolding with i in comments special and shift tab#2017-02-1610:02sooheonI’ve bound counsel outline to C-c o#2017-02-1610:03qqqokay, I'm sold#2017-02-1610:03qqqI've gotten nothing done in the past 4 weeks because every time I think I have the right emacs config, something else pops up#2017-02-1610:03sooheonhahah I’ve been there#2017-02-1610:03sooheonI’ve been mostly proselytizing abo-abo and all his packages recently#2017-02-1610:04sooheonthey’re all awesome#2017-02-1610:05qqqi think all the packages I'm using at th emoment are: evil stuff by abo-abo stuff by cider author#2017-02-1610:07sooheonthose are my essentials as well#2017-02-1610:07sooheonoh add stuff by tarsius#2017-02-1610:07sooheonauthor of magit who also has written no-littering#2017-02-1610:08qqqdoes he also manage melpa?#2017-02-1610:08sooheonno idea, but he’s made emacsmirror too#2017-02-1610:08sooheonwhich puts all the melpa packages in git#2017-02-1610:11qqqdo I want all of the following? counsel counsel -bbdb -dash -gtags -osx-app -projectile ?#2017-02-1610:13qqqokay, this is a dumb question:#2017-02-1610:13qqqhow do I get emacs to only show lines of the form ;; * ;; ;; * ;; and so forth ?#2017-02-1610:17qqq@sooheon : ^^#2017-02-1610:17sooheontry shifttab#2017-02-1610:17sooheonmake sure lispy is on#2017-02-1610:17sooheonit should be bound to lispyshifttab#2017-02-1610:18qqqM-x lispy-shifttab#2017-02-1610:18qqqdid nothing#2017-02-1610:18qqqM-x lispy-goto#2017-02-1610:18qqqno support found to parse buffer "util.cljs" <-- wtf#2017-02-1613:31hkjelshas the syntax for using named code-blocks changed in org 9?#2017-02-1613:32hkjelsIf I use the org-mode that ships with emacs, the blocks are expanded#2017-02-1613:33hkjelsI’m talking about these guys <<Modal-Editing>>#2017-02-1613:36hkjelsGee. Was looking at the wrong release-log#2017-02-1613:36hkjelssorry#2017-02-1613:56hkjelsWell. My file now goes through the linter without warnings, but still my code-blocks does not expand#2017-02-1613:58hkjelsmaking my code work with 9 made it incompatible with what ships with emacs. Grrr”#$%!#2017-02-1615:41sooheon@qqq Ah yeah I forgot to set it doesn’t have support for parsing cljs yet. Did you get the outliner working though?#2017-02-1617:23mattly@sooheon thanks; though I've since switched to using Apple's SF Mono font#2017-02-1618:14beppuFor anyone who wants to learn how to use org-mode better, I found a great playlist: https://www.youtube.com/playlist?list=PLVtKhBrRV_ZkPnBtt_TD1Cs9PJlU0IIdE#2017-02-1622:20qqqbesides org-mode, which requires tangling (and screws up line numbers) is there any other module that will give me "multi level headings" for a *.clj file? I want something like ` ;; * ;; ;; *#2017-02-1622:39qqqdoes projectile/helm for a comamnd for "search throuhg all .cljs .clj *.cljc files in current project" ?#2017-02-1622:59jfntn@qqq I use outshine for what you described#2017-02-1623:00jfntnThough I’m starting to question whether that’s a good idea because even emacs users don’t use that format...#2017-02-1623:07qqq@jfntn: what do you mean by "even emacs users don't use that format..."#2017-02-1623:20jfntnWell you need some obscure package to get folding and navigation to work. Lisp languages tend to prefer4, 3 or 2 semicolons and I think this works otob in emacs#2017-02-1700:39sooheon@qqq sounds like you didn’t manage to get lispy to work for you?#2017-02-1700:42qqq@sooheon : (1) lispy (in terms of navigation / manipulating sexps works fine) (2) "search for def across all *.cljs files" does not work (3) "show me only "headings"" does not work#2017-02-1700:43sooheonWhat is shift tab bound for you?#2017-02-1700:44qqq(lispy-shifttab ARG)#2017-02-1700:44qqqoh wow#2017-02-1700:45qqqit "works" now#2017-02-1700:45qqqwhy did this not work last night#2017-02-1700:45sooheonHaha that happens.#2017-02-1700:45sooheon2 is a problem right now… I only use it for clojure files#2017-02-1700:46sooheoncljs I just live with worse navigation (just using M-. M-, etc)#2017-02-1700:48qqqso in org, it's possible to define a "agenda dir" or a "agenda list of files" -- and basically, I can hit C-8 -- and it'll get HELM to search through the list of all *.org files, auto competing on the headings#2017-02-1706:44qqqcan someone point me to a emacs/projectile config where projectile-find-tag looks into ./src and generates a list based on all "defn" "def" "defmacro" ?#2017-02-1710:13caio@qqq maybe use etags? https://stackoverflow.com/questions/1481842/clojure-emacs-etags#2017-02-1710:13qqqcaio: curretly using helm-projectile-grep#2017-02-1710:13qqqmay switch back to etags, @caio#2017-02-1710:14caioYeah, i use helm-projectile-ag and works great#2017-02-1710:15qqqwhat is helm-prjoectile-ag should I install helm-ag ?#2017-02-1710:16qqqoh, I need to install something else, like platinum searcher, ack, or something else?#2017-02-1710:16caioYeah. But it's great for bigger projects#2017-02-1710:16qqqsilver searcher, interesting#2017-02-1710:17caioWay faster#2017-02-1710:17qqqlol, 10x faster according ot github page#2017-02-1710:17qqqI'm convinced; lag kills my motivation to use tools#2017-02-1710:17qqqinstant = I use it, 5 second delay = I try to avoid using it#2017-02-1710:24qqq@caio: just got port, the_silver_searcher, helm-projectile-ag working -- it's awesome; thanks!#2017-02-1710:28shemhelm-ag is great#2017-02-1714:33cmackI’ve been giving helm-ag with the ripgrep backend a go… so far pretty good, but I don’t know if I’m able to notice the claimed speed-up from silver_searcher#2017-02-1714:39caioI don’t now, but when I was working in a project with millions of lines of code, I could clearly notice it#2017-02-1714:46cmackthe speed between silver_searcher and ripgrep?#2017-02-1714:47cmackor silver_searcher vs. normal grep?#2017-02-1714:47caiosilver_searcher vs normal grep#2017-02-1714:47caiodidn’t know ripgrep#2017-02-1714:47cmackoh yah definitely agree vs. normal grep#2017-02-1720:45qqqI'm using evil mode in emacs. I was happy. Now, some package I have installed has made "m" (in normal mode) a "prefix key". This is not good, as I like to mark stuff before kill/yank. How do I figure out "what has overwritten my m- key in normal mode" ?#2017-02-1720:48dpsuttonin normal emacs, you can ask emacs what a key does#2017-02-1720:48dpsuttonfor me it is C-h c for help, character#2017-02-1720:48dpsuttoncan you do this for m?#2017-02-1720:48dpsuttonand see what is responding to it?#2017-02-1720:49qqqC-h c I press m minibuffer shows: Describe key (or click or menu item(): m- ==> looks like it's a prefix key, so it's waiting for me to "complete it"#2017-02-1720:56luxbock@qqq: you could try calling (describe-key (kbd "m")) in elisp#2017-02-1720:57qqq
m runs the command (keymap (118 . evil-lispy/enter-marked-state)), which is a sparse keymap.
#2017-02-1720:57qqqweird, when I press "m a", I get:#2017-02-1720:57qqq
m a is undefined
#2017-02-1723:05piotr-yuxuanHiya Emacsoers 🙂 I’ve been wondering, what’s your usual toolbox when writing cljs? is it as weel supported in Emacs as vanilla clj? 🙂#2017-02-1723:57pesterhazyit pretty much looks the same syntactically, so yes#2017-02-1800:37richiardiandreais there a magic trick to display with mode/package sets the background color by any chance?#2017-02-1804:55qqqShort Question: Every time I insert evil-insert-mode (say, when I press "i" or "a"), I want (lispy-mode) to run. Long Question: Sometimes, I get kicke out of lispymode. I think it's due to ()'s not being balanced. This means, I have to press "i", M-x (lispy-mode). Now, my question is -- is there some way to setup a hook so taht any time I go from evil-normal-mode to evilinsert-mode, it always runs (lispy-mode) ?#2017-02-1806:50qqqokay, fized the above#2017-02-1806:51qqqnew question: =============== I'm familiar with writing *.el -- have a 1K loc init.el however, I'm not familiar with patching existing libraries -- I need to fix an issue with outshine. How do I apply the following patch? https://github.com/tj64/outshine/pull/46/files#2017-02-1806:57qqqapparently that was merged into outshine already; unfortunately, it did not solve my problem#2017-02-1816:34munen@qqq I'm no expert in that, so take my answer with a grain of salt. Hitting i in evil-mode doesn't trigger a new mode, it just executes the function evil-insert. Found that via C-h c i RET. This function doesn't have a hook (at least not findable via C-h a evil insert RET. So, my best guess is that you'd have to use defadvice. Something like this should work. Note that I'm not checking whether lispy-mode is already running, I'll leave that up to you.
(add-function :after (symbol-function 'evil-insert) #'(lambda (x y z)
                                                        (lispy-mode)))
#2017-02-1816:36munen@piotr2b I'm writing CLJS and CLJ regularly. CLJ is well supported by Cider and Clojure-Refactor. In CLJS both modes have less functionality, but both provide proper errors when they don't support the same feature in CLJS.#2017-02-1817:56piotr-yuxuan@munen yeah that’s what I was afraid about: less features for cljs 😕#2017-02-1817:56munen@piotr2b Still, some things are working that make life easier. Code Eval (Cider), Cleanup of NS (Clojure Refactor).#2017-02-1817:56piotr-yuxuanis it useable though?#2017-02-1817:58munenI'd say yes. Jumping to definitions, code eval and cleanup of ns are things I'm definitively doing on a regular basis. Some things need a work around. For example you cannot extract a function. But you can extract a def. Of course that's not the same, but adding parameters and a docstring is still less typing than doing it completely yourself.#2017-02-1820:10qqqsuppose I have a file "http://tetris.org" and there are 10 diferent code blocks in http://tetris.org that tangle to /src/cljs/main.cljs now, I get an error saying: something bad happened on line 273 of main.cljs is there a way go inverse, to go from "line 273 of main.cljs" to "which of the 10 blocks of http://tetris.org it came from" ? if not, is easy file only supposed to have a single code block?#2017-02-1900:25jmpHello Emacs Clojurians! I am quite new to programming, Clojure, and Emacs. So I have some embarrassing questions and problems. So here goes my first issue: When I execute cider on emacs it starts a REPL, but it doesn't generate a buffer for me to access the REPL, anyone has experienced this problem and maybe knows how to solve it? Feel free to suggest the simplest answers since, as I mentioned before, I'm incredibly new to this. Thank you all in advance!#2017-02-1900:58dpsuttoncan you tell me what steps you take when you: > execute cider#2017-02-1900:58dpsuttonand what does it mean when it "starts a REPL but it doesn't generate a buffer"#2017-02-1901:01dpsutton@juanmp can you clarify those things for me#2017-02-1901:02jmpFor sure! thank you for taking the time. Maybe I'm doing a step wrong but it used to work for me.. So the steps I'm taking are:#2017-02-1901:02jmpdo M-x cider-jack-in#2017-02-1901:02dpsuttonok, that sounds right#2017-02-1901:02jmpthen it says its starting it. And once it's done there is no buffer to access it#2017-02-1901:03dpsuttoncan you visit your *Messages* buffer?#2017-02-1901:04dpsuttonmaybe there's some info in there#2017-02-1901:04dpsuttonand you waited the 20 or so seconds that it can take to startup?#2017-02-1901:05jmp'ad-handle-definition: ‘ido-completing-read’ got redefined For information about GNU Emacs and the GNU system, type C-h C-a. Are you sure you want to run `cider-jack-in' without a Clojure project? (y or n) y Starting nREPL server via /usr/local/bin/lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.12\"\ \:exclusions\ \[org.clojure/clojure\]\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.14.0\"\] -- repl :headless... nREPL server started on 51408 [nREPL] Establishing direct connection to localhost:51408 ... [nREPL] Direct connection established Connected. One chord is fine. Two chords is pushing it. Three chords and you’re into jazz. -Lou Reed Quit Loading /Users/juan/.emacs.d/recentf...done Cleaning up the recentf list...done (0 removed)'#2017-02-1901:05jmpI cleaned opened emacs and this is what I got when trying to run it#2017-02-1901:05dpsuttonok#2017-02-1901:05dpsuttondo you know how to list your buffers?#2017-02-1901:06jmpi isually use C x C b to see my buffers#2017-02-1901:06dpsuttonok#2017-02-1901:06dpsuttonperfect#2017-02-1901:06dpsuttonit should say the type of buffer#2017-02-1901:06dpsuttonin the 4th column#2017-02-1901:07dpsuttonif you open that up, you can search for repl#2017-02-1901:07dpsuttonand perhaps its just not showing you the repl#2017-02-1901:07dpsuttonbut it may be creating it#2017-02-1901:09jmphhmm I'm trying to follow this, hold on#2017-02-1901:11jmpSorry for being so slow. I can't find a way to do your suggestion#2017-02-1901:11jmpThis is what I get when doing C x C b usually#2017-02-1901:12dpsuttonok its for sure not creating the repl buffer then#2017-02-1901:12dpsuttoni was asking for you to search the mode column for one with "repl"#2017-02-1901:12dpsuttonbut since there's only 3 its not necessary#2017-02-1901:12jmpOh I see#2017-02-1901:12dpsuttonand you've run cider-jack-in already#2017-02-1901:12jmpyeah#2017-02-1901:13jmpWhen I try to close emacs even it tells me that is running#2017-02-1901:13dpsuttondo you have a clojure project?#2017-02-1901:13dpsuttonah, so the process is started#2017-02-1901:13jmpYeah I do#2017-02-1901:13dpsuttoncan you try to jack into a clojure project?#2017-02-1901:13jmpSure thing#2017-02-1901:14qqq1) Are you using boot or leingein? 2) Can you (1) run the repl outside of emacs, and run "M-x cider connect"? <-- this is to binary search "can the repl start" from "can cider connect"#2017-02-1901:14dpsuttonim not familiar with jacking in without a project#2017-02-1901:17jmpI'm using leiningen#2017-02-1901:17jmpI've never tried M x cider-connect#2017-02-1901:18qqqokay, if you open a shell and you type in "lein repl"#2017-02-1901:18qqqdo you get a repl, or does it fail>#2017-02-1901:18qqqalso, as @dpsutton said: you should ahve a project, so create a basic project.clj#2017-02-1901:18jmplein repl works just fine as I can see#2017-02-1901:18jmpAlright, I'll try that#2017-02-1901:19qqq1) type in "lein new foobar" // reates new project, should give you project.clj 2) in foobar/ , type in "lein repl" 3) open up foobar/project.clj in emacs, type in M-x cider connect 4) see if cider connects this way#2017-02-1901:23jmpStill the same issue#2017-02-1901:23jmpI have the clj project open, run the cider jack in after having run the lein repl in foobar and all#2017-02-1901:23dpsuttoncan you kill your emacs, open it up again fresh, and do the jack in from the project, and show us the messages buffer output?#2017-02-1901:24jmpfor sure, a sec#2017-02-1901:24dpsuttoncool#2017-02-1901:24dpsuttonalso, what version of emacs are you using#2017-02-1901:24qqqthis is way overkill; but do you know how to use https://www.liveedu.tv/ ? if you could live stream, we could probably debug this in like 5 mins#2017-02-1901:25dpsuttonand are you using the template for emacs from brave clojure?#2017-02-1901:25jmpI reinstalled with brew today so it should be the latest#2017-02-1901:25jmpI did initially, then I realised it was all screwed up so I installed the latest through brew, and it was working fine for a while#2017-02-1901:26dpsuttondid you recently try to upgrade your CIDER by any chance?#2017-02-1901:26dpsuttonand are you saying that you are following the brave clojure emacs setup?#2017-02-1901:27jmpno no, I did initially, and then a friend who is a clojure developer helped me set it up properly, but i must have screwed it up at some point#2017-02-1901:28dpsuttonah ok#2017-02-1901:28dpsuttoni've seen people run into issues with that brave clojure setup#2017-02-1901:28dpsuttoni'm glad someone helped you get it up and running#2017-02-1901:28dpsuttonit's pegged to CIDER version 0.8 and includes the compiled bytecode as well as the el files#2017-02-1901:28dpsuttonit's really not a good setup#2017-02-1901:30jmpAnd I'm trying to get this live edu thing running btw @qqq haha#2017-02-1901:30jmpYeah exactly, I had issues with the brave clj setup#2017-02-1901:33qqqI'm in a helpful mood -- a number of people spent who knows how much time helpine mget dirac setup; if you can manage to stream your setup, we can probably help you fix it#2017-02-1901:34jmpAlmost there with the install! 🙂#2017-02-1901:36jmpLet see if my current connection can handle it#2017-02-1901:36jmphttps://www.liveedu.tv/juanmp/#2017-02-1901:37jmpis it working?#2017-02-1901:37dpsuttoni can see it#2017-02-1901:38dpsuttonok, can you navigate to the project file that you made?#2017-02-1901:38dpsuttonok, and now m-x cider jack in#2017-02-1901:39qqqproject.clj looks good, yeah, as @dpsutton said, try M-x cider-jack-in#2017-02-1901:39dpsuttonok#2017-02-1901:39dpsuttonnow can you go to th emessages buffer?#2017-02-1901:39dpsuttonsuper strange#2017-02-1901:39qqqthis is weird, it says "connected, Happy ahcking" at the bottom, but no buffer for cider?#2017-02-1901:40jmpright??#2017-02-1901:40dpsuttoncan you run M-x cider-version#2017-02-1901:40jmp0.14.0 (Berlin)#2017-02-1901:40qqqthis is absolutely insane, butwould you mind 1) moving ~/.emacs.d to ~/old-emacs 2) running a new emacs, and typing in M-x package-install <RET> cider 3) and trying this in the new emacs? I'm suspecting there's something wrong with the cider install.#2017-02-1901:41dpsuttoni would just delete the cider installation#2017-02-1901:41dpsuttondo you know how to do that?#2017-02-1901:41jmpgo to the package list?#2017-02-1901:41jmpor?#2017-02-1901:41dpsuttonwe'll need to delete the folder#2017-02-1901:41jmpoh ok#2017-02-1901:41dpsuttonnavigate to your .emacs.d/ directory#2017-02-1901:42dpsuttonwhich be default should be ~/.emacs.d/#2017-02-1901:43dpsuttonok and we want to delete the folder under elpa that holds cider#2017-02-1901:43dpsuttonhey want to learn something?#2017-02-1901:43jmpsure thing!#2017-02-1901:44dpsuttonok#2017-02-1901:44dpsuttonwe're gonna do this in emacs#2017-02-1901:44dpsuttonto open up dired, we hit C-x d#2017-02-1901:44jmpalright#2017-02-1901:44dpsuttonperfect#2017-02-1901:44dpsuttonand let's go to .emacs.d#2017-02-1901:45dpsuttonhit enter#2017-02-1901:45dpsuttonenter again#2017-02-1901:45dpsuttonyou're using the directory mode of emacs#2017-02-1901:45dpsuttonsuper useful#2017-02-1901:45dpsuttonand you can use all the standard emacs shortcuts#2017-02-1901:45dpsuttonand searches and everything#2017-02-1901:45jmpoh wow, i didnt know this existed even#2017-02-1901:45dpsuttonyeah its awesoem#2017-02-1901:45dpsuttonnow move down to elpa and press enter#2017-02-1901:46dpsuttonok, i still see the cider readme in there which comes from brave clojure#2017-02-1901:46dpsuttonso we want to delete two things#2017-02-1901:46dpsuttonthe cider directory and that readme
#2017-02-1901:46jmpoh really? I even reinstalled emacs today, strange#2017-02-1901:46dpsuttonnavigate down to both of them and press the d key#2017-02-1901:47dpsuttony#2017-02-1901:47jmprecursively?#2017-02-1901:47dpsuttonyeah#2017-02-1901:47dpsuttonsame for that text file about cider#2017-02-1901:47dpsuttonlooking good#2017-02-1901:47jmpthis is fantastic, I never have to leave emacs again 🙂#2017-02-1901:47dpsuttonto go to the parent folder, hit ^#2017-02-1901:47dpsuttonyeah#2017-02-1901:48dpsuttonso enter on something to "go" to it, and ^ to go up a level#2017-02-1901:48dpsuttong refreshes#2017-02-1901:48dpsuttonok, let's kill emacs and restart it#2017-02-1901:48dpsuttonto make sure there's no trace of old CIDER code laying around#2017-02-1901:49dpsuttonyeah kill emacs and it'll kill those child processes#2017-02-1901:49jmpgetting some warnings#2017-02-1901:49dpsuttonyou killed and reopened emacs?#2017-02-1901:49jmpyeah#2017-02-1901:49dpsuttonthat's probably fine#2017-02-1901:49dpsuttonit saw some fresh .el files and compiled them#2017-02-1901:49dpsuttonand unused vars cause warnings#2017-02-1901:50dpsuttonyou have to prepend them with an underscore#2017-02-1901:50dpsuttonok, let's install CIDER again#2017-02-1901:50dpsuttonM-x list-packages#2017-02-1901:50dpsuttonawesome#2017-02-1901:50dpsuttondo you know how to search?#2017-02-1901:50dpsuttonC-s cider#2017-02-1901:51dpsuttonand then keep hitting C-s until we are on the one we want to isntall#2017-02-1901:51dpsuttonkeep going#2017-02-1901:51dpsuttoni think i see what's going on#2017-02-1901:51jmpthis one? says installed#2017-02-1901:51dpsuttonyou'll see it at the very end#2017-02-1901:51jmpweird#2017-02-1901:51dpsuttonyeah#2017-02-1901:52dpsuttonbecause we should have uninstalled it#2017-02-1901:52dpsuttonpress enter#2017-02-1901:52dpsuttonhit that delete button#2017-02-1901:53jmpboom#2017-02-1901:53dpsuttonok#2017-02-1901:53dpsuttonlet's kill emacs and open it up once again#2017-02-1901:53dpsuttonand we should see a state that thinks CIDER isn't installed#2017-02-1901:53dpsuttoncause that was kinda weird#2017-02-1901:53dpsuttonlet's try to get to a known good state#2017-02-1901:54jmphaha yeah#2017-02-1901:54dpsuttonwhat the heck#2017-02-1901:54dpsuttonwhy is it compiling cider again#2017-02-1901:54qqqI still think we should consider moving ~/.emacs.d to ~/old-emacs, staritng from scratch, and just doing M-x package-install <RET> cider 🙂#2017-02-1901:54dpsuttoni think qqq may be right#2017-02-1901:54dpsuttonsomething is pretty funky#2017-02-1901:54jmpyeah, it seems so#2017-02-1901:54dpsuttonit should definitely not think there's a CIDER installed#2017-02-1901:55jmpSo how do we do that? is it just a name change?#2017-02-1901:55dpsuttonyeah#2017-02-1901:55dpsuttonprobably easiest from the cmd line#2017-02-1901:56dpsuttonmv .emacs.d old-emacs#2017-02-1901:56jmpalright, done 😄#2017-02-1901:57qqqkillall existing emacs#2017-02-1901:57qqqopen up emacs from scratch type in M-x package-install <RET> cider#2017-02-1901:57dpsutton^#2017-02-1901:57jmpDo I have to do a new install of emacs or just opening my install is fine?#2017-02-1901:57dpsuttonnah just reopen emacs#2017-02-1901:58dpsuttonyou shouldn't ever really need to resinstall emacs#2017-02-1901:58dpsuttonits just the ~/.emacs.d tells emacs what to look like#2017-02-1901:58dpsuttonand which packages, etc#2017-02-1901:58qqq"by kill existing emacs" I mean "kill -9 any running emacs process which might e using old ~/.emacs.d"#2017-02-1901:58jmpalright, fresh stuff#2017-02-1901:59qqqthough I could see how it was interpreted as "uninstall/reinstall emacs"#2017-02-1901:59dpsuttonsweet clean slate#2017-02-1901:59jmpno match for cider?#2017-02-1902:00dpsutton(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))#2017-02-1902:00qqq
(require 'package)
(add-to-list 'package-archives '("melpa" . "") t)
(package-initialize)
#2017-02-1902:00dpsuttoneval that code in your scratch buffer#2017-02-1902:01jmpdo i just paste it or?#2017-02-1902:01dpsuttonpaste it#2017-02-1902:01dpsuttonM-x eval-buffer#2017-02-1902:02qqqprobaly put it in ~/.emacs.d/init.el#2017-02-1902:02dpsuttonwe need to eval that code#2017-02-1902:02qqq1) put the above in ~/.emacs.d/init.el 2) run M-x eval-buffer 3) run M-x package-install <RET> cider#2017-02-1902:03jmphaha, im useless, what am I doing wrong?#2017-02-1902:04dpsuttonyou're doing fine#2017-02-1902:04dpsuttontry M-x list-packages#2017-02-1902:04dpsuttonthat'll make sure the list is refreshed#2017-02-1902:05jmpoh that did it 😄#2017-02-1902:05dpsuttonnow just search for cider again#2017-02-1902:05dpsuttonawesome#2017-02-1902:05qqqwoot, is cider installed?#2017-02-1902:05dpsuttonand try jacking in again from the project file#2017-02-1902:06qqq1) open up that project.clj file (this sets the directory to the correct place) 2) type in M-x cider-jack-in#2017-02-1902:06qqqif the above fails, reformat the OS and do a clean install form a iso blesed with holy water#2017-02-1902:06jmphahahah#2017-02-1902:06qqqokay hang on, we need to setup lein#2017-02-1902:07qqqcan you open up a terminal and type in "which lein" ? (emacs can't find lein)#2017-02-1902:07jmpjust on root?#2017-02-1902:07jmpreturns: /usr/local/bin/lein#2017-02-1902:07qqqokay 1 sec#2017-02-1902:08qqq
(setenv "PATH" (concat "/usr/local/bin/:" (getenv "PATH"))
(setq exec-path (cons "/usr/local/bin/" exec-path))
^^ add those two lines do you ~/.emacs.d/init.el, and then do "M-x eval-buffer" again
#2017-02-1902:09jmpis there any quick way to access the init file?#2017-02-1902:09qqqgiven the barebones emacs.d/init.el we ahve at the moment, no#2017-02-1902:10qqqC-x C-f ~/.emacs.d/init.el#2017-02-1902:10jmpoh, it's empty#2017-02-1902:10qqqehh, tha's weird, why is it empty#2017-02-1902:11jmpi don't think there is an init file#2017-02-1902:11jmpit said new file when i tried to access it#2017-02-1902:11jmpor something of the sort#2017-02-1902:11jmp😅#2017-02-1902:12jmpThere was no init.el on my .emacs.d folder#2017-02-1902:12dpsuttonthat's no big deal#2017-02-1902:12dpsuttonthat's why we moved the old stuff#2017-02-1902:12dpsuttonso there wouldn't be one#2017-02-1902:12dpsuttonbut once you get lein visible to emacs it should work#2017-02-1902:12jmpso just saving this as the init should be fine?#2017-02-1902:12dpsuttonwe're just making sure there's nothing wrong with a good working example#2017-02-1902:13dpsuttonyeah that'll be fine#2017-02-1902:13qqqyou need to run M-x eval-buffer#2017-02-1902:13qqqthis runs the (setq exec-path .... ) line, which adds the lein path#2017-02-1902:13jmpoh alright, yeah that makes sense now#2017-02-1902:13qqqerr wait#2017-02-1902:13qqqM=x eval buffer failed#2017-02-1902:13qqqwe're missing a ")" on the first line#2017-02-1902:14qqqmy bad, it should end with 3 )'s, not 2 )'s#2017-02-1902:14jmpthere#2017-02-1902:14jmp😄#2017-02-1902:14qqqgood, run M-x eval buffer again#2017-02-1902:14qqqnow switch back to project.clj#2017-02-1902:15qqq1) M-x eval buffer seems to ahve succeeded 2) siwtch back to project.clj 3) run M-x cider-jack-in#2017-02-1902:15qqqappears it found lein, now let's just wait#2017-02-1902:15jmpwoooo#2017-02-1902:15jmpsuccess!#2017-02-1902:15qqqYAY#2017-02-1902:16jmpDamn guys, that was awesome!#2017-02-1902:16dpsuttonwe're not done yet#2017-02-1902:16qqqokay, so there's cider middleware problems#2017-02-1902:16dpsuttoni think you're still poisoned with brave clojure#2017-02-1902:16jmpoh really?#2017-02-1902:16dpsuttoncan you open up a dired directory to ~#2017-02-1902:16dpsuttonyeah#2017-02-1902:16jmpdang it#2017-02-1902:16dpsuttonno big deal#2017-02-1902:16qqqsee the big red "WARNING ... ." -- so we are connected ot the lein repl, but cider isn't properly loaded yet#2017-02-1902:16dpsuttoni'm guessing we have that lein profiles junk laying around#2017-02-1902:17qqq@dpsutton: actually, I think the issue is just we don't ahve cider middleware -- it says: we need 0.15.0 -- we have (nil)#2017-02-1902:17dpsuttonyeha#2017-02-1902:17dpsuttonand it gets that by asking the backend#2017-02-1902:17qqqunfortunately, I use boot, so my usefulness may be ending#2017-02-1902:17dpsuttonbut when you load 0.15 like we did, it specifies th ecorrect middleware#2017-02-1902:17dpsuttonunless you manually specify a different version#2017-02-1902:17dpsuttonlike 0.8 in a lein profiles file#2017-02-1902:17qqq@juanmp: what precisely are you trying to do? perhaps we can point you at the right template on github you can clone#2017-02-1902:18dpsuttonlet's finish this out#2017-02-1902:18dpsuttoncan you open that dired buffer to your home directory?#2017-02-1902:18qqq@dpsutton: you're saying that emacs/cider has the ability to tell lein to install the correct version of cider-middleware?#2017-02-1902:18dpsuttonC-c d [enter] ~#2017-02-1902:18dpsuttonyes#2017-02-1902:18dpsuttonit does every time#2017-02-1902:18dpsuttoncider tells clojure what deps it needs#2017-02-1902:18qqqinteresting; time for me to watch + learn#2017-02-1902:19jmpoh. so what's the next step then?#2017-02-1902:19dpsuttonopen up a dired buffer to your home directory#2017-02-1902:19dpsuttonC-c d [enter] ~#2017-02-1902:20jmpC-c d is undefined?#2017-02-1902:20dpsuttonwhoops#2017-02-1902:20dpsuttonC-x d#2017-02-1902:20dpsuttonwe want a dired buffer#2017-02-1902:20dpsuttonand just your home directory#2017-02-1902:20dpsutton~#2017-02-1902:20dpsuttonok#2017-02-1902:20dpsuttonwe're looking for ~/.lein#2017-02-1902:20dpsuttonsearch for lein#2017-02-1902:20dpsuttonC-s lein#2017-02-1902:21dpsuttonawesome#2017-02-1902:21dpsuttonhit enter#2017-02-1902:21dpsuttonhit enter on profiles#2017-02-1902:22qqq@dpsutton: unless juanmp has lein configs we want to save; could we just do "rm -rf ~/.lein" and rerun everthing? this should remove all the "old config" ?#2017-02-1902:22dpsuttonyeah#2017-02-1902:22dpsuttonjust delete that lein directory#2017-02-1902:22dpsuttoni hate the brave clojure setup so much#2017-02-1902:22dpsuttonso cider says load this stuff#2017-02-1902:22dpsuttonand lein profiles says hey this is ultimately what you want#2017-02-1902:22jmpso just delete the lein directory?#2017-02-1902:22qqqlol#2017-02-1902:22dpsuttonso we end up with cider middleware from two years ago#2017-02-1902:23dpsuttonyeah delete the ~/.lein directory#2017-02-1902:23jmpjesus..#2017-02-1902:23dpsuttonand so cider says, hey backend, i'm 0.15, who are you#2017-02-1902:23dpsuttonand that backend is so old it doesn't respond to that command#2017-02-1902:23dpsuttonso that's why the frontend says, "I'm 15 and i don't recognize who's on teh back end. things will probably break"#2017-02-1902:23qqqthis conversation is 1% progress and 99% "how to remove brave clojure setup"#2017-02-1902:24jmphahaha yeah#2017-02-1902:24jmpshould i just delete it?#2017-02-1902:24dpsuttondelete wht?#2017-02-1902:24jmpthe .lein folder?#2017-02-1902:24dpsuttonthe ~.lein directory#2017-02-1902:24dpsuttonabsolutely#2017-02-1902:25dpsuttonthen let's kill that cider connection and try one more time#2017-02-1902:25dpsuttoni belive that jacking in will work this time#2017-02-1902:26dpsuttonthat's a dired buffer!#2017-02-1902:26dpsuttonwelcome to the emacs way!#2017-02-1902:26dpsuttondo you remember what we pasted into the scratch buffer earlier?#2017-02-1902:27dpsuttonand you can see the error message its saying and we know how to fix that#2017-02-1902:27dpsutton"i don't know what lein is" "well, my good OS, it's located right here"#2017-02-1902:27jmphahaha#2017-02-1902:28qqqtop line missing a )#2017-02-1902:28qqqwe need 3 )'s not 2)'s on top line#2017-02-1902:28jmpright haha#2017-02-1902:29dpsuttonand after we show that CIDER works and you had a faulty init previously, I want to recommend a good init for ya#2017-02-1902:29jmpso now i eval this buffer#2017-02-1902:29dpsuttonyeah#2017-02-1902:29jmpshould i try now?#2017-02-1902:29dpsuttonand then jack in#2017-02-1902:29dpsuttonyeha#2017-02-1902:29dpsuttonparens#2017-02-1902:30jmpno horrible message of death!#2017-02-1902:30dpsuttonhuzzah!#2017-02-1902:30jmpwoot!#2017-02-1902:30jmpyou guys are wizards#2017-02-1902:30qqq@dpsutton: this is amazing, how did you infer that ~/.lein was the problem? I would have never guessed that#2017-02-1902:30dpsuttonnah, we've just seen a few errors#2017-02-1902:31jmpvery patient wizards i'll add#2017-02-1902:31dpsuttonthis is the second person i've dealt with with brave clojure problems#2017-02-1902:31jmphaha oh god#2017-02-1902:31dpsuttonthat lein profiles middleware is seriously out of date#2017-02-1902:31qqqi.e. how do you go from "want 0.15.0, saw (nil)" to "brave clojure fucked up ~/.lein"#2017-02-1902:31dpsuttonbecause he mentioned brave earlier#2017-02-1902:31dpsuttonor she#2017-02-1902:31dpsuttonno idea#2017-02-1902:32dpsuttonbut yeah, when i see a middleware mismatch and i've heard brave i have a good idea of where the problem is#2017-02-1902:32jmphe 😄#2017-02-1902:32dpsuttoncool cool#2017-02-1902:32jmpI have to message the brave clojure guy about this#2017-02-1902:32dpsuttongot a recommendation for you for a smooth solid and professional emacs setup#2017-02-1902:32dpsuttonhttps://github.com/bbatsov/prelude#2017-02-1902:32dpsuttonbbatsov is an awesome dude and also just happens to be the maintainer of CIDER#2017-02-1902:33jmpoh nice!#2017-02-1902:33jmpYou guys are awesome. If you ever come to Stockholm hit me up, I owe you both a beer!#2017-02-1902:33dpsuttonoh nice!#2017-02-1902:34dpsuttonhappy coding#2017-02-1902:34dpsuttonthere's a #cider channel here as well if you ever have specific cider questions#2017-02-1902:34jmpAwesome, I'll join right away! 😄#2017-02-1902:34jmpI think it's bedtime for me, 3:35 am trying to fix emacs haha#2017-02-1902:34dpsuttonwow#2017-02-1902:35dpsuttonthat's rough#2017-02-1902:35jmphaha anything for a good time clojuring tomorrow tho 🙂#2017-02-1902:35dpsuttonemacs is amazing because its a lisp interpreter/editor from the 70s#2017-02-1902:35dpsuttonemacs is terrible because its a lisp interpreter/editor from the 70s#2017-02-1902:35dpsutton👍#2017-02-1902:36jmphahaha#2017-02-1902:36jmpfair enough#2017-02-1902:36jmpbut @qqq and @dpsutton you both rule, thank you so much for your time and patience. And now you know you have free beers in Stockholm!#2017-02-1902:36dpsuttonappreciated#2017-02-1902:36qqqhave fun 🙂#2017-02-1902:36dpsuttonthis community is awesome#2017-02-1902:37jmpThanks guys! have a great evening#2017-02-1903:19qqqI'm using lispy, evil, and evil-lispy. Anyone have good recommendations for: (1) "rainbow () [] {}'s" and (2) not sure what this is called -- but when I move the cursor over a )]}, I want it to show me the corresponding {[(#2017-02-1903:22dpsuttonfor 1, https://github.com/Fanael/rainbow-delimiters#2017-02-1903:23dpsuttonfor 2, it's built in: (show-paren-mode 1)#2017-02-1903:23dpsuttonhttps://www.emacswiki.org/emacs/ShowParenMode#2017-02-1903:23jmpoh btw, any auto complete package for the mini buffer?#2017-02-1903:23qqq@dpsutton : rainbow-delimiters is beautiful#2017-02-1903:25qqqshow-paren-mode is not what I had in mind but definitely answers my question#2017-02-1903:25qqq(i.e. what I used to use in paredit seemed a bit more "subtle" compared to show-paren-mode, which seems very glaring)#2017-02-1903:26dpsuttoni use it quite a bit in making sure i'm in the right form#2017-02-1903:26dpsuttonnot sure what lispy does#2017-02-1903:28qqq(setq show-paren-delay 0.0) ;; default of 0.125 is infuriating#2017-02-1903:29qqqfeels laggy#2017-02-1907:01qqqShort Question: How do I do "find and insert sexp?" Longer Question: I have a number of *.cljs files. In some of these files, I have lines that look like:
(def-foo :student
  [:age :gender :name])
(def-foo :dog: 
  [:favorite-toy :age :gender])
now, if I just wanted to jump to the definition of (def-foo :student ... or (def-foo :dog, I could do this via etags however, that's not what I wnat what I want is: (1) find me the def and (2) grab+insert the entire sexp of the def what is the ideal way to achieve this ?
#2017-02-1907:01qqqs/ideal/simplest#2017-02-1907:04dpsuttonthere's a cider eval last and replace#2017-02-1907:04qqqthere's a search component involved#2017-02-1907:04dpsuttonso if you were in code writing (foo :dog), you could eval and replace and it would replace that sexp with its value#2017-02-1907:05qqqso my cursor is over 🐶 and at this point, I want to insert the entire sexp (def-foo :dog [....]) inplace#2017-02-1907:05dpsuttonthat seems very specific to what you're doing#2017-02-1907:05qqqyeah, I'm tryint fo gireu out pieces to patch it together#2017-02-1907:05dpsuttoni'm not sure how any generic package could know that :dog in your case referred to the code#2017-02-1907:06qqqright right, I expect this to be an elisp solution, not an cider solution#2017-02-1907:06dpsuttonah gotcha#2017-02-1907:06qqqso for example, one can imagine that I have a helm-projectile setup, which has all of def-foo indezed#2017-02-1907:06qqqso when my cursor is over
:dog 
, I hit some key combo, and this helm thingy pops up, with only (def-foo from my current project
#2017-02-1907:07qqqthen I type in
:dog 
... and ti narrows to one choice
#2017-02-1907:07qqqthen, I bind the action to "grab entire sexp and insert it here" instead of "jump to definition"#2017-02-1907:07dpsuttonwell, emacs has notion of thing at point#2017-02-1907:07dpsuttonso it's easy to know what's under your cursor#2017-02-1907:07qqqah, so (thing-at-point) would give me
:dog
#2017-02-1907:07dpsuttontought part will be connecting it to code aware#2017-02-1907:08dpsuttonbut there's cider stuff that you could mabe call from your own elisp code#2017-02-1907:08qqqactually I think elisp is good enough to "parse sexp" for cljs, i.e. as long as I'm only using () [] {} , elisp should grab the sexp correctly#2017-02-1907:08dpsuttonmaybe so#2017-02-1907:09dpsuttonespecially if they all have the same form of (def-foo #2017-02-1907:09dpsuttonwill they all be in the same file?#2017-02-1907:09qqqthey all do, as I'm writing the code 🙂 no, not in the same file, but in the same helm-pojectile project#2017-02-1907:10dpsuttonwell, sounds like you've got some straight forward text search and replacement then#2017-02-1907:10dpsuttonemacs is super useful#2017-02-1907:10qqqyeah, I just need to study helm-projectile a bit more#2017-02-1907:10qqqthanks for the discussion#2017-02-1907:11dpsuttonno problem#2017-02-1907:11dpsuttoni did something like this a little bit#2017-02-1907:11dpsuttonfor renaming a bunch of tests#2017-02-1907:11dpsuttonthe searching stuff in emacs is kinda weird#2017-02-1907:20qqqhelm-projectile-ag solves the "search part"#2017-02-1907:20qqqliterally the function I need so the remaining part is "how to change action from "go to loc" to "extract and insert sexp""#2017-02-1908:15andrea.crottiHelm projectile does also replacement
#2017-02-1908:15andrea.crottiJust 'r' instead of 's' as the last key of the command #2017-02-1908:16andrea.crottiOtherwise cljr also has that but not for Clojurescript #2017-02-1908:16andrea.crotti@qqq#2017-02-1908:17qqq@andrea.crotti : I think what you said is important#2017-02-1908:17qqqbut I don't know how to use it#2017-02-1908:17qqqwhen do I press "r" ?#2017-02-1908:20andrea.crottiC-c p r#2017-02-1908:20andrea.crottiI think #2017-02-1908:21andrea.crottiJust check the helm projectile functions #2017-02-1908:21andrea.crottiThere is one for replacing #2017-02-1908:57andrea.crottiit's just projectile-replace the command anyway#2017-02-1908:58andrea.crottior cljr-rename-symbol which would be even smarter, but only works with .clj files#2017-02-1909:03qqq@andrea.crotti: I appreciate your effort to help me. I'm not sure we're solving the same problem. Can you briefly, in 2-3 sentences, tell me what problem you're solving?#2017-02-1909:05andrea.crottiah right I thought you needed simple symbol replacement @qqq#2017-02-1909:06andrea.crottiI think then maybe you should look at the smartparens functions#2017-02-1909:07qqqno, this is not what I want. So I have my own sorta-spec thing, where I define a number of "specs" with:
(def-spec :student ... )
(def-spec :dog ...)
(def-spec :car ...)
then, when I'm writing code, I want to be able to put my cursor over
:student
hit some key, then have it find the (def-spec student ... ) entire sexp -- and insert the entire sexp in place (this helps me write out the data with the spec in hand)
#2017-02-1909:07andrea.crottiyes ok#2017-02-1909:07qqqso if we had:
(def-spec :student [:name :age :gender])
and I had a cursor over
:student
I want to hit some key, and have (def-spec :student [:name :age :gender]) inserted inline, which I'll then fill in the parameters for.
#2017-02-1909:08qqqright now, using helm-etags-select, I can do the "jump to where this is defined part"#2017-02-1909:08andrea.crottiyou could also otherwise generate a yasnippet snippet on the fly#2017-02-1909:08qqqthe part I'm missing is changing the helm action from "jump to file/line" to (1) grab the entire sexp (2) insert the sexp#2017-02-1909:08andrea.crottiand then just use that#2017-02-1909:08qqqso the spec is not necessairly on one line, so I need a way to grab the entire symbolic expression#2017-02-1909:09qqqgeneraing yasnippet on the fly seems weird --= since "if I get the full expression for wriing the yasnippet, why not just insert it in place instead"#2017-02-1909:09andrea.crottiwell it makes it much easier to fill it in#2017-02-1909:09qqqah, true#2017-02-1909:09qqqclever 🙂#2017-02-1909:10qqqoh man, tabbing through the fields, this is insane#2017-02-1909:10andrea.crottiand I think as mentioned above you could use the smartparens functions I guess#2017-02-1909:10andrea.crottito get the sexp, it does all the parsing you need for you#2017-02-1909:10qqqno, what smarparens func#2017-02-1909:11qqqI have no smart parens under C-h f#2017-02-1909:11qqqis this a new package?#2017-02-1909:11andrea.crotti@qqq smartparens h 20170209… installed 669 Automatic insertion, wrapping and paredit-like navigation with user defined pairs.#2017-02-1909:12andrea.crotti
(defvar sp-smartparens-bindings '(
                                  ("C-M-f" . sp-forward-sexp)
                                  ("C-M-b" . sp-backward-sexp)
                                  ("C-M-d" . sp-down-sexp)
                                  ("C-M-a" . sp-backward-down-sexp)
                                  ("C-S-d" . sp-beginning-of-sexp)
                                  ("C-S-a" . sp-end-of-sexp)
                                  ("C-M-e" . sp-up-sexp)
                                  ("C-M-u" . sp-backward-up-sexp)
                                  ("C-M-n" . sp-next-sexp)
                                  ("C-M-p" . sp-previous-sexp)
                                  ("C-M-k" . sp-kill-sexp)
                                  ("C-M-w" . sp-copy-sexp)
                                  ("M-<delete>" . sp-unwrap-sexp)
                                  ("M-<backspace>" . sp-backward-unwrap-sexp)
                                  ("C-<right>" . sp-forward-slurp-sexp)
                                  ("C-<left>" . sp-forward-barf-sexp)
                                  ("C-M-<left>" . sp-backward-slurp-sexp)
                                  ("C-M-<right>" . sp-backward-barf-sexp)
                                  ("M-D" . sp-splice-sexp)
                                  ("C-M-<delete>" . sp-splice-sexp-killing-forward)
                                  ("C-M-<backspace>" . sp-splice-sexp-killing-backward)
                                  ("C-S-<backspace>" . sp-splice-sexp-killing-around)
                                  ("C-]" . sp-select-next-thing-exchange)
                                  ("C-M-]" . sp-select-next-thing)
                                  ("C-M-SPC" . sp-mark-sexp)
                                  ("M-F" . sp-forward-symbol)
                                  ("M-B" . sp-backward-symbol)
                                  )
  "Alist containing the default smartparens bindings.")
#2017-02-1909:12andrea.crottione of those should help surely#2017-02-1909:13qqqoh wait, smartparens is a package filling similar need are paredit/lispy?#2017-02-1909:13andrea.crottiyeah same thing#2017-02-1909:13qqqduh, in this case I should just use lispy (which is already installed)#2017-02-1909:13qqqthanks!#2017-02-1909:26qqqone thing that I like about evil-paredit more than evil-lispy -- is that evil-paredit when yanking/deleting, kept things balanced, evil-lispy doesn't seem to achieve this by default for me#2017-02-1909:26qqqanyone ahve advice on how the above?#2017-02-1911:16pesterhazyCheck out lispyville qqq#2017-02-1911:17pesterhazyIt does exactly that#2017-02-1911:35qqqwas not a fan of lispyville when I tried it last night#2017-02-1911:35qqq@pesterhazy: trying again now, do you perchance have a lispyvile binding which makes [ insert [] ?#2017-02-1911:35qqqthe default lispy thing is to have it move sexp left or something#2017-02-1911:35pesterhazyI'm actually using it only for the balancing-parentheses behavior#2017-02-1911:36pesterhazyI don't even enable lispy-mode#2017-02-1911:36qqqlol#2017-02-1911:36qqqevil-paredit is excellent for that#2017-02-1911:36pesterhazybalancing parentheses when using dd is such an essential feature I'm surprised it's not a default#2017-02-1911:37qqqwhat's most infuriating is that in evil mode, I can get unbalanced#2017-02-1911:37qqqthen when I try to balance: ( --> we give you blanced ()#2017-02-1911:37qqq) -> we move you to right sexp#2017-02-1911:37qqqso it stays unbalanced 🙂#2017-02-1911:37pesterhazynever happened to me?#2017-02-1911:39pesterhazyevil-paredit is an interesting pointer#2017-02-1911:39pesterhazyit's such a crowded space#2017-02-1911:39pesterhazyafaik structural editing tools have two jobs#2017-02-1911:40pesterhazy1st is to keep parens balanced by rebinding constructive (like () and destructive (like dd) actions#2017-02-1911:41pesterhazy2nd is to provide additional keybinds (or as with lispy rebind existing ones) to operate on s-exps#2017-02-1911:41pesterhazynow even pure emacs allows you to navigate and manipulate sexps to a certain extend#2017-02-1911:42pesterhazythere's mark-sexp and kill-sexp for example#2017-02-1911:42pesterhazybut to have 1 and 2 you need an additional package#2017-02-1911:43pesterhazythe main structural editing packages are paredit, smartparens and lispy#2017-02-1911:43pesterhazyunfortunately, using evil-mode makes things more complicated still#2017-02-1911:44pesterhazybecause evil supports different editing primitives (like dd) and because it has vastly different keybindings#2017-02-1911:45pesterhazydoes that sound like a correct summary?#2017-02-1911:51danielgrosseI just try to get into emacs and clojure, but stuck at using java classes. When I import e.g. java.awt and load the file in cider, a classNotFoundException is thrown. When I open the project in intellij, the classes are found. What do I have to do, that emacs or leiningen knows the classes location?#2017-02-1911:54pesterhazydoes that happen with other classes @danielgrosse ?#2017-02-1911:55pesterhazyI seem to remember that AWT is not shipped with (some packages of) the openjdk#2017-02-2004:01qqqlispy has a reall cool set of 6 demos (videos + instructions) does lispyville have anything similar? I just see a bunch of key bindings, but no idae how to chain/combo them together#2017-02-2007:44danielgrosse@pesterhazy Ah, it was a typo in the library name. 😓 As usual 😁#2017-02-2008:08pesterhazyClassic!#2017-02-2013:37danielgrosseAs I still use Intellij to write Clojure code but actually trying emacs. Is there a way to jump into java functions or clojure dependencies? Also how can I highlight errors like unknown dependencies?#2017-02-2013:39dpsuttonI can jump into clojure dependencies the same way i would navigate my own code: M-. to navigate to the thing under point and M-, to pop back to where i was#2017-02-2013:39dpsuttonI'm not sure about the java functions#2017-02-2013:51benedeksame should work for java interop too with cider#2017-02-2013:51benedekyou need a running repl and your code loaded into it afaik#2017-02-2013:52benedekhighlight errors: check out flycheck-clojure aka https://github.com/clojure-emacs/squiggly-clojure#2017-02-2100:19qqqIn emacs, I want to autocomplete
:new-vec2 ==> (q :vec2 :x :y)
:new-bbox ==> (q :bbox :x1 :x2 :y1 :y2)
:new-student ==> (q :student :name :age :gender)
this is a bit problematic because the thing I type ":new-vec2" is NOT a prefix of the completion string "(q :vec2 :x :y)" Thus, what package can I use to make this work?
#2017-02-2108:03benedekyasnippet?#2017-02-2108:03benedekyou are talking about custom templates I suppose#2017-02-2108:51qqqdoes emacs itself provide a filter cmd? I did C-h filter, but the result at top is -filter // from dash.el -- is there no emacs builtin 'filter' ?#2017-02-2110:04qqqin elisp, how do I convert vector to list?#2017-02-2111:37thegeezI have (global-set-key (kbd "C-c r") 'cider-repl-reset) in my init.el, but everytime I start up emacs the keycombo "C-c r" is bound to revert file instead. After I eval the global-set-key everything is fine again. Is there a way to make this work on startup?#2017-02-2111:50qqq@thegeez: easier solution may be to bind C-c r in clojure mode, since I believe local mode has precedence over global mode#2017-02-2111:58thegeez@qqq does that require a different set-key command or put the line in a clojure-mode.el or something like that?#2017-02-2112:03qqq@thegeez: I have something like the following:
(defun my-clojure-setup ()
...
(define-key clojure-mode-map (kbd "C-x C-e") 'lisp-eval-last-sexp))

(add-hook 'clojure-mode-hook #'my-clojure-setup))
#2017-02-2112:03thegeez@qqq great thanks, that works!#2017-02-2112:08qqq
(eq :tuple (read-from-string ":tuple"))
> nil
^^ wtf -- how do I fix this?
#2017-02-2112:16mgrbyte@qqq (eq :tuple (first (read-from-string ":tuple"))) works here#2017-02-2112:17qqq@mgrbyte: yeah, my mistake was failing to realize read-from-string returns a cons cell of ( actual content . offset ), thus the need for the first/car, which I missed; thanks!#2017-02-2113:51cmack@qqq re: emacs built-in filter, there is cl-remove-if and cl-remove-if-not#2017-02-2120:33eggsyntaxWarning for CIDER users who use cider-jack-in-clojurescript and define cider-cljs-lein-repl in a .dir-locals.el file: I just spent way too long beating my head against this bug: https://github.com/clojure-emacs/cider/issues/1938 For now, you can move cider-cljs-lein-repl into your personal config, or call it at runtime, or manually apply the patch.#2017-02-2120:34eggsyntax(or wait until the fix is merged before updating CIDER)#2017-02-2205:38qqqin lispy/lispyville, if I'm in the middle of a string, say "foo|" then when I press ", what I wnat: "foo"| what I get: "foo\"|\"" how do I tell lispy -- when I hit ", I wnat to exit string -- I don't want to insert a quote dstring ?#2017-02-2206:22brabsterHey folks, I use Emacs and my colleague uses Cursive (sorry!) - works fine but there's a few differences in the way indentation works between the two that's a pain! Is there a way to get Cursive to use the same indentation style as Emacs and apply it automatically?#2017-02-2207:00ag@brabster ehm… maybe editorconfig? both InteliJ and Emacs support it#2017-02-2215:02plexusWhat are the differences/benefits of inf-clojure over inf-lisp?#2017-02-2215:04plexus@eggsyntax thanks for reminding me to follow up on that issue. I came up with a fix but didn't submit it as a PR yet. I was hoping to get some more feedback on it since I'm not sure how good of a fix it is, but I'll open a PR that might be a quicker way to get feedback#2017-02-2215:05eggsyntax@plexus I saw that, thanks for figuring that out! It seemed like a reasonable solution to me, at least for now. Let's get that puppy into master 😉#2017-02-2215:07plexusBOOM https://github.com/clojure-emacs/cider/pull/1944 emacs cider#2017-02-2215:08plexusIn the meanwhile if anyone has a clue about what inf-clojure provides that inf-lisp doesn't I'm all ears. I've been telling people "it's better because it's Clojure specific" but no idea what that actually implies.#2017-02-2215:09plexusthe only thing I can think of is that it knows about metadata and reader forms so it sends things as ^:foo [:bar] or #.foo.Bar [:baz] as a single form#2017-02-2222:13qqqis anyone running into gc issues with emacs? it seems that someitmes, after an emacs session has been running for 2-3 days, it starts becoming laggy for ABSOLUTELY NO REASON -- i.e. when I'm ediitng an org snippet that is < 100 lines long#2017-02-2222:16dpsuttonare you on windows?#2017-02-2222:17dpsuttoni'm seeing something similar in my version of emacs that's been open for a few days#2017-02-2222:17qqqI'm on OSX#2017-02-2222:18qqqI don't know if it's (1) an org mode special edit thing (2) a lispy thing [unlikely, as editing plain *.cljs files tend to not lag] or (3) a emacs-has-been-running-too-long thing#2017-02-2222:18dpsuttoni notice it on windows but not my fedora box at home#2017-02-2222:25tanzoniteblack@qqq I generally leave my emacs (in server/daemon mode) running in the background on my linux machine for weeks at a time without noticing any speed differences. Similar to my OSX expectations (except in the order of days instead of weeks as an average run time)#2017-02-2300:01mattly@qqq I'm seeing the same thing recently, also on OSX#2017-02-2300:04ag@qqq @mattly do you guys think it could be related to semantinc?#2017-02-2300:10mattlyi've no idea what that is. did you typo that from semantic as in semantic-mode ?#2017-02-2300:11mattlyI use emacs pretty much for spacemacs#2017-02-2300:19qqq@mattly @ag: posisbly not, I'm not running semantics (I'm not running spacemacs either)#2017-02-2300:20ag@qqq semantic is built-in#2017-02-2300:20qqqI suspect, based solely on my most recent changes, to be somethign involving: lispy, lispyville, clojure, and anything else for manipulating sexps#2017-02-2300:20qqq@ag: my bad, thought it was a package, and didn't see it under C-h m#2017-02-2300:21agI think it’s a built-in package#2017-02-2300:21mattlymy setup hasn't changed in quite a while#2017-02-2300:21mattlysemantic is built-in, yes#2017-02-2311:59andrea.crottislightly unrelated but anyone writing and sending emails with org-mode / emacs?#2017-02-2312:00andrea.crottiI saw a few links with various options but nothing too exciting#2017-02-2313:46andrea.crottiwell @piotr2b that just looks like a problem in your gpg-agent.conf file to me#2017-02-2314:18andrea.crottiwell I think one issue could be that it tries to connect via console and not the gtk version of pinentry @piotr2b#2017-02-2314:18andrea.crottior something like that#2017-02-2314:18andrea.crottiI had that problem before with crypted files I think#2017-02-2314:33piotr-yuxuannot sure cuz actually every time I sign commits I get a “pop-in-like stuff” in the terminal.#2017-02-2321:11chadhs@brabster yes +1 for editorconfig, works great#2017-02-2321:12chadhsif on mac brew install editorconfig#2017-02-2321:14chadhshere’s an example editorconfig file: https://github.com/chadhs/dotfiles/blob/master/editors/editorconfig#2017-02-2321:14chadhssetup is pretty straightforward in emacs then. search for “editorconfig” in your browser here for an example https://github.com/chadhs/dotfiles/blob/master/editors/emacs-config.org#2017-02-2321:15brabsterThanks for info @chadhs !#2017-02-2321:15chadhsyou bet!#2017-02-2321:17chadhsone last recommendation.... if you place a .editorconfig file in your homedir that will serve as your “defaults” (unfortunately that’s not clear from the docs). any editorconfig file that you put in the root of a project will take precedence so you and your partner in crime can put your agreed upon standards for each project there (that is explained in the docs fairly well).#2017-02-2321:17chadhscheers.#2017-02-2321:26qqqanyone having problems of lispy+agressive indent mode struggling on files that are > 500 loc?#2017-02-2321:26qqqI'm wondering if it's some indent issue being processed on every keystroke#2017-02-2323:21jfntn@qqq yes that’s the issue, I’ve used this to work around it: https://github.com/julienfantin/.emacs.d/blob/master/config/config-indentation.el#L95#2017-02-2323:21jfntnJust realized the docstring for the predicate is wrong though...#2017-02-2502:26richiardiandreais there a way to tell paredit to slurp/navigate including . as well? This is especially good when using js/process.env syntax in cljs#2017-02-2503:49richiardiandreauhm I think the main buffer does it, the inf-clojure buffer does not, but I can live with that#2017-02-2509:31qqqin lispy/lispyville, is there anyway to exit a string?#2017-02-2509:31qqqit's frustraing typing "foo being in a state of "foo|" but then having to hit esc, l, a to move to the next part#2017-02-2519:00richiardiandrea[XP #cljs-node] has anybody here already created (and needs contributors) or thinking of creating a lumo mode for emacs?#2017-02-2522:45jfntn@richiardiandrea if you use inf-clojure can’t you just (setq inf-clojure-program “lumo”)?#2017-02-2522:46richiardiandrea@jfntn yes, but this is not enough, for example there is no completion. I have come up with a mode anyways 😄#2017-02-2522:48richiardiandrea@bozhidar I was wondering if I can add this minor mode to the emacs-clojure org and in general what you think about it#2017-02-2522:48jfntn@richiardiandrea how does completion work with node?#2017-02-2522:49richiardiandreathere is a function that does it in lumo#2017-02-2522:49richiardiandreait can be improved of course, for example I don't think it completes something. atm#2017-02-2522:55jfntnI think you should be able to set inf-clojure-completion-command?#2017-02-2523:09richiardiandreayes and I am doing it exactly in my lumo-mode 😄#2017-02-2523:10richiardiandreabut this is not returning anything for instance (lumo.repl/get-completions "lumo.repl/")#2017-02-2602:47qqqin lispy, when I have cursor right in front of a (#2017-02-2602:47qqqhow do I say "delete the sexp that immediately follows the cursor" ?#2017-02-2610:48qqqI have the weirdest error: in eshell, it can't find ~/.local/bin/boot -- even though that directory is in exec-path and in ENV/PATH#2017-02-2809:57hlolliTrying to kill backwards in same paredit manner as I kill forward, but it's too aggressive, my attempt is here
(defun backward-kill-line (arg)
  "Kill ARG lines backward."
  (interactive "p")
  (paredit-kill (- 1 arg)))

(define-key paredit-mode-map (kbd "C-S-k") 'backward-kill-line)
anyone that kills backwards that has a function to share?
#2017-02-2815:25gregnwosuis there a minor mode that can autocomplete for hiccup?#2017-02-2817:43richiardiandreahas anybody tried company-mode for completion in inf-clojure?#2017-03-0114:26qqqI have two points. Is there a way to say "get the region between these two points as a string" ?#2017-03-0114:27dpsuttonwhat package are you using to have two points?#2017-03-0114:31qqq(save-recursion .... some action ... (point))#2017-03-0114:31qqqsorry, maybe I should have used phrase "two locations" I only have 1 point#2017-03-0114:31qqqso I want the string between (save-recursion ... body ... (point)) and (point)#2017-03-0114:31qqqsave-excursion#2017-03-0115:18dpsuttonthere's marker and point#2017-03-0115:19dpsuttonwhich is probably what you want#2017-03-0115:19dpsuttonin emacs slang called the region#2017-03-0115:19dpsutton(buffer-substring-no-properties (marker) (point))#2017-03-0210:20qqqI have an rsync command which rsyncs a LOCAL DIR to a REMOTE-DIR now, whenver I save a file in LOCALDIR, I want this rsync command to run#2017-03-0210:20qqqis there a way, either throgh emacs or rsync to keep this going?#2017-03-0210:27pesterhazyyou can use dirwatch or similar along with rsync#2017-03-0210:42qqqis dirwatch better than inotify?#2017-03-0210:42qqqgoogle/so just says : use
while inotify .... options
  rsync
done
#2017-03-0210:42pesterhazyyeah that seems fair#2017-03-0210:42pesterhazyonly works on linux though#2017-03-0210:42qqqand osx too I hope#2017-03-0210:43qqqI now have this weird problem: when I'm ssh-ed into a remote machine (via eshell/tramp), it can't find boot 😞#2017-03-0210:45qqqokay, I have a new problem#2017-03-0210:45qqqafter firing up a eshell, how do I send commands to taht eshell? (let ((default-directory ...)) (eshell)) is caushing problems for me#2017-03-0210:46qqqso now I want to do
(eshell)
(exec-cd in eshell)
but eshell-command apparently deosn't do that
#2017-03-0211:01qqqit seems that whem I'm using cd /ssh:/cdn-cgi/l/email-protection:/... all my path / env are broken, reflecting the host machine, not the remote machine#2017-03-0213:27qqqin elisp, is there a function for killing a process without a y-n onfirmation ?#2017-03-0214:12mgrbyte@qqq https://www.gnu.org/software/emacs/manual/html_node/elisp/Signals-to-Processes.html#2017-03-0214:15qqqI think my problem was that these processes were attached to buffers#2017-03-0214:15qqqand thus when I tried to kill them, the buffer got unhappy#2017-03-0214:15qqqso the solution turned out to be (1) set buffer of process to nil, and (2) then kill the process#2017-03-0221:12qqqSymptom: 1) I have a Org Special Edit buffer. 2) When I try to kill the buffer, I get a "wrong type argument: stringp, nil" -- and I CAN"T KILL THE BUFFER. How to reproduce this: 1) Open a file in buffer X 2) Enter a org-special-edit of a source code block of X (call this new buffer Y) 3) switch to buffer X 4) kill buffer X 5) now, try to kill buffer Y ==> error of "Wrong type argument: stringp, nil" Somehow, if I kill the "root/parent" org-buffer, then I can no longer delete the org-special-edit "child" buffer#2017-03-0221:23qqqokay, got it working, it was kill-buffer-hook that was preventing the buffer from being killed#2017-03-0223:40qqq=========== now that I turned off agressive indent mode, is there a elisp builtin for "indent this entire buffer" ?#2017-03-0223:40qqqI can only find commands for indenting last sexp; I'm using evil + lispy + lispyville#2017-03-0300:20qqq@dpsutton: interesting, thanks#2017-03-0300:20qqqI ended up using this: (indent-region (point-min) (point-max))#2017-03-0300:26dpsuttonCheck to see if indent region can be invokef without an arg#2017-03-0300:29qqqwhy?#2017-03-0300:32dpsuttonIt may default to the whole buffer#2017-03-0300:34dpsuttonLooks like it doesn't#2017-03-0300:34dpsuttonRequires the ARGS#2017-03-0310:19qqqis there an projectile-imenu ?#2017-03-0310:19qqqI'm looking for somethign like imenu, but imenu-anywehre only hits open buffers; whereas I want to hit all files under projectile#2017-03-0311:26lepistanehi#2017-03-0311:26lepistanei've got problem#2017-03-0311:26lepistanewith emacs#2017-03-0311:27lepistaneso i used brave and true setup#2017-03-0311:27lepistaneand i wanted to update cider#2017-03-0311:27lepistanebut it asked for 24.4 version#2017-03-0311:27lepistanei installed it using http://ubuntuhandbook.org/index.php/2014/10/emacs-24-4-released-install-in-ubuntu-14-04/#2017-03-0311:27lepistanethat tutorial#2017-03-0311:27lepistaneand now funny things happen#2017-03-0311:28lepistane1. i couldnt install new cider so i found https://github.com/flyingmachine/emacs-for-clojure/ and used that to update it but i cant run it now#2017-03-0311:28lepistanesymbol's function definition is void : clojure-project-dir#2017-03-0311:31lepistanei cant sudo apt-get remove emacs (because i already did that) but i still can use emacs 24.4?? i've deleted 24.3 ver using ubuntu software center before trying to install 24.4 how do i just reset everything and start again or just fix this?#2017-03-0313:14munen@lepistane The install instructions from Brave and True are for a very old version of Cider. Better to ignore them. (Other than that, everything else in the book is very true, so no worries^^)#2017-03-0313:15munenSince you just started out, it might be best to wipe your current emacs config completely.#2017-03-0313:15munenrm -rf ~/.emacs.d/#2017-03-0313:15munenThen make sure you have a current (>= 24.4) version of Emacs. For example I have:
emacs --version
GNU Emacs 24.5.1
#2017-03-0313:17munenThen follow the official cider install instructions: https://github.com/clojure-emacs/cider#installation#2017-03-0313:18munenBasically: Ignore the Cider Install instructions from Brave and True and go for the official doc. Everything else in that books is current, though.#2017-03-0313:18munenGood luck and enjoy your journey into Emacs and Clojure wonderland^^#2017-03-0313:19dpsuttonif you're looking for an up and running emacs setup with no fuss that is rock solid, check out prelude, from the same maintainer as CIDER. https://github.com/bbatsov/prelude#2017-03-0313:29qqq@lepistane: if you want to be entertained, there was a chat here in #emacs a few weeks ago where someone (@dpsutton)? and I walked someone through un-insatlling brave+true#2017-03-0313:30dpsuttonyeah that was us#2017-03-0313:31dpsuttonit has compiled elisp files from cider 0.8.2 or so. also, it told you to install a lein profile file#2017-03-0313:31dpsuttonyou should remove that file#2017-03-0313:32dpsuttonCIDER used to require you to set its dependencies but now it injects them itself. so that file will actually stipulate a mismatch of CIDER 0.15 (current on melpa) vs 0.8.2 which is from 2014#2017-03-0313:33qqqwe need a bot here that maps "brave.*and.*true" to "rm -rf ~/.emacs.d ~/.lein ~/.boot"#2017-03-0315:45sineer@doglooksgood Thank you very much for your amazing Parinfer Mode!! I feel I must give a shout out to your project because I just started using it a few days ago and already I'm saving tons of time (and sanity) dealing with parens! I feel like I don't have to pay the parens tax todo lisp/clojure anymore, it is very liberating 🙂#2017-03-0315:46sineerIn case anyone don't know about this like I didn't a week ago check it out here: https://github.com/DogLooksGood/parinfer-mode#2017-03-0316:33lepistaneclean 24.4 installed m-x package-install cider - no match#2017-03-0316:33lepistanem-x package-refresh-contents - does it's thing and still same#2017-03-0316:38dpsuttoncan you tell us what package sources you have?#2017-03-0316:38dpsuttonif you don't have melpa you won't see it#2017-03-0316:39dpsutton
(add-to-list 'package-archives
             '("melpa" . ""))
#2017-03-0316:40lepistanei dont even have init.el file#2017-03-0316:40lepistaneshould i make one?#2017-03-0316:40lepistanejust like gedit ~/.emacs.d/init.el then add those lines and save?#2017-03-0316:40dpsuttonif you want to "remember things"#2017-03-0316:40dpsuttoni think you should use a prebuilt one though#2017-03-0316:40dpsuttonhttps://github.com/bbatsov/prelude#2017-03-0316:41lepistaneye i think you are right i am complete beginner in emacs/linux/clojure#2017-03-0316:41dpsuttonthe one i linked has a install sccript#2017-03-0316:41dpsuttonis made by the author of CIDER#2017-03-0316:42dpsuttonand is quite nice#2017-03-0316:42dpsuttonyeah you don't want to fight stuff and figure out your own init right now#2017-03-0316:49lepistaneholy moly finally xD#2017-03-0316:49lepistanethanks a lot!!!#2017-03-0316:50lepistaneprelude looks nice theme is cool 😄#2017-03-0316:50dpsuttonit's my setup#2017-03-0316:50lepistaneone questions i dont have suggestions in minibuffer when i type m-x is that some kind of plug in or?#2017-03-0316:50dpsuttonand it works#2017-03-0316:50dpsuttonyeah. look into helm#2017-03-0316:51dpsuttonhttps://github.com/bbatsov/prelude#helm#2017-03-0317:04lepistanei have no idea how to turn it on#2017-03-0317:04lepistaneit is included in prelude#2017-03-0317:06dpsuttonthe first sentence > Helm is setup according to this guide: A Package in a league of its own: Helm.#2017-03-0317:06dpsuttonbut you'll need to know a few precursors#2017-03-0317:06dpsuttonso you'll want a file to keep your own stuff and customizations in#2017-03-0317:06dpsuttonand for prelude, that file lives at ~/emacs.d/personal/personal.el#2017-03-0317:07dpsuttonand that's where you can set all of your config stuff#2017-03-0317:09dpsutton
(require 'helm-config)
(helm-mode 1)
#2017-03-0317:11dpsutton(global-set-key (kbd "M-x") 'helm-M-x)#2017-03-0317:11dpsuttonyou'll probably want all of those#2017-03-0317:12dpsuttonand then there are ones that set helm for buffer list and other things#2017-03-0318:01richiardiandreais there are way to see what comint-mode is sending to its buffer ?#2017-03-0319:21hlolliI think some modes bypass comnit-mode commands and send commands straight to the tty stdin from the generated process. At least I did that when I made a major mode recently.#2017-03-0320:01richiardiandrea@hlolli I am running inf-clojure and I would like to debug what is being sent because there is a bug somewhere#2017-03-0320:05hlolli@richiardiandrea I know 🙂 I've manually turned off many inf-clojure features.#2017-03-0320:06hlolliyou said you were working on lumo mode for emacs, how's that going?#2017-03-0320:08richiardiandreaI have a PR going @hlolli it requires some change but it works locally pretty well#2017-03-0320:09hlolliyou have a git for me to try 😛#2017-03-0320:17richiardiandreahttps://github.com/arichiardi/inf-clojure/tree/lumo-and-flavors?files=1 @hlolli #2017-03-0320:21hlollinice#2017-03-0321:19qqqanyone else unable to install magit due to: https://melpa.org/packages/magic-20170228.1717.tar : Not found ?#2017-03-0321:42tanzoniteblack@qqq generally that happens if your melpa package list is out of date. package-refresh-contents should cause it to try to download the most recent version (and melpa only seems to keep the most recent versions)#2017-03-0321:43tanzoniteblackat least, that's when errors like that have happened to me before, yours could be entirely unrelated 🙂#2017-03-0321:46qqqI just did a rm -rf elpa, and it worked after that#2017-03-0321:46qqqbut I do think you're right, in taht melpa only keeps latest right? so if I had something pinnned to an out dated version, I can no longer retrieve it#2017-03-0321:49tanzoniteblackI've also seen it do that when you try to run package-install without having refreshed the package list in a little while, it tries to grab the specific version that it last knew about#2017-03-0321:51qqqso I have a line in my .emacs.d that says:
(unless package-archive-contents
  (package-refresh-contents))
given how infrequently I restart emacs, should I jiust chagne it to:
(package-refresh-contents)
the only downside is that i tmakes a download every time I start emacs right?
#2017-03-0321:52tanzoniteblackNah, you shouldn't need to do that. Generally the cases where your package-archive-contents are null are the majority cases where you want to download and install a package#2017-03-0321:53tanzoniteblackso that line's still fine in your config; just remember that if you're trying to install a new package, to make sure to run package-refresh-contents first (or just if you see that error...then run it and try running the install command again)#2017-03-0322:38qqqhow can I tell use-package to load packages eaagerly?#2017-03-0322:38qqqI want to use the package only for the sake of organizing configs, not for lazy loading#2017-03-0322:40dpsuttonhttps://github.com/jwiegley/use-package#notes-about-lazy-loading#2017-03-0322:41qqqlooks like the solution si simply ":demand" ?#2017-03-0322:41dpsuttonthat's what i'm reading#2017-03-0322:42dpsuttonhttps://github.com/jwiegley/use-package/commit/5954ad37cf2d3c9237f4d2037e8619be15681cd1#2017-03-0322:42dpsuttonthat's exactly what you want there#2017-03-0322:42dpsuttonsomeone had the same idea as you#2017-03-0323:00qqqI now have the worst bug ever; I'm not sure what change caused it, but right now, when I select somethign in helm, there's an oticable lag, like a 1sec lag before it opens the file I selected#2017-03-0323:00qqqI have no idea how to even begin debugging this 😞#2017-03-0401:15qqqso I'm cleaning up all of my .emacs.d/init.el -- and one thing I'k not happy with is my usef of etags to pull out all defs in src/... -- is there a better solution, i.e. somehow combining imenu and projectile ?#2017-03-0401:49qqqthis is 100% first world problem: I have 3 monitors. when I pop up a new emacs frame, is there anyway to ocntrol which monitor the frame pops up on?#2017-03-0410:15qqqright now, emacs auto indent wants to do:
(let [...]
  ;; ...
)
(note the two spaces) now, I want emacs auto indent to do:
(let [...}
;; ...
}
(note how it's flush with the start of the line) any idea what option this is?
#2017-03-0410:20hlolli@qqq you can check out this custom config from weavejester https://github.com/weavejester/dotfiles/blob/master/emacs.d/init.el#L227 he customizes the indentation heavily, not sure about the comments.#2017-03-0411:14qqq@hlolli : didn't find what I want there -- but there are some gold nuggets there -- it's always fasicnating reading people's key bindings and guessing how they program
#2017-03-0411:14qqqit's like "under what circumstances does this become such a frequent op that we want such a short binding for it" ?#2017-03-0416:13richiardiandreaHow switch point from beginning to end of sexp (out of the parent) in paredit?#2017-03-0416:23richiardiandreaYeah I think a small function would do 😀#2017-03-0417:05hlolliit's <C-M f> on default I think, but my fingers are too stiff for such a flexible command.#2017-03-0417:39richiardiandreaSome people have it on C-M-right, I was reading.. 😀 inf-clojure now positions the cursor at the beginning, but C-c C-n evaluates the last sexp #2017-03-0417:40richiardiandreaThere is an issue for that, it would probably make sense to position point at the end of the first top level form#2017-03-0418:08dpsuttoni've looked into the indentation of ; before, how it goes to the end of the line. this seems to be hard coded into emacs and there's no getting around it as far as i can tell#2017-03-0418:08dpsuttonmy guess would be that ;; is similar#2017-03-0419:50lvhCan I use clj-refactor to rename a namespace alias?#2017-03-0419:51lvh(rename-symbol isn’t it, apparently.)#2017-03-0609:43benedekdon’t think so @lvh. if you want to do that in the current ns (not globally) a regex search and replace should do the trick ?!#2017-03-0614:13qqqin emacs, what is the easiest way to open all files in src/ ? the goal here is to use imenu-in-all-buffers ... well, in this case I better have all of src/ open#2017-03-0614:44mgrbyte@qqq C-x C-f src/* i think#2017-03-0614:45mgrbyteor https://emacs.stackexchange.com/questions/613/recursively-open-files-matching-regexp-in-marked-directories if you meant recursively#2017-03-0615:39qqq@mgrbyte: yeah, meant recursively (I should have clarified; sorry!) -- ended up writing a *.el file to do just that#2017-03-0617:19lepistaneany tutorials on how to setup emacs settings for clojure? prelude is not an option#2017-03-0617:26mping@lepistane that is one of the few blog posts I have 😄 https://mping.github.io https://mping.github.io/2015/11/17/clojure-emacs-cider.html#2017-03-0617:27dpsuttonjust out of curiosity, why is prelude not an option?#2017-03-0617:27dpsuttonbut setting up emacs for clojure should be straightforward#2017-03-0617:27dpsuttonmake sure melpa or melpa stable is enabled#2017-03-0617:27dpsuttoninstall CIDER#2017-03-0617:28dpsutton@lepistane don't follow the guide that @mping put when it talks about putting nrepl in your lein profile file#2017-03-0617:29mping@dpsutton please kindly explain and I will update the blog, Im a clojure n00b#2017-03-0617:29mpingthat blog post was picked from multiple posts, so I’m sure its not a best practice#2017-03-0617:30dpsuttonCIDER used to require you to keep its dependencies in your lein profiles. But CIDER and cider-nrepl have the same version numbers so its easy to keep them in sync. You are putting a hardcoded 0.10-snapshot but CIDER is 0.14.0 on melpa stable and 0.15 on melpa#2017-03-0617:30dpsuttonso you are explicitly stating a discrepancy#2017-03-0617:31dpsuttonbut CIDER now injects its dependencies so stating them is no longer required, but only serves to explicitly mismatch the frontend (CIDER) from the backend (cider-nrepl)#2017-03-0617:32dpsuttonhttps://cider.readthedocs.io/en/latest/installation/#2017-03-0617:36mping@dpsutton thanks, will update 😄#2017-03-0617:38dpsuttonexcellent#2017-03-0617:38dpsuttonthanks for the guide helping newbies! the easier to get up and running the better#2017-03-0618:31lepistane@dpsutton hi because prelude has too much stuff in it i cant catch up if you ever used setup from Brave and True it is really small. i tried updating cider using that setup but i am getting an error like "symbol's function body is null" or something like that i dont want things in i just want Brave and True setup with new cider that doesnt give me errors#2017-03-0618:58dpsuttonre the errors @lepistane do you mean you got errors updating with the brave clojure setup?#2017-03-0618:58dpsuttoni've seen those errors and the best idea i have is that the brave setup does something fundamentally bad#2017-03-0618:58dpsuttonit's using a version of cider from 2014 and it includes the compiled elisp code in addition to the source code#2017-03-0618:59dpsuttonmy best guess so far is that emacs has changed the compiled code of lambdas and this is breaking it#2017-03-0618:59dpsuttoni'm not a big fan of it for that reason and for others (manually keeping a dependency at 0.8.2) so that when you jack in you get front-end backend mismatches#2017-03-0618:59dpsuttonmy best suggestion is to totally drop the brave clojure estup and install prelude from scratch#2017-03-0619:00dpsuttonbarring that, i would start totally fresh and pick and choose which parts of the brave setup you want to keep but do not install it#2017-03-0619:01lepistanei understand#2017-03-0619:03dpsuttonbut if you need any help there's this channel and also #cider#2017-03-0619:20lepistanelet me ask you this. when i install package do i need to do anything else to 'turn it on' ??#2017-03-0619:21lepistanefor instance smex#2017-03-0619:21lepistanei like that i installed it#2017-03-0619:21lepistanebut do i have to add#2017-03-0619:21lepistanehttps://github.com/nonsequitur/smex/blob/master/README.markdown from this page?#2017-03-0619:22dpsuttoni'm in a meeting right now#2017-03-0619:22dpsutton45 minutes?#2017-03-0619:24lepistanesorry to bother you. i will be here#2017-03-0619:26tanzoniteblack@lepistane it greatly depends on what the package is (and sometimes on how you installed it). Often times packages that provide major modes for files (like clojure-mode, or rust-mode) will automatically set up a hook to turn themselves on when you open a file with a specific file name ending.#2017-03-0619:26tanzoniteblackMany packages that are "on all the time", like smex, or other packages that provide enhancements to emacs as a whole, generally require you to enable them in some way.#2017-03-0619:28dpsuttonno bother at all#2017-03-0619:28dpsuttonjust didn't want to leave you hanging 🙂#2017-03-0619:29lepistanei appreciate it#2017-03-0620:20dpsutton@lepistane how's the CIDER installation going? I'm back at a computer#2017-03-0621:08richiardiandreaFun days! inf-clojure now support REPL type for extensibility and Lumo! If you have some time, test and bug me with bugs emacs https://github.com/clojure-emacs/inf-clojure/pull/44#2017-03-0621:18lepistane@dpsutton took this blog https://coderwall.com/p/53bfpg/for-beginners-get-emacs-with-clojure-up-and-running and started installing things dont know how to turn on smex and idomenu#2017-03-0621:20dpsuttonhttps://www.emacswiki.org/emacs/Smex#2017-03-0621:20dpsuttonlooks like this is all you need (global-set-key (kbd "M-x") 'smex)#2017-03-0621:21lepistaneye i figured that but not sure in which file i write that i dont have init.el like i had with Brave and true setup#2017-03-0621:22dpsuttonthat guide has you make one#2017-03-0621:22dpsutton
Configuring Emacs

C-x C-f ~/.emacs <br/>
Welcome to the world of elisp! After you've survived that shock, let's get started!<br/>
Ok, first, place this at the end of the file:
#2017-03-0621:22dpsuttonC-x C-f ~/.emacs will create that file for you#2017-03-0621:22dpsuttonthat's what that is saying#2017-03-0621:22dpsuttonand when you only have a single file it creates it at ~/.emacs#2017-03-0621:23dpsuttonif its a directory it makes ~/.emacs.d/#2017-03-0621:24lepistaneoki lets see#2017-03-0621:46lepistanei made that file and put https://gist.github.com/zilti/6083155 into ;;your code goes here#2017-03-0621:46dpsutton👍#2017-03-0621:46lepistaneWarning (initialization): An error occurred while loading `/home/marko/.emacs': Symbol's value as variable is void: defun To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace.#2017-03-0621:48dpsuttonno idea#2017-03-0621:48dpsuttondefun is for sure defined#2017-03-0621:49dpsuttonhave you installed ido?#2017-03-0621:50dpsuttoncan you do the (require 'ido)#2017-03-0621:50lepistaneyes#2017-03-0621:50lepistanei didnt have it now i installed it#2017-03-0621:50lepistanesame thing#2017-03-0621:50dpsuttoncan you post your emacs file?#2017-03-0621:50lepistanei will go through the list once again#2017-03-0621:50lepistanethank you very much for being patient with me#2017-03-0621:51dpsuttonno prob#2017-03-0621:52dpsuttonah, well, you put defun outside of parens#2017-03-0621:52dpsutton(defun function (params) ...)#2017-03-0621:53dpsuttondefun my-init () is just not well formed#2017-03-0621:54lepistaneye i fixed it got error pretty-mode-plus not there - i cant find it on melpa#2017-03-0621:54lepistaneshould i just comment that line?#2017-03-0621:54dpsuttonwell, it sounds like you are using someone else's init?#2017-03-0621:54dpsuttoni thought that's why you didn't want to use prelude#2017-03-0621:55dpsuttoni don't know what pretty mode plus is#2017-03-0621:55lepistanei understand#2017-03-0621:55lepistaneprelude was too much for me i couldnt handle so much#2017-03-0621:55lepistaneso i found smallest tutorial#2017-03-0621:55lepistanejust to get how what and where#2017-03-0621:56lepistanebasically i'd have to do the same with prelude#2017-03-0621:56dpsuttonfair enough#2017-03-0621:56lepistaneevery package i install i should put in ~/.emacs.d/personel/personal.el#2017-03-0621:56dpsuttoni don't know what pretty mode plus is#2017-03-0621:56lepistanejust as u said yesterday#2017-03-0621:56lepistaneright?#2017-03-0621:56dpsuttonpackage?#2017-03-0621:56dpsuttonbut you don't have a directory#2017-03-0621:56dpsuttonso i'm not sure what happens there#2017-03-0621:56dpsuttonyou have a single file at ~/.emacs, right?#2017-03-0621:56lepistaneyes yes#2017-03-0621:57dpsuttoni don't know where they get installed when you don't have an emacs directory#2017-03-0621:57lepistanei was talking about if i were to use prelude steps would be the same. i'd just put these things (hooks and all that) into personel.el file just like you said yesterday#2017-03-0621:57dpsuttonah yes. all of your modifications would go into personal.el#2017-03-0621:59lepistaneye ye so this was easier to grasp than prelude right away. i am absolute beginner so it takes time. Thank you for being patient with me#2017-03-0621:59dpsuttonno problem#2017-03-0622:09lepistanequestion on the side. when i delete emacs.d i get fresh new emacs i dont have to sudo apt-get remove emacs or purge or anyting like that?#2017-03-0622:13dpsuttonthe emacs config directory (~/.emacs) does not modify the binary you install#2017-03-0622:13dpsuttonwhen emacs starts up, it looks at your emacs config file or directory to know what to do and what to look like#2017-03-0622:13dpsuttonso yes deleting the config directory is sufficient#2017-03-0622:15lepistanei failed to make init work but i learned a lot i will setup prelude now thank you so much thank you for taking time out of your day to help me#2017-03-0622:15dpsuttonof course#2017-03-0622:15dpsuttoni think the benefit of prelude is that a) it works b) there's lots of customizations that you can follow#2017-03-0622:15dpsuttonso you can see what it looks like and modify it from there#2017-03-0709:52danielgrosseMaybe you could help me with an keyboard issue. I use emacs in iterm2, but know I registered the lack of the super key. A google search brought no help, how to enable the super key in iterm. When I now use emacs directly, I have the super key, but my right alt key is bound to Meta, and as I use a German Layout, i'm not able to type important keys like {}[] . I tried (setq nr-right-alternate-modifier nil) but this didn't work. How could I disable the right alternate key, or enabel the super key in iterm?#2017-03-0709:53danielgrosseOkay, I found (setq mac-right-option-modifier nil) to disable the alt key, so this problem is solved. But is it possible to map the super key in iterm? As this would be my preffered solution#2017-03-0904:46qqqis cedet/semantic bit-rotten ? (webpage shows latest update from 2011) or is it still maintained?#2017-03-0910:17qqqsometimes, when I try to undo with "u" in evil + evil-lispy + lispyville, eamcs just freezes up ; I can't greak out with C-g, and I have to kill -9 it from another terminal#2017-03-0910:17qqqdoes this happen to anyone else?#2017-03-0912:02chrisblomoccasionally when using helm commands my minibuffer will get stuck#2017-03-0912:02chrisblomi can use the other windows fine, but the minibuffer will keep showing the helm commands#2017-03-0912:03chrisblomi then need to switch to the minibuffer with the mouse and close the active command with C-g#2017-03-0912:04chrisblomis there a way to avoid this, or, else to switch to the minibuffer using some command?#2017-03-0921:13jeffh-fphey I'm running a Prelude-based emacs and I just installed clj-refactor. It seems to want C-c C-m but somehow my C-m is mapped to RET. How do I find what/where my C-m got remapped so I can run the clj-refactor command properly?#2017-03-0922:46qqqI think the standard emacs way is to just overwrite the binding, not (1) find where it was defined and (2) change that location.#2017-03-1001:19qqqace-jump / avy are amazing#2017-03-1002:52richiardiandreaHello folks, this is not strictly an emacs thing, but a lot of times I want to see my commit messages (in the shell), say for using fixup, and based on the message, store it's sha for later use. Is there a way to navigate a git log --one-line command and fetch the sha? I was thinking of writing an emacs minor mode or an helm module. This part is really breaking the flow because I use the mouse (yes the mouse!) for copying the sha at the moment#2017-03-1003:17rmuslimov@richiardiandrea is magit-log (`l l` in magit status buffer) is what you looking for?#2017-03-1003:18richiardiandreaAh! I knew I was missing out some magit functionality, I am using it, just never thought to try there 😀#2017-03-1004:25rmuslimovyou may find this extension useful: https://github.com/rmuslimov/browse-at-remote. Allows user get direct links to github/bitbucket/gitlab from emacs buffer, support magit-log, vc-annotate#2017-03-1005:11qqqanyone here using org-podomoro? if so, is there a way to get the clock to refresh every second? I want a countdown from 25 minutes showing me how much time I have left#2017-03-1016:12jeffh-fp@qqq I got it going, thanks for the tip#2017-03-1018:31ag@qqq I use org-pomodoro. But don’t you think that countdown would be awfully distracting? Also I found that having the clock only in active window is not enough for me. Since I’m on OS X, using Hammerspoon I add an item to the system menubar, red if pomodoro is active, green - if it’s a break#2017-03-1021:59johnny.martinGot a few warnings when I tried to install clojure mode from melpa. Any ideas?#2017-03-1021:59johnny.martin`Compiling file /home/jmartin/.emacs.d/elpa/clojure-mode-5.6.1/clojure-mode.el at Fri Mar 10 13:33:08 2017 clojure-mode.el:455:1:Warning: Unused lexical argument `args' clojure-mode.el:455:1:Warning: Unused lexical argument `orig-fun' In clojure--replace-let-bindings-and-indent: clojure-mode.el:459:25:Warning: reference to free variable `clojure--let-regexp' clojure-mode.el:1817:1:Warning: Unused lexical variable `beg' clojure-mode.el:2262:1:Warning: Unused lexical variable `k' clojure-mode.el:2281:1:Warning: Unused lexical variable `k' In end of data: clojure-mode.el:2355:1:Warning: the function `in-string-p' is not known to be defined.`#2017-03-1022:00dpsuttonI think those are unworrysome#2017-03-1022:00johnny.martinok. thx.#2017-03-1022:00dpsuttonthe unused warning is certainly superfluous#2017-03-1022:00dpsuttonin-string-p must come from some package that gets loaded later#2017-03-1022:01dpsuttonthat comes from thingatpt.el#2017-03-1022:02johnny.martinoh wow...thing at point... curious. Thanks again!#2017-03-1022:04dpsuttonwow, gross, emacs#2017-03-1022:05dpsuttondon't use in-string-p, but rather use (nth 3 (syntax-ppss))#2017-03-1023:29qqq@ag (re org pomodoro countdown) -- I dunno, hard to say without testing it out; but I think the 'time pressure' would make it more fun 🙂#2017-03-1100:02qqqin emacs org mode, it appears that for each tangle block, emacs opens the file, appends the block, then closes the file#2017-03-1100:02qqqinstead, I'd prefer that emacs looks at all my blocks, finds all blocks that goes to a single file -- and writes that file in a single swoop#2017-03-1102:55meta-metaanyone here familiar with building emacs from source for windows?#2017-03-1103:56qqqthis is kind of crazy, what if, in evil mode, h/l moved by words instead of chars#2017-03-1103:57qqqhow do I fiz parts of a word? I don't I just cw and rewrite the word#2017-03-1104:57qqq
(define-key lispy-mode-map-lispy (kbd "\"") 'paredit-doublequotes)
(define-key evil-insert-state-map (kbd "\"") 'paredit-doublequotes)
yet, when I press ", it's still lispy-quotes, not paredit-doublequotes how do I make " bound to paredit-doublequotes instead of lispy-quotes ?
#2017-03-1107:34lepistanehow do i make it so my emacs command C-c C-f open home folder instead of downloads/emacs24 when i first start emacs#2017-03-1112:33dpsuttondon't think you can. It defaults to the current working directory#2017-03-1112:35dpsuttonand i guess your executable is in downloads?#2017-03-1118:07richiardiandreaConfirm it opens in pwd, that is why projectile is a fundamental piece of my emacs conf#2017-03-1118:31andrea.crottiyes with helm-projectile you never have to worry about where you are#2017-03-1118:31andrea.crottisince you can jump to any project in the same way#2017-03-1200:37qqqis there a way in evil to check for "is cursor at end of line" ?#2017-03-1203:13qqqAnyone here using avy jump to line? So it turns out the line short hands are always constant. Is there a way to keep it always displayed? Something like line numbers, but instead of displaying numbers, I want it to just always display the keycode for the avy jump command.#2017-03-1203:47qqqevil easy motion is insane#2017-03-1209:38qqqin emacs, how can I get linum-mode to display relative instead of absolute line numbers?#2017-03-1212:41qqqare there. emacs builtins for killing emacs qhitespace, i.e.
(+ (foo)

  (bar 2 3 )
  (* 2 ( * 3 5) ) )
into
(+ (foo)
  (bar 2 3)
  (+ 2 (* 3 5)))
#2017-03-1212:42qqqbasically it should (1) kill all bank white lines, (2) change all adjacent spaces to just one space, and (3) merge )'s that are on their own line#2017-03-1214:51qqqthis is sorta weird -- but is it possible in emacs, to have blocks a vertical hrule every 10 lines of buffer displayed#2017-03-1214:51qqqso I want it to look something like
`
10 lines of buffer
---- a hrule ---- displayed // but not a real line in the file
10 lines of buffer
--- another hrule ---
...
#2017-03-1214:51qqqthis is to help me with movement keys, so I can guess things like C-u 10 C-n correctly#2017-03-1216:42richiardiandrea@qqq you should collect all these questions + answers somewhere 😀#2017-03-1216:43richiardiandreaThey can be useful for folks. About the relative numbers in linum I saw some option somewhere, check either the readme or EmacsWiki#2017-03-1217:08qqq@richiardiandrea : as it turns out, you can specify a functino which linum=-mode calls on each line; unfortunately, I don't get refresh to work (i.e. strategy was : get current line, subtract it from the 'absolute count') -- unforuntatley, when I move cursor around, my current-line-count isn't refreshed#2017-03-1307:21qqqC-h f only searches for functions that are (interactive) is there a way to search for all functions?#2017-03-1307:30qqqwhere are the colors for show-parens defined / chosen ?#2017-03-1309:15munen@qqq Why do you say C-h f only searches for interactive functions? For example setq is not interactive, yet C-h f will describe it.#2017-03-1309:16qqq@munen: I just verified, C-h f does find setq. I'm definitely wrong on this.#2017-03-1309:17munen@qqq Regarding deletion of whitespace, I have something in my config: https://github.com/munen/emacs.d/blob/master/configuration.org#delete-trailing-whitespace#2017-03-1309:17munenBtw, such answers are easy to get from Emacs itself.#2017-03-1309:18munenIf I didn’t know about deletion of whitespace, I’d do a: C-h a delete whitespace and Emacs would tell me. Magic^^#2017-03-1309:18munenThat’s part of the beauty of Emacs for me. Infinite functionality and easily accessible as well as augmentable.#2017-03-1309:19qqqHmm, I'm currently only at C-h f C-h v C-h b C-h k#2017-03-1309:19munenC-h a is mighty. It does an ‘apropos’ search. Works wonders if you wonder if there’s a function that would do XXX(;#2017-03-1309:23qqqmunen: can you help me C-h a this problem?#2017-03-1309:23qqqI'm using show paren mode#2017-03-1309:24qqqI know that I can set the cursor color via (set-face-background 'show-paren-match) and (set-face-foreground 'show-paren-match)#2017-03-1309:24qqqmy question now is: can I set it so that the two cursor have different colors? (the one I'm at vs the matching paren)#2017-03-1309:25munenI’m sorry. I’m not familiar with this mode.#2017-03-1309:26munenTo match parens, I’m using evils %.#2017-03-1309:26munen(If that helps.)#2017-03-1309:26qqqdoes it auto show you when you move cursor over a (#2017-03-1309:26qqqie. when you move cursor over a (, does it highlight the correpsonding ) ?#2017-03-1309:27munenYes.#2017-03-1309:29qqqhmm, yours already has different colors#2017-03-1309:29qqqmine has the same color, i.e. both grey or both light blue#2017-03-1309:29munenThat happens automatically, btw. That’s not using %. % is for jumping between those parens.#2017-03-1309:29munenI’m using a color scheme.#2017-03-1309:29munenNot default colors.#2017-03-1309:29qqqright right, I'm familiar with emacs/evil, just not show-paren-mode#2017-03-1309:30munenIt’s the wombat theme#2017-03-1309:30munenMe, neither^^#2017-03-1309:31munenFrom the doc, it seems to duplicate functionality from evil.#2017-03-1405:25qqqis there a way to always, right above the current, display a line in light grey with the contents:
01234567890123456789012345678901234567890123456789012345678901234567890123456789
this line is not part of the buffer, but is always displayed right above the current line
#2017-03-1405:36qqqdid the key of melpa just change again? from 61:c7:72:3a:... to 22:77:d0:87: .... ? this seems like it's the third time it's changed this year, which is weird#2017-03-1407:23hkjels@qqq I believe emacs has something called overlays that can be separate from the buffer itself#2017-03-1407:23hkjelsnot sure about the specifics#2017-03-1700:00sineerAny idea why would emacs on os x stops overwriting mouse selection and paste at cursor insead?#2017-03-1700:01sineerit's not the delete-selection-mode. that is enabled and works when I type stuff it overwrites selection it doesn't work when I paste stuff anymore and drives me nuts 😞#2017-03-1701:08cmack@sineer I thought delete-selection-mode should also apply to yanking text. My first thought would be to use C-h k to find out if the keychord or mouse button you use to paste text has been rebound for something specific to the mode or something unexpected#2017-03-1701:52sineerThanks! It turns out someting breaks when I enable parinfer-mode and as soon as I disable that mode the normal paste overwrite selection behaviour comes back... I have no idea why as it used to work and I didn't change anything I can think of, now I can't go back to proper behavious and have to disable parinfer mode that I'm not sure I can live without 😞#2017-03-1716:54tanzoniteblack@sineer this kind of pasting can sometimes be wonky in smartparens-strict-mode, which I tend to use for Clojure. Not sure if parinfer-mode is rejecting the paste because it think it would cause unbalanced parenthesis?#2017-03-1717:48qqqis it true that the letter after a q is always a u? ie. always qu ?#2017-03-1717:49qqqif so, I' tempted to bind qh qj qk ql to other things#2017-03-1717:50tanzoniteblack@qqq in English? It's true for all spelled out words except for some very strange words (like "qi"); but it's not necessary true for acronyms or for programming variables (like "QA")#2017-03-1719:53sineer@tanzoniteblack Thanks for the reply! Unfortunaely, I haven't found out why parinfer-mode refuses to overwrite selection when pasting even too I tried several different combination of modes and even different emacs to no avail.#2017-03-1719:54sineerI don't think it's parinfer refusing to overwrite becaus of potential unbalanving or parens seeing how to does paste just after the selection after all but also I tried several simple text edit even with no parens it does that#2017-03-2018:21arthurwhat's the name for collapsing all the opt level definitions in a clojure buffer#2017-03-2018:23arthurlooking for the correct term to google#2017-03-2018:49qqqvim: code folding emacs: hide/show or org-mode: outline headings#2017-03-2019:46tanzoniteblack@arthur outline-hide-{sublevels,leaves,subtree}#2017-03-2021:26arthur@tanzoniteblack thanks, outline was the word that had escaped the brain#2017-03-2021:27arthursince the last time you told me 🙂#2017-03-2021:28tanzoniteblackno worries#2017-03-2100:08donaldballHey, is there any way when using cider to find and maybe choose between visiting all known impls of a protocol fn?#2017-03-2520:13qqqI have
(defn foo []
  |(fn [] a b c d e f))
where | = my cursor is there a function to change it to
(defn foo []
  fn [] a b c d e f)
basically, it's not slurp or barf, it's "strip a layer of ()"
#2017-03-2520:18qqqparedit-splice-sexp that's it#2017-03-2612:49bozhidar@donaldball no, there’s not. But something like this is definitely doable. You file a feature request on GitHub.#2017-03-2614:29donaldballThanks, I’ll do so#2017-03-2619:24qqqevil lookup, displays,a bove the current line, a descriptipn of the current function#2017-03-2619:25qqqwhat is the means by which this is achieved? to insert lines into a window that are not part of the file ?#2017-03-2620:21qqqin emacs regexp, regexps tend to match at the START of the match ...; but I'd like a way to specify some palce in the middle of the match#2017-03-2620:21qqqis there a way to do that?#2017-03-2620:27qqqso these things are called look-around assertions#2017-03-2620:27qqqunfortunately, it's not clear if they're in mainline emacs (though patches certainly exist)#2017-03-2718:55beppuI'm looking at the last example at https://orgmode.org/worg/org-tutorials/tables.html and I'm wondering why that first column is necessary.#2017-03-2719:41tanzoniteblackthe / tells the table exporter that that line is going to be for doing column grouping#2017-03-2719:41tanzoniteblackthe # is just a nil comment character#2017-03-2719:42tanzoniteblackyou can make that exact same table with:
|  N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
|----+-----+-----+-----+---------+------------|
| / |   < |     |   > |       < |          > |
|  1 |   1 |   1 |   1 |       1 |          1 |
|  2 |   4 |   8 |  16 |  1.4142 |     1.1892 |
|  3 |   9 |  27 |  81 |  1.7321 |     1.3161 |
+----+-----+-----+-----+---------+------------|
#2017-03-2719:45tanzoniteblackI'm not sure why you'd prefer to have the version with the leading column being unnecessary like that....#2017-03-2720:13beppu@tanzoniteblack Thanks for the explanation.#2017-03-2814:22pesterhazyIf anyone isn't aware (I wasn't until a while ago), dumb-jump doesn't just have a great name but is also awesome for clojure: https://github.com/jacktasia/dumb-jump#2017-03-2814:23pesterhazy(Bonus feature: it's automatically bound to , g g in Spacemacs)#2017-03-2814:33vermaseems to work well with cljs as well 🙂#2017-03-2814:36pesterhazythat's the great thing, it's so dumb it probably can't even tell the difference#2017-03-2814:36verma😄 I like that#2017-03-2814:37vermabeen looking for something like this for emacs, thanks @pesterhazy for bringing it up#2017-03-2814:46vermawonder if there’s a dumb version of find usages#2017-03-2814:46vermaguess a simple search would do so#2017-03-2818:13caioanyone runs midje tests with cider? without midje-mode :thinking_face:#2017-03-2818:37gonewest818in an emacs-based repl, using midje.repl/autotest seems to work fine#2017-03-2821:06caioI mean to be able to see highlighted errors and some jump-to-error links#2017-03-2903:24qqqwhen in evil normla mode, C-x C-e wants to eval the expr that ends BEFORE my cursor I want it to end on the expr that ends ON my cursor this matters when ) is the last char in a line, and the cursor is on the )#2017-03-2906:29qqqdoes emacs have anything builtin, similar to C=h f, that lets me search through oracle's java docs ?#2017-03-2907:02andrea.crotti@verma helm projectile is really good also for searching in repos #2017-03-2913:51bja@andrea.crotti I've been mostly happy with loading all clojure files via a pattern with helm and then using helm-imenu#2017-03-2913:53bjain spacemacs I do something like SPC p f, select a project, put in a regex to match the files that I'm on (I know I could automate this), M-a, and then use SPC j i to jump intra-buffer and SPC j I to jump across the project using a nice autocompleting helm buffer#2017-03-2913:54bjahelm-projectile-find-file and helm-imenu-in-all-buffers#2017-03-2914:19andrea.crottiah yes nice#2017-03-2914:19andrea.crottiwell luckily in Emacs world there are many ways to do the same thing 😄#2017-03-2914:19andrea.crottiyou can pick and choose the one you like more#2017-03-2915:05verma@andrea.crotti thanks for the suggestion, I do use helm-projectile .. after playing around with it a bit it seems helm-projectile-grep fits the bill 🙂 .. might try the -ag variant as well because the grep one is being a little laggy 😕#2017-03-2915:20cmackI really like helm-ag but I’ve modified it even further to use rg (ripgrep), but more for curiosity rather than actually needing more speed#2017-03-2915:25pesterhazyhelm-ag can use rg without problems (in spacemacs it does so automatically)#2017-03-2915:25pesterhazyit's my most-used tool, by far#2017-03-2915:26vermanice, going to give it a try :thumbsup:#2017-03-2915:28pesterhazyI do have (helm-ag-base-command "rg --vimgrep --no-heading --smart-case") in custom-set-variables, not sure if it's necessary#2017-03-2915:28pesterhazyalso
(evil-leader/set-key "/" 'spacemacs/helm-project-do-ag)
  (evil-leader/set-key "*" 'spacemacs/helm-project-do-ag-region-or-symbol)
#2017-03-2915:29pesterhazyto force-bind SPC /#2017-03-3011:57chrisblomwhat the best way to insert output from some slow shell command into a buffer?#2017-03-3011:58chrisblomi want to run a process, and insert its output at some specific point in a buffer when the process is done#2017-03-3011:59chrisblomi know flycheck does something like this (adding underlines when a linter completes), but i don't understand its code#2017-03-3013:13cmackif you have a more recent version of emacs, that might be a use case for the new async-* functions#2017-03-3016:34qqq@chrisblom: from my limited experience elisping, probably easierst to (1) redirect output from cmd to some buffer, (2) on some trigger, (3) insert the contents of the buffer#2017-03-3018:24bballantineHi, I recently made the switch from Vim to Emacs + evil-mode for all of my clojuring. In customizing settings (specifically evil-leader key mappings for cider commands), I am having to repeat stuff in my init.el for each of the clojure modes: clojure-mode, clojurescript-mode, and clojurec-mode (for .cljc files) In this particular case, I’m pretty sure I can do something like
(setq cider-key-mappings '(”ci” cider-jack-in …))
(apply evil-leader/set-key-for-mode ‘clojure-mode cider-key-mappings)`
(apply evil-leader/set-key-for-mode ‘clojurescript-mode cider-key-mappings)
…
But generally, I was wondering if there was some way to refer to all three modes with the same name, something like (evil-leader/set-key-for-mode ‘any-clojure-mode …), or if there’s some other technique for applying customization to all clojurey modes that experienced emacs users use.
#2017-03-3018:26dpsuttonthis is what i do#2017-03-3018:27tanzoniteblackvery similar version to what I do:
(defun enable-lisp-hooks (mode-name)
  "Enable lisp-y goodness for MODE-NAME."
  (let ((mode-hook (intern (concat (symbol-name mode-name) "-hook"))))
	(add-hook mode-hook 'smartparens-strict-mode)
	(add-hook mode-hook 'rainbow-delimiters-mode)))

(-each sp--lisp-modes 'enable-lisp-hooks)
#2017-03-3018:29qqq@bballantine : similar to @dpsutton and @tanzoniteblack , I have one function called "do-lisp-stuff", then for elisp, clj, cljs, hy, I have it all call do-lisp-stuff#2017-03-3018:30bballantineThanks @dpsutton @tanzoniteblack and @qqq that’s really helpful. I’ll use the same technique.#2017-03-3018:31tanzoniteblack-each is from the fantastic https://github.com/magnars/dash.el library, btw, which includes the majority of the clojure seq operating functions that you're used to#2017-03-3018:31bballantinethanks… i was just about to look that up.#2017-03-3018:50qqqwait a second, dash.el, https://github.com/magnars/parens-of-the-dead and emacs rocks are created by the same person?#2017-03-3019:12magnars@qqq yes :)#2017-03-3019:18tanzoniteblack@magnars best possible person to respond to that 😄 . Also, thank you for dash, it makes writing elisp enjoyable#2017-03-3019:18qqq@magnas: you owe me 3 months of salary; after watching your parens of the dead series, I swithced from vim to emacs, and have spent the past 3 months configuring elisp, emacs, cider, helm, projectile, ivy, avy, counsel, inferior-lisp#2017-03-3019:19qqq@magnas -> @magnars 🙂#2017-03-3019:19magnarsHaha, sorry about that. 😄#2017-03-3019:21magnars@tanzoniteblack after using Emacs for a while without, it had to be done. I made it in a fit of rage after trying to use the built in functions. 🙃#2017-03-3019:21tanzoniteblackis that why it's original name was bang?#2017-03-3019:21qqq@magnars : will it eventually have all of clojure's persistent data structures?#2017-03-3019:23tanzoniteblackjoking aside; has anyone ported clojure's immutable data structures to elisp?#2017-03-3019:23tanzoniteblackor is there a good equivalent anyways, if not a port#2017-03-3019:23magnarsNo, that was just a bad name. And no, that would be clunky to work with. #2017-03-3105:10qqqI can't find char-at-point; in emacs how do I get the char at the current point ?#2017-03-3105:16qqq(char-after (point))#2017-03-3105:18dpsutton(buffer-substring-no-properties (point) (+ 1 (point)))#2017-03-3105:21dpsuttonhttps://www.gnu.org/software/emacs/manual/html_node/elisp/Near-Point.html#2017-03-3105:43qqq@dpsutton: thanks! that doc page was very useful#2017-03-3105:45dpsutton👍#2017-03-3123:48qqqhow do I get the "font lock" of a given line? I expect it to have the font style of a OUTLINE HEADING, but instead it has the font style of a comment#2017-03-3123:49qqqit also acts like an outline header in outline-minor-mode, but it's not displaying as a header ... instead, it's displaying as a comment#2017-04-0112:16hlollithere's an emacs function that can print the text with its text properties. Fixing this depends of course which package you are running. Sometimes the syntax table can intefere with font-lock regexp's so look at where comment is defined in the syntax-table of the major/minor mode.#2017-04-0114:56hlolliwhat was the emacs regexp for excludeing a sequence of characters. Im trying to create a match to if if it has not goto statement in the same line "\\b\\(if\\)\\b.*^\\(igoto\\|kgoto\\)" this wont match to anything even tough igoto or kgoto are not present in the line.
#2017-04-0115:04hlolliah the carrot is only exclude character in square brackets. Seems to be painful to get this effect, so nevermind.#2017-04-0122:59qqqMain problem: I'm using outline-minor-mode (can't use org mode). Comments aare headers. Comments are being displayed in comment-face instead of header-face. Question: how do I figure out in eamcs how the face is set? i.e. wehther it's set as code, keyword, comment, or header ?#2017-04-0200:57qqqso I'm still working on my outline problem -- in a emacs major mode, what defines what is considered to be a comment?#2017-04-0200:57qqqI need it so that "; foo" < this is a comment but ";;;; blah" <-- this is a header instaed of a comment#2017-04-0200:57qqqI need to change this for font locking faces / highlighting in emacs#2017-04-0201:20qqqcan someone point me at docs for the following: how does emacs decide what's a comment ? everything I find is about how to manipulate comments, but I just want to know how emacs decide what a comment is#2017-04-0207:19dotemacs@qqq maybe this will help: https://www.emacswiki.org/emacs/EmacsSyntaxTable#2017-04-0207:20dotemacsand maybe the section 1. of this blog post: http://www.wilfred.me.uk/blog/2015/03/19/adding-a-new-language-to-emacs/#2017-04-0207:36qqq@dotemacs: yeah, so I ended up disabling the syntax table, only using keyword font locking -- and it all works now 🙂#2017-04-0510:38piotr-yuxuanHey, any users of magit-gh-pulls?#2017-04-0510:39piotr-yuxuanFetching a PR doesn’t work for me but I’m unsure about what I could have done wrong (I did nothing fancy) https://github.com/sigma/magit-gh-pulls/issues/108#2017-04-0511:29piotr-yuxuanHi there 🙂 I’ve been trying to use Dirac (#dirac, https://github.com/binaryage/dirac) from within Emacs. It’s been implemented as a Piggieback middleware fork, so we cannot run both of them. In Emacs I do (cider-jack-in) to launch a REPL then I enter (dirac! :version) but I got these error messages:
error in process filter: if: [nREPL] No response handler with id nil found
error in process filter: [nREPL] No response handler with id nil found
When I launch a REPL from the terminal it works like a charm:
$lein repl
user=> (dirac! :help)
;; You can control Dirac REPL via special `dirac` command:
Thanks in advance if you have any hints!
#2017-04-0612:41chrisblomgiven a list of files, how do i run a elisp function on each file?#2017-04-0612:45andrea.crotti@chrisblom (mapc FUNCTION SEQUENCE) ?#2017-04-0623:55qqqis there a way in emacs to imenu an entire directory?#2017-04-0700:40ag@qqq what do you mean, can you clarify?#2017-04-0700:41agdo you mean directory structure or single directory in dired?#2017-04-0700:43agyou can use swiper/`helm-swoop` - is that close to what you trying to get?#2017-04-0702:54qqq@ag: imenu right now only 'indexes' curent buffer; I want a way to use imenu to index all the .clj .cljc *.cljs files in src/ ...#2017-04-0715:39bja@qqq you can using helm to load all of those files in the buffer#2017-04-0715:42bjaI do this from spacemacs, using helm-projectile-find-file and a regex to filter, M-a to select all the results, and then RET to load them in buffers. From there, I use helm-imenu-in-all-buffers to jump around the project#2017-04-0715:43bjaif you don't use helm, I'm assuming you could lift whatever source code underlies helm-imenu-in-all-buffers to adapt to whatever display system you'd prefer#2017-04-0719:39qqq@bja: I tried something like that, writing a function to recursively open all the files in src/ .....#2017-04-0719:40qqqproblem is, when I'm done editing a file, I'm so used to hitting buffer-kill that very soon, my most frequently edited fiels are no longer open in buffers 😞#2017-04-0719:40qqqthis is just bad finger memory from vim, say I'm editing foo.clj#2017-04-0719:40qqqthen I need to open bar.clj#2017-04-0719:40qqqso what I do is (1) open bar.clj (2) make changes, (3) I need to jump bak to foo.clj -- and I do that by killing bar.clj#2017-04-0719:40qqqso then, I jump back to foo.clj, but not bar.clj is closed#2017-04-0719:40dpsuttonget C-x b built into your muscle memory#2017-04-0719:41dpsuttonlist buffers. easy navigation, can start typing to match against open buffers, etc#2017-04-0719:41dpsuttondon't kill buffers, there's lots of memory#2017-04-0719:41dpsuttonalso, remembers recent buffers so you could go back to them easily if you did kill them#2017-04-0719:52rmuslimovI’d also recommend use (global-set-key [f11] 'ibuffer), nice list of opened buffers (search,filter,select functionality)#2017-04-0719:52rmuslimoveasy to remember#2017-04-0720:32ag@qqq don't kill buffers, bury them#2017-04-0808:34fossifooX-Post from #testing: anybody got midje yasnippets? google is not so helpful and midje-mode doesn't help with fast editing much#2017-04-0900:12qqq@fossifoo : the largest problem I foudn with midje is not the lack of snippets but (...) => (...) which prevents my typical#2017-04-0900:12qqq(1) put at start of ( (2) delete until matching ) (3) move it around#2017-04-0906:56fossifooyeah, it's annoying too#2017-04-0906:57fossifoovery "unlispy" syntax 😕#2017-04-0906:57fossifoowell i guess the root of the evil is in the "syntax" part 😉#2017-04-1001:09qqqis there a way to run helm-occur over all files of a directory instead of just current buffer ?#2017-04-1003:37qqqokay, I got that working, via helm-ag with grepping#2017-04-1003:37qqqnow, my next problem: I want a function whose behavior togles between widen and anrrow-to-defun, depending on whether the currenh buffer if i in a narrow state#2017-04-1102:31qqqin elisp what is a #(...) and why can't I take the car of it?#2017-04-1102:46dpsutton@qqq https://stackoverflow.com/questions/2701698/emacs-elisp-what-is-the-hash-pound-number-sign-octothorp-symbol-used-for#2017-04-1102:46dpsuttonwhat does the form look like?#2017-04-1102:46dpsuttonbecause normally that means "compile this form"#2017-04-1102:46dpsuttonso probably on a lambda?#2017-04-1105:10qqqso setq is just set with first argument auto quoted ?#2017-04-1105:42rmuslimovy#2017-04-1111:53qqqif I want to setup the value of a to the value of b, I can do (setq a b)#2017-04-1111:53qqqhowever, ifI want to set the FUNCTION-VALUE of a to the FUNCTION-VALUE of b, how do I do that?#2017-04-1112:50gonewest818Do you mean (setf 'a 'b) ?#2017-04-1113:12qqqsetf#2017-04-1113:12qqqthat's it, thanks!#2017-04-1209:18benedekoi good peeps here. i am happy user of use-package but a bit confused at the same time… i kinda expected it pulling the latest version of packages at startup unless i pin the package to melpa-stable but apparently that is not happening… what am i missing? is there an easy use-package way to achieve this? or is this tangential to use-package?#2017-04-1209:27andrea.crottiI don't think use-package should do that @benedek#2017-04-1209:27andrea.crottiah no maybe you are right it should do that#2017-04-1209:30benedekyeah it is not exactly obvious…#2017-04-1212:28jfntnI don't think it does that#2017-04-1212:44benedeksad times…#2017-04-1212:44benedeki can of course get this effect by nuking my elpa directory where the packages are stored#2017-04-1212:45benedekand then the next startup will be a big upgrade…#2017-04-1212:45benedekbut not really ideal tbh#2017-04-1212:45benedekso is it a bad idea to have such a feature in use-package?#2017-04-1216:15cmack@benedek I don’t understand why you need to nuke elpa. When I want to upgrade, I M-x list-packages then U to mark upgradable packages and then x to execute the upgrade…#2017-04-1216:17cmackI would not like use-package to auto-upgrade, myself, because sometimes I must resist my upgrade desires to avoid risking a breaking change while getting work done.#2017-04-1216:35benedekyou are ofc right @cmack that I can upgrade pkgs#2017-04-1216:35benedekthis way#2017-04-1216:36benedekI think it would be nice tho to have this feature#2017-04-1216:36benedekthe packages I am more worried about I just pin to stable release#2017-04-1216:39benedekbut there a certain pkgs I actively develop (around clojure ;) ) which I just want to have the cutting edge even if risky#2017-04-1217:55qqqhow do I get search-forward-regexp to palce curosr on START instead of END of match ?#2017-04-1217:57qqqalso, what's the inverse of point ? when I want to set the point instead of reading its value#2017-04-1218:05richiardiandrea@qqq you have to use match-beginning after that#2017-04-1218:05richiardiandreaor match-end#2017-04-1218:09dpsuttoni think goto-char is what you want to move the point#2017-04-1223:11qqq@richiardiandrea : @dpsutton : ah, thanks, I just used (backward-char (- (match-end 0) (match-beginning 0))#2017-04-1223:42qqq(helm-grep-for (concat "def[^\\s]+ " symbol-under-cursor)) now, this almost works, but sometimes, symbol-under-cursor can have special meaning as a regexp so my question is: how can I change the symbol-under-cursor string to a regexp that only matches the original literla string?#2017-04-1223:43qqqso for example, if symbol-under-cursor is ***, I need it changed to \\*\\*\\*#2017-04-1223:45tanzoniteblack@qqq if you already know the symbol under the cursor, you can use the function https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Functions.html to escape it#2017-04-1223:45qqq@tanzoniteblack : regexp-quote is precisely what I needed; thanks!#2017-04-1223:45tanzoniteblackof course...that's escaping for emacs regexes, which might be a 1-1 match for grep, which might be an issue depending on how helm-grep-for works#2017-04-1223:45qqqcrap#2017-04-1223:45qqqyeah, so I'm using helm-ag#2017-04-1223:46qqqI guess I should not use symbol names with weird regexp interpretations#2017-04-1223:46tanzoniteblackI know for grep, you can just use the parameter -F to have it do literal string matches#2017-04-1223:47tanzoniteblackag probably has something similar, and you might be able to pass extra parameters through somehow?#2017-04-1223:48qqqthe problem is I'm building a regexp, where parts of it is a regexp,a nd parts of it needs to be a literal string#2017-04-1223:48qqqso I'm takng the symbol, which I want to quote -- then I want a prefix of def[^\s]*#2017-04-1223:48qqqso I have to output one string, part of which is regex, part of which is quoted#2017-04-1300:01richiardiandreahello folks! is there a premade predicate in elisp to identify top-level sexp?#2017-04-1300:06richiardiandreaactually a list would do too#2017-04-1300:07richiardiandreauhm, maybe i can use read and if use listp#2017-04-1302:04qqq@richiardiandrea : does searching for ^( work? Earlier, I was writing t ahot key for "move to start of top level sexp"#2017-04-1304:02amdt@richiardiandrea: Have a look at C-h f beginning-of-defun and C-h f beginning-of-defun-raw. If you can’t use them as functions you should be able to see how they find a top-level sexp at least.#2017-04-1304:11richiardiandrea@amdt thanks true that!#2017-04-1320:20richiardiandreaif I do (re-search-forward "/\\*\\|\\*/" nil 'move) and the result is 3, shouldn't I see the curson in the buffer moving? Does it work like this in ielm?#2017-04-1523:44vemvhiya! I'm using cider with company. It works well (default setup - not customized) can company+cider show the docstring in the popup as well? my old setup with auto-complete instead of company used to include docstrings.#2017-04-1600:39caioidk. I usually use cider-doc when I want to see docstrings (it pops up on another buffer)#2017-04-1600:52vemvdocstrings in popup would help choosing the right fn (imagine you're exploring a ns for the first time)#2017-04-1600:53vemvcan't imagine an efficient way otherwise#2017-04-1810:46pesterhazyVim has ^X^F to complete the filename at point. If you type /etc/ho ^X^F, it'll offer you /etc/hosts#2017-04-1810:47pesterhazyIs that something you can do with Emacs? I'm assuming helm is involved, but I can't find a reference in the docs.#2017-04-1810:53pesterhazyhm#2017-04-1810:54pesterhazyI can do ^X^F and then ^U^U^C i in then helm buffer#2017-04-1810:54pesterhazynot as easy as in Vim though 🙂#2017-04-1813:42kliph@pesterhazy typing TAB in emacs -q runs minibuffer-complete in the Find file: prompt for me#2017-04-1813:50pesterhazy@kliph, that doesn't work for me, either in emacs -q -nw (emacs 25.1.1) nor in my default spacemacs#2017-04-1813:51pesterhazyoh, you mean after typing ^X^F?#2017-04-1813:51pesterhazyyeah, but I want to insert the filename in the current buffer#2017-04-1813:52pesterhazye.g. I type cp /etc/ho when writing a .sh file#2017-04-1813:52pesterhazyand now want to complete that filename#2017-04-1813:53kliphhave a look at https://www.emacswiki.org/emacs/InsertFileName , I'm not aware of an easy way to do this in plain old emacs#2017-04-1813:57pesterhazythanks I'll have a look#2017-04-1813:58kliphI imagine you're in shell-script-mode. If you're using some sort of completion library, you could also look into enabling it in that mode#2017-04-1813:58pesterhazyyeah but I like it generally too (imagine requiring a relative path in javascript)#2017-04-1813:59kliphI'd imagine that you could configure it more generally too 😄#2017-04-1814:00cmackC-h a tells me there is a helm-complete-file-name-at-point command. It seems to do the action in your example… it gives completions for /etc/ho as /etc/hosts#2017-04-1814:05pesterhazythat's pretty good#2017-04-1920:21richiardiandreais there a way in emacs to detect all the unused functions?#2017-04-1920:22dpsuttonunused elisp functions?#2017-04-1920:24dpsuttonprobably not based on this: (funcall (intern "plusp") 4)#2017-04-1920:49richiardiandreayes unused functions in a file#2017-04-1921:42agthat’s interesting question. I wonder if there’s a “static code analyzer” tool or something for elisp#2017-04-1921:58tanzoniteblack@richiardiandrea xref-find-references will show you all the places where a function is explicitly called, and will warn you if none are found; you could probably script that somehow to do what you want?#2017-04-1922:10richiardiandrea@tanzoniteblack oh interesting did not know that, yeah that sounds like easy to achieve#2017-04-2205:59bbssI use jj key chord to jump to a char quite often, but sometimes I do a certain action that disables it, I think it happens after using it in combination with a mistaken key. I can't seem to figure out when that happens though. I need to reopen my buffer to re-enable the jj jump to char key chord. Any ideas what's happening or how to figure it out?#2017-04-2219:49cmack@bbss it sounds like something is changing the mode that your jj is enabled for. The next time it happens, I would use C-h b to check if anything has chenged the bindings for jj. Next I would check the modes the current buffer has enabled and then do M-x revert-buffer (this should have same effect as reopening the file) If it works, I’d check the modes again and compare#2017-04-2305:30bbss@cmack thanks for the elaborate tips 🙂#2017-04-2510:51qqqin emacs, is there a way to show all the kill buffer contents?#2017-04-2510:54mgrbyte@qqq do you mean the list of buffers which kill-buffer prompts to kill?#2017-04-2510:55qqqno; maybe I am using the wrong terms#2017-04-2510:56qqqwhen I delete stuff, like delete word, delete region, delete line#2017-04-2510:56qqqall the things I delte get stuffed into some ring right?#2017-04-2510:56qqqI'd like to dedicate a buffer to dedicate to the contents of this ring#2017-04-2510:57mgrbytemaybe https://www.emacswiki.org/emacs/BrowseKillRing#2017-04-2515:22tanzoniteblack@qqq I use browse-kill-ring for that https://melpa.org/#/browse-kill-ring https://github.com/tanzoniteblack/dotemacs/blob/master/init.el#L647#2017-04-2517:14cmackThere is also helm-show-kill-ring (I personally bind it to M-y). I’m sure ivy/counsel has something similar#2017-04-2517:39richiardiandreaI have js2-mode on in my json files...unfortunately it seems that indent-line-function gets hijacked by js-mode#2017-04-2517:40richiardiandreais there a way to get around that? (`add-hook` does not work)#2017-04-2521:55cmack@richiardiandrea interesting js2-indent-line is just an alias for js-indent-line. I can’t imagine that a (setf indent-line-function ... ) would not work in an add-hook though…#2017-04-2521:56richiardiandreaoh really#2017-04-2521:56cmackseparately, is there something js2-mode gives that json-mode doesn’t? (I know that wasn’t your question, but I tried js2-mode in a json buffer and there were false errors galore)#2017-04-2521:57richiardiandreawell, i need to investigate why, maybe the problem is elsewhere...I am setting js2-base-offest in the hook but probably I need to set something else then#2017-04-2521:57richiardiandrea@cmack I actually use json-mode AND js2-mode now, they play well together but my goal was to disable js2-mode in .json files#2017-04-2521:58richiardiandreathey play together...until they don't 😄#2017-04-2521:58cmackwait, both of those are major modes aren’t they?#2017-04-2521:59richiardiandreaoh#2017-04-2521:59richiardiandreathat is why something was not working correctly 😄#2017-04-2522:02richiardiandreaso js2-mode in taking over...need to find how to disable it for .json files#2017-04-2522:23richiardiandrea@cmack so now I am using json-mode and (setq js-indent-level 2) solved my formatting issues thanks!#2017-04-2619:12slipsetThere is even https://github.com/NicolasPetton/Indium a js-ide, almost JIDER?#2017-04-2619:25bballantineHi, I am a co-organizer of the clojure-nyc meetup and we want to do some clojure editor hacking at the next meeting in mid-may.#2017-04-2619:25bballantineObviously any emacs clojurians in the NYC area are urged to participate, but right now I’m looking for someone willing to give a brief (5 min) intro to emacs hacking and help others at the meet-up.#2017-04-2619:26bballantineIf anyone is interested or knows someone who would be, PM me or reach out via meetup: https://www.meetup.com/Clojure-NYC/#2017-05-0102:58stardivinerI got this error:
Warning: refactor-nrepl requires org.clojure/clojure 1.7.0 or greater.
Warning: refactor-nrepl middleware won't be activated due to missing dependencies.
WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: mranderson047.toolsanalyzerjvm.v0v6v9.toolsanalyzer.v0v6v7.clojure.tools.analyzer.utils, being replaced by: #'mranderson047.toolsanalyzerjvm.v0v6v9.toolsanalyzer.v0v6v7.clojure.tools.analyzer.utils/boolean?
WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: mranderson047.toolsanalyzerjvm.v0v6v9.toolsanalyzer.v0v6v7.clojure.tools.analyzer, being replaced by: #'mranderson047.toolsanalyzerjvm.v0v6v9.toolsanalyzer.v0v6v7.clojure.tools.analyzer.utils/boolean?
When I added refactor-nrepl into Leiningen profiles.clj. Then start lein repl not in project directory.
#2017-05-0106:07benedeki guess lein pulls in an older version of clojure @stardiviner#2017-05-0208:20bunkersHi all, I’m just doing an audit of my config and the template I’ve used has this in it
(setq backup-directory-alist `(("." . ,(concat user-emacs-directory
                                               "backups"))))
What does the second item (the unquoted dot) in that list do? For that matter I’m not sure what the first item is for!
#2017-05-0209:24benedekthe second dot is just for easier readability in terms for alists. afaik it is optional#2017-05-0209:25benedekfirst item: current dir?#2017-05-0209:25benedekhttps://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html#2017-05-0209:25bunkersoh right, so a bit like a comma?#2017-05-0209:25benedekyup#2017-05-0209:26bunkersThat’s what I thought about the first dot but this is supposed to be moving the backup file location to backups in the emacs.d directory. If that’s the case then you wouldn’t need to include the current directory would you?#2017-05-0209:26bunkersoh hang on, so it’s associating the current directory with a different one#2017-05-0209:26bunkersI get it!#2017-05-0209:37benedekyup. coolio 🙂#2017-05-0209:42bunkersAh, it’s actually a catch all regex http://doc.endlessparentheses.com/Var/backup-directory-alist.html#2017-05-0209:42bunkersbrilliant, that’s really helpful, thanks!#2017-05-0210:34benedekwhoops. sorry for misleading…#2017-05-0215:59qqqis there a way to get (comment .... ) to display in the same style as ;; .... ?#2017-05-0216:12richiardiandrea@qqq in elisp ?#2017-05-0216:13richiardiandreaI didn't know it had (comment...#2017-05-0216:18qqqin clojure#2017-05-0216:18qqqin clojure, my (comment ... ) sexps look like regular sexps#2017-05-0216:18qqqI'd prefer they be gray + italicized like ;; and #_#2017-05-0216:21richiardiandrea@qqq better ask #cider for this#2017-05-0216:21qqqhow is this #cider and not #emacs ?#2017-05-0216:22qqqI'm not even using #cider#2017-05-0216:22richiardiandreaOh ok so it must be clojure-mode#2017-05-0216:22richiardiandreaProbably there is a defface to duplicate in there#2017-05-0216:23richiardiandreaYou can use describe-face for checking where the face comes from#2017-05-0216:25qqqThis makes sense.#2017-05-0216:25qqqI'm going to try this.#2017-05-0216:25qqqHow do I access the code of clojure-mode (besides trying to guess a function in clojure-mode and doing C-h f)#2017-05-0216:27qqq
(defface clojure-keyword-face
  '((t (:inherit font-lock-constant-face)))
  "Face used to font-lock Clojure keywords (:something)."
  :package-version '(clojure-mode . "3.0.0"))

(defface clojure-character-face
  '((t (:inherit font-lock-string-face)))
  "Face used to font-lock Clojure character literals."
  :package-version '(clojure-mode . "3.0.0"))

(defface clojure-interop-method-face
  '((t (:inherit font-lock-preprocessor-face)))
  "Face used to font-lock interop method names (camelCase)."
  :package-version '(clojure-mode . "3.0.0"))
actually, that's all the deffaces that there are
#2017-05-0216:34dpsuttonhttps://clojuredocs.org/clojure.core/comment#2017-05-0216:35dpsuttonfrom this, it appears that ;;, #_ and comment differ. comment must be readable, and therefore making it look commented out could lead to compilation errors or holding onto aliases after they have been removed, etc#2017-05-0216:36qqqthat's from the view of the clj compiler#2017-05-0216:36qqqit doesn't give a damn about how emacs displays it#2017-05-0216:36qqqthe two are unrelated#2017-05-0216:37qqq(but you're right in that (comment ...) is read + returns nil rather than throw away at read time)#2017-05-0216:37dpsuttonof course it doesn't matter how emacs displays it. my point is that there is often comment drift. and if it looks commented out you may not realize that the compiler requires it to move in lockstep and keep aliases, etc#2017-05-0216:38dpsuttonjust a possible reason as to why the faces are displayed differently#2017-05-0216:40dpsuttonah it looks like the reader doesn't resolve anything, just makes sure the forms "look right"#2017-05-0216:44dpsutton@qqq https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L612#2017-05-0216:45dpsutton
By default, this only applies to code after the `#_' reader
macro.  In order to also font-lock the `(comment ...)' macro as a
comment, you can set the value to:
    \"#_ *\\\\(?1:[^ ]\\\\)\\\\|\\\\(?1:(comment\\\\_>\\\\)\"")
#2017-05-0217:43qqq@dpsutton : precisely what I need; thanks!#2017-05-0217:49richiardiandrea@qqq it would be great if you can contribute back to clojure.mode I guess#2017-05-0218:28qqq@richiardiandrea : the code @dpsutton linked to iks already, literally, in the clojure-mode codebase#2017-05-0218:28dpsuttonif you felt like doing a little coding you could make that more easily toggle-able#2017-05-0218:31qqq(setq clojure--comment-macro-regexp "# *\\(?1:[^ ]\\)\\|\\(?1:(comment\\>\\)") ^^ is literally all it takes#2017-05-0218:32qqqtoggle on: put that in init.el toggle off: comment it out 🙂#2017-05-0218:34dpsuttontrue, but it requires finding that regex in the source and setq'ing it.
(defun clojure-mode-toggle-comment ()
  (setq clojure-comments-out-comments (not (clojure-comments-out-comments))
  (setq clojure--comment-macro-regexp (clojure-mode-regex-for-comment-style ...)))
or something similar
#2017-05-0219:04qqq@richiardiandrea : can you package up @dpsutton 's patch and submit it as a pull request to clojure-mode? 🙂#2017-05-0219:04richiardiandreasure can, isn't github working for you?#2017-05-0219:05qqqit's working fine for me; I'm just an lazy jerk#2017-05-0219:06richiardiandreagot it, I can for sure, is it the only thing that's needed?#2017-05-0219:06richiardiandreaalso, can this be on by default?#2017-05-0219:06qqqI don't know if others have suggestions.#2017-05-0219:06qqqI wouldn't be the right person to make that call.#2017-05-0219:07qqq(comment ...) is kind of weird in that, when the code is run, it actually becomes a nil right ?#2017-05-0219:07qqqhow do we trigger clojurebot again ?#2017-05-0219:07richiardiandreayes but this is something you don't care about in emacs...as long as it is grayed out#2017-05-0219:07richiardiandreait is just for displaying it correctly#2017-05-0219:08richiardiandreayeah you are basically executing (str) there#2017-05-0219:08qqqno, I'm executing (str nil) there#2017-05-0219:08qqq(comment ....) isn't stripped away at read time, it becomes a "nil"#2017-05-0219:09qqqI'm abusing it as follows:
(defn foo [ ... ]
  (comment ... )
  (... body of foo ... ))
then, since (comment l..) isn't stripeped away, I can insert all the type info for function foo there
#2017-05-0219:09qqqit's really ugly / nasty#2017-05-0219:10richiardiandreait is not stripped at read time because it is not a reader macro#2017-05-0219:10qqqright, I get that#2017-05-0219:11richiardiandreaanyways, these are just details#2017-05-0219:11qqqyeah, I think the patch is fine; though I'm not really convicned it's really necessary#2017-05-0219:11qqqat least in my expericne, all of my init.el is just setq-ing stuff, not togglikgnoptions#2017-05-0219:12richiardiandreaprobably it should be optional, because of that#2017-05-0219:12qqqand also, how often does someone, in the middle of coding, decide#2017-05-0219:12qqqgee, I want to toggle the appearance of (comment ....) 🙂#2017-05-0219:12qqqit seems like the type of thing where you set once, and stick with the decisions for years#2017-05-0219:14richiardiandreauhm, dunno in any case a defcustom is cheap, I will add it and see what folks think about it#2017-05-0219:38richiardiandreaso @dpsutton where did you take clojure-comments-out-comments?#2017-05-0219:39dpsuttonwhere did i take it? naming things is hard so i just put a placeholder. i was guessing what it might eventually be called, but that's a pretty poor name#2017-05-0219:39dpsuttoni wouldn't go with that one 🙂#2017-05-0219:39richiardiandreaah ok 😄#2017-05-0219:43caioO don't like this as default. Stuff inside comment is still code and would benefit from syntax highlighting#2017-05-0219:43richiardiandrea@dpsutton weird, do I need to refresh somehow the emacs display in order to see that?#2017-05-0219:43dpsuttonto see what?#2017-05-0219:44richiardiandreathe different face for (comment#2017-05-0219:44dpsuttonno idea. first time looking in clojure-mode, really#2017-05-0219:44richiardiandreaah ah ok 😉#2017-05-0219:44dpsuttoni think you can eval some code and it will trigger font-lock#2017-05-0219:44dpsuttoneven just (+ 1 1) or something#2017-05-0219:44richiardiandreauhm, lemme try that#2017-05-0219:44dpsuttonfrom the repl or the buffer#2017-05-0219:44dpsuttonit'll trigger the state handler which calls font-locking#2017-05-0219:45richiardiandreaoh, there is a font-lock-fontify-block#2017-05-0219:45richiardiandreanice, it works 🙂#2017-05-0219:47dpsuttonawesome. did eval-ing code trigger it or did you have to call that function?#2017-05-0219:48richiardiandreaI had to call the above (easier!)#2017-05-0219:57richiardiandrea@qqq done https://github.com/clojure-emacs/clojure-mode/pull/431#2017-05-0220:50bozhidarJust noticed this online - newcomers to CIDER would probably find it pretty useful.#2017-05-0220:50bozhidarhttps://www.youtube.com/watch?v=aYA4AAjLfT0#2017-05-0221:50qqq@bozhidar: where is part 1 ?#2017-05-0300:37sound2gdanybody use emacs to write java code?#2017-05-0316:53tanzoniteblacksound2gd: I don’t often write java code anymore at my new job. But at my old job, I’d write java in emacs.#2017-05-0316:54tanzoniteblackhttps://github.com/mopemope/meghanada-emacs is what I was using. I’d also spent sometime using http://ensime.org/ which was built for scala, but recently started supporting java as well#2017-05-0316:56tanzoniteblackboth have their annoyances, but both worked well enough for the actual writing of java in terms of autocomplete, jump to source, error catching, syntax highlighting, etc. The bigger annoyances I had were that projectile’s run tests/compile weren’t out of the box great for multi-module maven projects, because it would try to do everything at the parent (you can hack around this though) and that in the team I was working with everyone else used intellij, and had no idea how to actually set up anything outside of that environment. Which generally just meant that running the junit tests was obnoxious#2017-05-0316:56tanzoniteblackLooks like meghanada has added support for junit test running though, which it didn’t use to have#2017-05-0300:40richiardiandrea@sound2gd I have tried to, gave up#2017-05-0300:47sound2gd@richiardiandrea me too#2017-05-0300:47sound2gdI wonder if someone has some tricks in doing this:grin:#2017-05-0302:51jfntnBeen using https://github.com/candid82/flycheck-joker for a while and highly recommend it. It has a few quirks with clojure 1.9, but it’s fast, solid, works well with cljc, finds unused locals, unused requires, wrong arities and more. It is both amazing and bewildering that a go program is the best clojure linter I’ve used#2017-05-0303:45qqq@jfntn : it's written in go ? how does it parse clojure ?#2017-05-0303:48jfntnin go 😛#2017-05-0304:13qqqisn't parsing reader macros quite messy ?#2017-05-0304:13qqqI looked into writing a parser once, and just gave up#2017-05-0304:36bozhidar@qqq the naming’s a bit confusing - there wasn’t part 1, I just had 2 talks at this conference because one of the speakers dropped out#2017-05-0304:37bozhidar@sound2gd The default experience is pretty horrible, but there were some interesting efforts like malabar-mode and jde over the years. Not sure where they are today. Guess no one was really invested in building a good mode for Java development for Emacs.#2017-05-0306:17sound2gd@bozhidar agree#2017-05-0306:27benedekso @jfntn do you think joker could be used for cljr or even cider at some point?#2017-05-0306:28benedekreferring back to our conversation on that cljr issue you created ofc #2017-05-0306:37bozhidarI doubt this is going to be feasible, after all there’s not easy way to leverage whatever API it exposes.#2017-05-0306:38bozhidarProbably it’s usage as a lint would be remain it’s only real-word application for the foreseeable future.#2017-05-0307:09benedekbecause it is written in go, @bozhidar ?#2017-05-0307:09bozhidaryes#2017-05-0307:09benedeki mean that alone does not mean that there is no interface to talk to it from elisp and/or clojure#2017-05-0307:10benedeki have not tried to play with it tho tbh#2017-05-0307:10benedekpretty high on my todo list tho#2017-05-0314:28jfntn@benedek I don’t think it makes a good target for integration in cider, for the same reasons that I don’t like tools.analyzer.jvm being a reimplementation of the clojure compiler. joker is an even more extreme case of that being that it’s written in go. On the other hand it works great as a simple linter, it’s a rare case of worse is better for me, most likely due to all the other analysis-based tools like clj-refactor and eastwood not supporting cljc.#2017-05-0314:28jfntnHave an action plan for the cljs analyzer in clj-refactor by the way, just haven’t had time to execute uet#2017-05-0314:37benedeknice @jfntn#2017-05-0315:32richiardiandreaAwesome, a static code analyzer would put us back on track in the race against Cursive 😀😀#2017-05-0316:23jfntn@richiardiandrea not sure what you’re referring to? afaik nobody’s working on that?#2017-05-0316:30richiardiandreaWe should 😀😀#2017-05-0320:49codeasoneI find https://github.com/brunchboy/kibit-helper useful, M-x kibit-accept-proposed-change works okay#2017-05-0320:55codeasone@sound2gd I was doing some Java today and started using https://github.com/mopemope/meghanada-emacs. It's a worthwhile addition to java-mode and everything you needs is setup automatically with MELPA (server-side jar is downloaded and run automatically). Failed to get jdb playing ball though...#2017-05-0320:57codeasoneseamless step debugging between Clojure and Java code would be nice - anyone doing this?#2017-05-0400:05aganyone using flycheck-joker in Clojurescript files? how can I tone it down? it’s a bit crazy, reporting too many things of error#2017-05-0400:35agso for example if I have a piece of CLJS like this:
(defui Wrapper
  static om/IQuery
  (query [this] [(om/get-query navbar/TopNavbar)])
  Object
  (render
.......
it complains that unable to resolve symbols: Wrapper static query Object and render. I tried adding those to :known-macros in ~/.joker file - but it didn’t work
#2017-05-0400:43agoh, actually I think it worked… I needed to add om.next/defui to known-macros#2017-05-0402:55sound2gd@codeasone meghanada-emacs didn’t work in large code base…it just crash….#2017-05-0416:03codeasone@sound2gd 😞 I only used it for a tiny program to reproduce an issue I was facing with a Java library, sorry it didn't work out for you and thanks for letting me know#2017-05-0517:11rquisenbanyone here?#2017-05-0517:11rquisenbreally need some helpo#2017-05-0517:26mgrbyte@rquisenb can try, wassup#2017-05-0517:26rquisenbmight not be abel to help#2017-05-0517:26rquisenbcause im on spacemacs#2017-05-0517:26rquisenbbut i opened it today
#2017-05-0517:26rquisenband the window is EXTREMELY tiny#2017-05-0517:26rquisenbcant read anything#2017-05-0517:26rquisenbC-0 and C-x#2017-05-0517:27rquisenbwont do anyhting#2017-05-0517:27rquisenbon Ubuntu#2017-05-0517:27dpsuttonthe window is normal sized but the text is tiny?#2017-05-0517:27rquisenbnope#2017-05-0517:27rquisenbwindow size is#2017-05-0517:27rquisenb1x1#2017-05-0517:27rquisenbliterally#2017-05-0517:27dpsuttoncan you maximize it?#2017-05-0517:27rquisenbcan maximize#2017-05-0517:27rquisenbbut text does nothing#2017-05-0517:27mgrbytedoes: M-x maximize-window work?#2017-05-0517:28dpsuttonso when the window is maximized what does the text look like?#2017-05-0517:28mgrbytemight need to do the spacmacs eqiv of M-x#2017-05-0517:28rquisenbdissapears#2017-05-0517:28dpsuttonwhen the window is maximized the text disappears?#2017-05-0517:28rquisenbyes#2017-05-0517:28dpsuttonand no commands work?#2017-05-0517:28rquisenbnow if id elete .spacemacs#2017-05-0517:28rquisenband use root emacs#2017-05-0517:28rquisenbit works fine#2017-05-0517:28dpsuttoncan you visit the *Messages* buffer#2017-05-0517:29rquisenbliterally cannot do#2017-05-0517:29rquisenbanything#2017-05-0517:29dpsuttonwell it sounds like your spacemacs directory is borked#2017-05-0517:30rquisenbive tried deleting#2017-05-0517:30rquisenband recloning#2017-05-0517:30dpsuttonyou're cloning it?#2017-05-0517:30rquisenbfrom http://spacemacs.org#2017-05-0517:30dpsuttontry git checkout HEAD~25#2017-05-0517:30dpsuttonwait, cloning or downloading#2017-05-0517:31dpsuttondo you have the repo?#2017-05-0517:31rquisenbcloning#2017-05-0517:31dpsuttonok#2017-05-0517:31dpsuttonroll it back and then see if its just broken right now#2017-05-0517:31rquisenbhttps://github.com/syl20bnr/spacemacs#2017-05-0517:31dpsuttonok. yeah just checkout a previous commit to see if spacemacs is in a broken state#2017-05-0517:32rquisenbthing is#2017-05-0517:32rquisenbi opened spacemacs yesterday#2017-05-0517:33rquisenbit was fine#2017-05-0517:33rquisenbdidnt reclone or anything#2017-05-0517:33dpsuttonhave you tried it?#2017-05-0517:40rquisenbyes#2017-05-0518:14rquisenbim going to#2017-05-0518:14rquisenbbang my head on many walls#2017-05-0518:19rquisenbwonder if i have to reinstall#2017-05-0518:19rquisenbXubuntu#2017-05-0518:26ag@rquisenb try backing up .cache and elpa and restarting Emacs. sometimes the problem is upstream#2017-05-0518:26agpackage is broken or something#2017-05-0703:27stardivinerHow to use cider-profile in Emacs ?#2017-05-0703:56richiardiandreaWhat is cider-profile?#2017-05-0704:41bozhidarhttps://github.com/thunknyc/nrepl-profile#2017-05-0704:41bozhidarYou basically need to add the extra middleware and install the Emacs package from MELPA#2017-05-0704:42bozhidarHowever, the project hasn’t been updated in 3 years and I doubt that it’s still compatible with the current version of CIDER#2017-05-0704:42bozhidarLikely the updates required would be pretty simple, but I do not know - haven’t used it in quite a while#2017-05-0803:25oskarkvAnyone using Evil mode? I'm looking for a package/mode that defines text objects for lisp forms.#2017-05-0807:57pesterhazyI do#2017-05-0807:58pesterhazyWhat I end up using mostly is expand-region, which works well for this purpose#2017-05-0810:35oskarkv@pesterhazy Do you use any paredit-like mode? I can't decide on which one seems best.#2017-05-0810:36pesterhazyyeah there's almost too many#2017-05-0810:37pesterhazyparedit, smartparens, lispy#2017-05-0810:37pesterhazySpacemacs comes with smartparens so I use that mostly#2017-05-0810:37oskarkvok#2017-05-0810:38pesterhazyI most use slurp, barf, (un)wrap, splice-killing-backwards#2017-05-0810:38pesterhazyi did a presentation on this, a recording of which was uploaded to youtube: https://www.youtube.com/watch?v=ubcERtDyLDw#2017-05-0810:39oskarkvCan one wrap sexps too? I mean not just words.#2017-05-0810:39pesterhazysure#2017-05-0810:39pesterhazythe video is not focussed specifically on evil mode but touches on vim keybindings occasionally#2017-05-0810:40oskarkvI am new to emacs, lost count of how many days I have already spent trying to learn and configure emacs.#2017-05-0810:40oskarkvIt's like 10. 😛#2017-05-0810:40pesterhazyhaha. Well it's the beginning of the rest of your life, so time well spent#2017-05-0810:41oskarkvSomething like paredit is like the last thing I need. But I fear I will have to do a lot of configuration to make it work nicely in evil.#2017-05-0810:41oskarkvI mean, the last thing before I'm done.#2017-05-0810:41oskarkvNot the last thing as in I don't need it. 😛#2017-05-0810:42pesterhazyyeah, using evil+structural editing is a real gap currently#2017-05-0810:42pesterhazyI'd encourage you to just use one or two commands (perhaps even with M-x so you don't have to remember the keybindings)#2017-05-0810:43oskarkvThat doesn't sound like me. 😛#2017-05-0810:43pesterhazythen when you get comfortable set your own keybindings (if you're not using spacemacs)#2017-05-0810:44oskarkvThanks! I'm gonna watch the video, then dive right in I think.#2017-05-0810:44pesterhazyhere's what I use for navigation
(evil-global-set-key 'normal ";" 'mark-sexp)
  (evil-global-set-key 'visual ";" 'mark-sexp)
  (evil-global-set-key 'normal "U" 'backward-up-list)
  (evil-global-set-key 'visual "U" 'backward-up-list)
  (evil-global-set-key 'normal "R" 'down-list)
  (evil-global-set-key 'visual "R" 'down-list)
  (evil-global-set-key 'normal "L" 'sp-forward-sexp)
  (evil-global-set-key 'visual "L" 'sp-forward-sexp)
  (evil-global-set-key 'normal "H" 'sp-backward-sexp)
  (evil-global-set-key 'visual "H" 'sp-backward-sexp)
#2017-05-0810:44pesterhazyactually I'm using a wild mix of different paredit-like modes 🙂#2017-05-0810:44pesterhazylispy-clone is really useful IMO#2017-05-0810:45oskarkvhm#2017-05-0810:45oskarkvWhat is that? It copies lines?#2017-05-0810:46oskarkvI plan on rebinding like ( ), which are for moving sentence-wise normally.#2017-05-0810:47pesterhazyclone creates a duplicate of the current form#2017-05-0810:47oskarkvBut overwriting evil is a little bit involved.#2017-05-0810:47pesterhazyI use it all the time to work on a new defn#2017-05-0810:48oskarkvHm. I guess yap p does that too? 😛#2017-05-0810:49oskarkvI use yap/dap all the time 😛#2017-05-0810:50pesterhazyyeah that's pretty similar#2017-05-0810:51oskarkvBut it doesn't work if there are blank lines. But I just created a text object in evil for "forms", any sexp delimited by () [] {}#2017-05-0810:51oskarkvSo then it would be yaf 😛#2017-05-0810:56oskarkvBy the way, I looked at all the smartparens functions in emacs. And there doesn't seem to be anything for "wrap word" or "wrap sexp".#2017-05-0810:57oskarkv@pesterhazy What functions do you use to wrap lists and words?#2017-05-0811:00pesterhazythere's this: https://github.com/Fuco1/smartparens/wiki/Wrapping#2017-05-0811:01pesterhazyI use something called evil-lisp-state-wrap#2017-05-0811:01pesterhazywhich ships with spacemacs but may be a separate package#2017-05-0811:02pesterhazysmartparens docs are not very user-friendly unfortunately#2017-05-0811:02oskarkvI wish they would list all editing commands somewhere... But I haven't found such a list#2017-05-0811:06pesterhazyI don't know why they make things so complicated#2017-05-0811:07pesterhazythere's also a couple of attempts to make things better for evil users (evil-cleverparens, lispyville)#2017-05-0811:07pesterhazyI use lispyville just for rebinding dd etc to be parenthesis-safe, a very important feature#2017-05-0811:08oskarkvI haven't read that page about wrapping yet (watching vid), but I tried to look for commands starting with "sp-" and that have "wrap", and I couldn't figure out how to wrap words and lists 😛#2017-05-0811:10pesterhazyright, same here#2017-05-0817:14pesterhazyI have /Users/me/.emacs.d/elpa/dumb-jump-20161218.110 but want to try a version of dumb-jump from git. What's the normal way to do that?#2017-05-0817:15pesterhazyin Spacemacs, if that matters#2017-05-0817:42dotemacs@pesterhazy do you mind restarting emacs or not ?#2017-05-0817:42dotemacsif you don’t mind: uninstall dumb-jump. Use quelpa to install the latest version from git master: https://github.com/quelpa/quelpa#2017-05-0817:44dotemacsThe reason I say ‘restart emacs’ is because most of the functionality is already loaded into Emacs and by doing it the way I described above, you avoid any potential clashes with the already loaded functions and the new ones#2017-05-0818:15pesterhazyI'm ok with restarting :)#2017-05-0819:02richiardiandreaoh didn't know about quelpa, cool stuff!#2017-05-0819:31cmackI use standard melpa and it appears to have the latest git version#2017-05-0820:13uvtcNot sure if this is the place to post this, but just installed inf-clojure, and got these warnings: https://gist.github.com/uvtc/e39b3190870ad415cb4e97d41d7e78f5#2017-05-0820:19richiardiandrea@uvtc I think they are worth an issue#2017-05-0820:19richiardiandreajust make sure you have clojure-mode installed#2017-05-0820:19uvtcThanks. Yes, I (must) have clojure-mode installed...#2017-05-0820:20richiardiandreathe first warning is innocuous I guess, but the second is weird and needs fixing probably#2017-05-0820:22uvtcHow can I see which version of clojure-mode I've got installed?#2017-05-0820:24uvtcHm. Looking in ~/.emacs.d/elpa, the directory is named clojure-mode-20141101.1. But... 2014? Hm...#2017-05-0820:25uvtcAh. M-x clojure-mode-display-version.#2017-05-0820:29uvtcThanks, @richiardiandrea .#2017-05-0821:12richiardiandrea@uvtc I'll have a look at that issue, thanks for reporting#2017-05-0821:24adamfreydoes anyone know which Emacs command/function adds the prompt “Lisp expression: ” to the mini-buffer? Something in my set up seems to be triggering this prompt frequently (once a minute or so) and I haven’t been able to track it down yet.#2017-05-0821:36dpsuttonM-:#2017-05-0821:37dpsuttonis eval-expression#2017-05-0821:37dpsuttonthere was a bug in CIDER recently on jack-in (?) maybe that triggered this#2017-05-0821:38dpsuttonah but the function getting called is read somewhere#2017-05-0821:38adamfreyI’ve seen that, but the prompt that eval-expression shows is Eval:#2017-05-0821:38adamfreyinstead of Lisp expression:#2017-05-0821:38dpsuttonit's read#2017-05-0821:38dpsuttoneval (read) in a scratch buffer#2017-05-0821:39adamfreyyes thank you.#2017-05-0821:39adamfreySo, I’m not using Cider, I switched to inf-clojure, and that was close to when I started seeing this happen#2017-05-0821:39dpsuttonah#2017-05-0821:40dpsuttoni don't see any usages of read in inf-clojure though#2017-05-0821:40adamfreynot this one? https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L909#2017-05-0821:41dpsuttonwell then, i will never use github's search again#2017-05-0821:41dpsuttonyeah i would dig around in those and see which one could be nil#2017-05-0821:41dpsutton(read nil) asks for the input from the minibuffer#2017-05-0821:41adamfreyahh that’s it. There’s only three or so, I’ll check them out#2017-05-0821:42adamfreythanks so much!#2017-05-0821:48adamfreyfor posterity and anyone who reads this later, I ran a toggle-debug-on-quit and got this stacktrace:
read-minibuffer("Lisp expression: ")
  read(nil)
  inf-clojure-arglists("update")
  inf-clojure-eldoc-arglists(#("update" 0 6 (fontified t)))
  inf-clojure-eldoc()
  eldoc-print-current-symbol-info()
  ...
  timer-event-handler...

so it looks related to eldoc
#2017-05-0822:05dpsutton@richiardiandrea ^#2017-05-0822:06adamfreywhen I try running inf-clojure-eldoc I get eldoc error: (end-of-file)#2017-05-0822:07adamfreyI’m going to try a simpler project, instead of this work app#2017-05-0822:07richiardiandrea@adamfrey are you on the last inf-clojure?#2017-05-0822:07dpsuttonwhich clojure are you using? jvm, lumo, etc#2017-05-0822:07richiardiandreabecause I thought I fixed exectly that#2017-05-0822:07dpsuttonin the recent 2.0?#2017-05-0822:08adamfrey20170507.233#2017-05-0822:08adamfreyI’m in a jvm repl#2017-05-0822:08richiardiandreait might be a bug...lemme check#2017-05-0822:09dpsutton
let* ((arglists-snippet (format (inf-clojure-arglists-form) fn))
         (arglists-result (inf-clojure-results-from-process (inf-clojure-proc) arglists-snippet))
         (arglists-data (read arglists-result)))
#2017-05-0822:09dpsuttonlooks like an unchecked inf-clojure-results-from-process#2017-05-0822:10dpsuttonif that comes back nil then you have the blocking read in the minibuffer#2017-05-0822:10richiardiandrearight#2017-05-0822:10richiardiandreamini Andrea bug 😄#2017-05-0822:10richiardiandreasorry about that, I am fixing#2017-05-0822:11dpsuttonha#2017-05-0822:11richiardiandreathis should do: (arglists-data (when arglists-result (read arglists-result)))#2017-05-0822:18richiardiandreathanks @adamfrey for reporting!#2017-05-0822:18adamfreyno problem. Are you cutting a new version?#2017-05-0822:19richiardiandreathat's up to @bozhidar, but the patch is there#2017-05-0822:20adamfreyoh ok#2017-05-0822:20richiardiandreapretty sure we'd need a 2.0.1#2017-05-0823:56qqqis there an easy way to intent all of the bindings of a let ?#2017-05-0823:56qqqi.e. for all binding-expr pairs, I want the start of all exprs within the let to line ujp#2017-05-0900:09richiardiandrea@qqq try clojure-align#2017-05-0900:12qqq@richiardiandrea ++#2017-05-0900:12qqqshould I bind this to a hot key or to have it run after every return ?#2017-05-0900:13qqqso clojure-align works for let/case, but not for 'match'#2017-05-0900:14qqqhow do I hack it to extend clojure-align to also work on 'match' ?c#2017-05-0900:17richiardiandreadon't about ux, i use it very rarely. about the last question, probably the answer is to open an issue in clojure-mode#2017-05-0900:18qqqi was lookinat at source code#2017-05-0900:18qqqbut can't find the var where let/case is defined#2017-05-0900:19qqqI expect it to be something I can fix in 1 line if only I can find the right var 🙂#2017-05-0905:46bozhidar@qqq https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L1014#2017-05-0905:47bozhidarBtw, you're not really supposed to use this as an interactive command - there a defcustom that enables this alignment by default.#2017-05-0905:47bozhidarclojure-align-forms-automatically#2017-05-0905:48bozhidar@richiardiandrea I'll cut a new version of inf-clojure once this patch is merged#2017-05-0905:49bozhidarI wonder why no one reported this in over a week, though#2017-05-0906:45qqq@bozhidar : very nice; thanks!#2017-05-0911:16borkdudeI want to add a ‘before-save-hook to indent my Clojure code. How do I add this for only Clojure files?#2017-05-0913:58bozhidarYou can simply check the mode in the hook. Or create a local hook.#2017-05-0915:14adamfreyI was dealing with the inf-clojure problem for a week, but I didn’t get around to reporting it until yesterday. Maybe others hadn’t updated their packages?#2017-05-0916:29ballpointcarrot@borkdude another option (depending) is https://github.com/Malabarba/aggressive-indent-mode , which indents after any buffer change (that’s better or worse depending on how you feel about it)#2017-05-0918:16borkdudeOne of the problems with automatic indentation on save is that in some files indentation becomes tediously slow on my machine (a few seconds). Don’t know exactly why this is, it’s not in all files.#2017-05-0918:59qqqclojure align is beautiful#2017-05-0919:00qqqI can't believe I ever lived without it#2017-05-0920:16jakemccI used aggressive-indent-mode for a long time and found myself needing to turn it off with long files. Eventually I turned it off completely and was amazed at how much smoother the editing experience was.#2017-05-0922:19ghosss@borkdude this is how I've been indenting on save for clojure (and elisp) files:
(defvar auto-indent-modes
  '(clojure-mode emacs-lisp-mode))

(defun indent-maybe ()
  (when (member major-mode auto-indent-modes)
    (indent-region (point-min) (point-max))))

(add-hook 'before-save-hook #'indent-maybe)
#2017-05-1009:40qqqon OSX, what font do people use? I used to use Monaco, but while it's nice at 12, it's hard to read at 10#2017-05-1009:45mccraigmccraig@qqq i'm using https://github.com/tonsky/FiraCode which is most easily installed if you use https://github.com/railwaycat/homebrew-emacsmacport#2017-05-1009:47qqqIsn't this the same dev who created datascript?#2017-05-1009:47qqqThis must be the michangelo of our generation.#2017-05-1013:48verma@qqq I use “Ubuntu Mono”, I change fonts pretty often, but Ubuntu Mono seems to have stuck 🙂#2017-05-1014:00cmackI like Adobe Source Code Pro 14, myself#2017-05-1014:01gonewest818I use Inconsolata 12 in emacs and terminal. https://fonts.google.com/specimen/Inconsolata#2017-05-1015:00richiardiandreaCool stuff! I use Inconsolata-dz for everything 😀 It gives better 0 and apices #2017-05-1100:22agSource Code Pro user here. used Input Mono for a few years before that. Another favorite I use in terminal is Hermit#2017-05-1106:10shemfiracode ligatures are quite sweet, i use it both in macos and kubuntu#2017-05-1106:16qqqThis sounds stupid: how do I install firacode on osx ? I downloaded the zipk opened it, and now have folders named eot, otf, ottf, woff, woff2#2017-05-1106:17qqqwhich one of these do I install? how do I instal it so I can use it in emacs#2017-05-1107:22qqqgot it working, just copy/paste into Library/Fonts#2017-05-1108:41borkdude@ghosss Thanks!#2017-05-1113:21verma@qqq I usually just double click on the TTF/OTF file, and OSX gives me a preview and an “Install” button.#2017-05-1116:23mattly@qqq I extracted SF Mono from the system files and use that#2017-05-1116:24mattlyare there any other spacemacs users here, and if so, have you been experiencing frequent 100% CPU hangs recently?#2017-05-1119:32ustunozgurAlso Rum. #2017-05-1120:17qqqdid 'eshell' sudeenly brea for anyone else?#2017-05-1120:17qqqthis morning, eshell no longer works for me, it freezes at 'lolading em-unix ... done'#2017-05-1120:17qqqso then I (1) deleted ~/.emacs.d , (2) put back my init.el -- still freezes#2017-05-1120:17qqqthen I restart machine -- still freezzes#2017-05-1120:19qqqokay, if I nuke all of ~/.emacs.d , then eshell works again#2017-05-1120:19qqqso must be something wrong with my init.el#2017-05-1120:24qqqOkay, found the problem. It's with some code I added due ot fira code. Something here causes eshell to hang:
;;  (let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)")
;;             (35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)")
;;             (36 . ".\\(?:>\\)")
;;             (37 . ".\\(?:\\(?:%%\\)\\|%\\)")
;;             (38 . ".\\(?:\\(?:&&\\)\\|&\\)")
;;             (42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)")
;;             (43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)")
;;             (45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)")
;;             (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)")
;;             (47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)")
;;             (48 . ".\\(?:x[a-zA-Z]\\)")
;;             (58 . ".\\(?:::\\|[:=]\\)")
;;             (59 . ".\\(?:;;\\|;\\)")
;;             (60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)")
;;             (61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)")
;;             (62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)")
;;             (63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)")
;;             (91 . ".\\(?:]\\)")
;;             (92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)")
;;             (94 . ".\\(?:=\\)")
;;             (119 . ".\\(?:ww\\)")
;;             (123 . ".\\(?:-\\)")
;;             (124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)")
;;             (126 . ".\\(?:~>\\|~~\\|[>
#2017-05-1120:25qqqAnyone know what? This is literally from copying/pasting: https://github.com/tonsky/FiraCode/wiki/Setting-up-Emacs#2017-05-1213:09benedek@qqq are you on osx?#2017-05-1213:10benedekah looking at history, you are#2017-05-1213:10benedekif you are using the emacs build quote above by @mccraigmccraig you don’t need this i think#2017-05-1216:51qqq@benedek : I am on OSX. Withtout the above, -> shows up as two chars, not a single ligature.#2017-05-1217:23benedekare u using the osx specific emacs build?#2017-05-1217:23benedekthat has built in support I think#2017-05-1218:38qqqhmm, I actually don't know#2017-05-1218:38qqqhow do I figure out?#2017-05-1219:52benedekwhat does M-x version tell you?#2017-05-1407:33stardivinerDoes anyone use Emacs Org-mode to generate plot image as Org-mode inline image? I have an issue here: https://emacs.stackexchange.com/questions/30849/how-to-generate-inline-plot-result-for-ob-clojure#2017-05-1520:07richiardiandreaHello folks, Emacs question, how would I model a defcustom that can replace a string or append to it AND specify the string to replace or append?#2017-05-1520:08richiardiandreausing two defcustom is of course easy to do, I was wondering if I can use only one#2017-05-1520:09richiardiandrealike type (cons symbol string)#2017-05-1520:09richiardiandreabut I would like to constrain the first symbol to replace and append#2017-05-1603:17jfntnPSA if you’re on a mac, use magit and don’t mind running the latest stable, the vfork patch in https://github.com/d12frosted/homebrew-emacs-plus makes a HUGE difference with magit#2017-05-1603:24agalso emacs-plus has --with-natural-title-bar and --with-no-title-bar options. totally dope#2017-05-1604:27jfntnhaven’t tried that!#2017-05-1605:08agor maybe planck?#2017-05-1610:55shem@qqq i use that alist with fira code and os x emacs, and had the crashing problem. the fix was to comment one row, the one starting (46 .#2017-05-1612:00mccraigmccraig@qqq if you are installed from homebrew then the railwaycat port is emacs-mac so brew info emacs-mac will tell you if you have that installed#2017-05-1702:43martinklepschI feel like something changed in recent emacs. I now get into the “Lisp Expression:” thing all the time and have no idea what’s triggering it. Anyone know what the command is called or how I can see a history of called commands?#2017-05-1702:46martinklepschit’s triggered every 5 keystrokes or so. so annoying 😣#2017-05-1703:01jeff.terrell@martinklepsch - That rang a bell, and I found the relevant conversation in the archives: https://clojurians-log.clojureverse.org/cider/2016-03-22.html#2017-05-1703:14dpsuttonin recent emacs? but you're hitting a (read nil) somewhere#2017-05-1703:14dpsuttonthere was a bug in CIDER recently fixed about that i believe#2017-05-1703:17dpsuttoni'm not seeing it now but when two lisps interact, people use read to read the stuff from the other. in emacs, read with nil passed to it means prompt the user. and something was coming back nil and causing this#2017-05-1703:17dpsuttonah, and if you use inf-clojure they just recently patched something there as well#2017-05-1703:18dpsuttonhttps://github.com/clojure-emacs/inf-clojure/commit/4e96e936a760c48d55f60b395a5ef65a69dd13cc#2017-05-1703:27martinklepschah, infact using inf-clojure. That’s all very interesting thanks @dpsutton#2017-05-1703:29richiardiandreaYep, sorry @martinklepsch, I think @bozhidar will release soon with the patch#2017-05-1705:38bozhidarSomeone should remind me about this tomorrow. 🙂#2017-05-1712:41jeff.terrellFWIW you can /remind in Slack :-)#2017-05-1715:31richiardiandreaJust tried the remind feature, neat!#2017-05-1716:14radon@richiardiandrea Regarding your question about defcustom, try
(defcustom my-replace-or-append-option '(replace . "foo")
  "The documentation for my option.
The value is a cons cell where the car is the symbol `replace' or
the symbol `append', and the cdr is a string."
  :group 'my-options
  :type '(cons (choice (const :tag "Replace" replace)
                       (const :tag "Append" append))
               string))
and you should get
Hide My Replace Or Append Option:
Choice: [Value Menu] Replace
String: foo
   [ State ]: STANDARD.
   The documentation for my option. Hide
   The value is a cons cell where the car is the symbol 'replace' or
   the symbol 'append', and the cdr is a string.
#2017-05-1716:21richiardiandrea@radon thank you ! Ended up doing that exactly! https://github.com/abicky/nodejs-repl.el/pull/11/commits/e892b031b5fac17221068c0beae488ba1200410e#diff-b7762d54d05c335e066bbf116c15ab8eR148#2017-05-1716:25radon@richiardiandrea Looking at your code, I think you want to remove the . after (cons string, and remove the quotes in front of replace and prepend. Otherwise it’s a bit wonky in the Customize interface.#2017-05-1716:25richiardiandreawill do thank you#2017-05-1716:37richiardiandreawhat do you do when you want to backfill the string functions in 24.4 to old emacs? just if on the version?#2017-05-1718:50dotemacsrichiardiandrea: have a look at this http://emacsredux.com/blog/2013/09/05/version-checks/#2017-05-1718:51richiardiandreawill do!#2017-05-1718:51richiardiandreathanks a lot#2017-05-1720:06radonSee also https://github.com/clojure-emacs/cider/blob/3be082ae4a3d0b40d360648b20fb7caa14c0a9fc/cider-compat.el#2017-05-1807:20bozhidarinf-clojure 2.0.1 is out!#2017-05-1809:52qqqhttps://github.com/clojure-emacs/inf-clojure/blob/master/CHANGELOG.md <-- is this up to date?#2017-05-1809:57dotemacsIn a blog post on Kotlin, Steve Yegge: The IDE support for pretty much every other JVM or Android language (besides Java) tends to be bolted on by a couple of community volunteers. And later: Of course, I always need to switch over to Emacs to get real work done. There’s some more bits on Emacs, the blog post is here: https://steve-yegge.blogspot.co.uk/2017/05/why-kotlin-is-better-than-whatever-dumb.html#2017-05-1810:27lepistanehow would one make money from professional clojure ide to finance it's development?#2017-05-1810:44dotemacsMaybe ask the Cursive guy 🙂#2017-05-1815:33richiardiandreaWhat if we create an OpenCollective for Emacs tooling for Clojure? I have been so frustrated here when my colleagues dismissed Clojure because: the repl does not start/ I have to know how to install too many (java) dependencies/ The ide sucks (not everybody uses Emacs unfortunately)#2017-05-1815:34dpsuttonisn't that what clojure-emacs is on github?#2017-05-1815:46richiardiandreaYes but I mean this: https://opencollective.com/lumo#2017-05-1816:11benedeksounds nice#2017-05-1816:23richiardiandreahowever, iirc Bozhidar already tried these things and has a pretty negative view on the amount of money that you can get from donations..#2017-05-1816:24dpsuttonyeah they haven't made much i don't believe#2017-05-1820:17ag@richiardiandrea IMO because it’s never done right. Someone needs to start a campaign or something. People say it just doesn’t work for open-source projects, but sometimes it does. Good example would be redux.js. Things like CIDER, Lumo (bunch of other Clojure(script)) projects could use some sponsorship, we need them to be backed up by companies.#2017-05-1820:31agIn general I think that’s what’s blocking Clojure from becoming largely successful and more mainstream. Maybe it’s possible to find companies interested in improving Leiningen and Boot, CIDER and Cursive, Lumo and Planck, Om.Next and Reagent. But how would they even know that we have that problem?#2017-05-1820:31agif nobody talks to the people that can make those decisions#2017-05-1820:32richiardiandreaLumo is getting backed up now, not big amounts, but I like OpenCollective because it shows transparency#2017-05-1820:32richiardiandreatrue that#2017-05-1820:34agSo, lets hypothetically say: if I’m a principal engineer or a CTO, and I would go to my CEO and say: “Hey can we become patrons of xyz project?“, and how would I explain the point? What we gain from doing that as a company? What’s the return of investment, etc. would be#2017-05-1820:39richiardiandreaRight so the return of investment can be debated with the maintainer#2017-05-1820:39richiardiandreaprobably we don't have a platform to do that at the moment, good point#2017-05-1823:19jfntnI think the heart of the problem is that companies who decide to support open-source make a “Xerox Park move”, but on a micro scale. There’s no measurable ROI. It’s a small investment that goes towards improving the longer term. Then you can watch just about any Alan Kay talk and understand why this almost never happens in practice, he talks about that constantly#2017-05-1912:01bozhidar@richiardiandrea https://opencollective.com/cider#2017-05-1912:02bozhidar~$1200/year - that’s pretty disappointing indeed. Seems there’s no way to sustain the development of the tooling in a focused manner.#2017-05-1912:30qqq@bozhidar : it's ridicilous how much more instagram/snapchat is valued than cider#2017-05-1913:58jumar+1 not a big deal, but I hope there will be others.#2017-05-1915:06dotemacsI just donated 100 euro to CIDER and $100 to Magit.#2017-05-1917:49blueberrytime has shown again and again that donation campains are difficult and short lived. most teams who managed to get funding around open source work did it by finding ways to package their work into a sort of product/service and convincing companies that it is worth paying/subscribing to that.#2017-05-1918:05donaldballI would reckon that some companies would pay just for access to support and the ability to help prioritize features and bug fixes.#2017-05-1918:11richiardiandreaprobably big companies are not using Emacs at all to be fair#2017-05-1918:12richiardiandreaor have a small percentage of dev doing it (in my case, I am the only one)#2017-05-1918:38blueberry@donaldball I hope, but the problem is that you have to convince them that it is important and urgent to support the project AND clojure community seems to be rather small, so how many companies can you find, and at what price point? arne (lambdaisland) recently blogged about his experience in a similar quest. Unrelated to Arne's case, Colin Fleming seems to manage to get by with Cursive, but he had put the message out early that he's putting his neck on the line and if this Cursive thing can't provide his full-time employment, there will be no Cursive any more... on the other hand, emacs is used in many more programming communities, and there is also prelude. maybe prelude could be popularized more elsewhere and used as a driving vehicle for the team to get attention, and cider clones developed for python, ruby, javascsript etc. another option is to hope for clojure to explode in popularity, and get the pool from that, but that is unlikely, at least in short/mid term...#2017-05-1918:49blueberryfor example, in the python/R datas science world, Anaconda seems to be the thing. It seems that they provide a BSD-licensed ready-made distribution of software that is otherwise notoriously hard to install and configure properly. It seems that they're doing OK. Maybe there is nothing new in business needs to be invented for CIDER, but the team definitely needs to put this on a couple levels up and try to copy some other success stories if they hope to make a sustainable living out of their amazing work on Cider.#2017-05-1918:58richiardiandreaunfortunately it is not just cider, the whole tooling story (apart from Cursive) has very low funding because of the size of the community as you just said.#2017-05-1918:58richiardiandreaI don't see an easy wait of it, the only thing is to push adoption#2017-05-1918:59richiardiandreabut it is a chicken-egg problem at this point#2017-05-1919:28dotemacs(> 💰 👅 )#2017-05-2000:57jfntnWe need a Glassdoor for the tech stack where devs can spill the beans on what's used internally at their company. On the company profile page you'd see their stack cross referenced with their financial support per project. This would make hiring managers pressure their hierarchy into making financial contributions just to be appealing to prospective employees#2017-05-2007:43dotemacsjfntn: sounds like a good idea. But who would implement this app/service ? 🙂#2017-05-2017:11benedekyeah really good idea
#2017-05-2017:12benedekthere was a similar idea on ycombinator couple of says ago#2017-05-2017:39jfntn@benedek remember what it was?#2017-05-2017:40jfntnhttp://stackshare.io sort of does that minus the contribution part#2017-05-2019:41benedekfound it https://news.ycombinator.com/item?id=14313804#2017-05-2021:28jfntnbenedek: Thanks for digging it up. Top comment is def along the lines of what I was thinking#2017-05-2022:20benedekwhat you are proposing is a bit more like marketing only. it is also a bit of name&shame, right?#2017-05-2022:23jfntnDefinitely shame 😛#2017-05-2022:27jfntnI guess the tricky part would be to identify and quantify contributions. I can think of two main types of contributions: direct financial support going towards maintainers, and open-source work done by employees. I can think of a few ways to automate that but it might be a bit flaky#2017-05-2021:04qqqHow do I change
(set-default-font "Fira Code")
to allow me to specify a font size also ? (in addition to the font family)
#2017-05-2021:05michaelwfoglemantry this:#2017-05-2021:05michaelwfogleman(set-default-font "Fira Code 12")#2017-05-2021:06qqqthat worked;#2017-05-2021:06qqqthanks!#2017-05-2022:21benedek@jfntn @dotemacs would be interested to put together something simple, POC like thing…#2017-05-2100:29qqqi'm not sure what I'm doing wrong#2017-05-2100:29qqqbut my emacs is now freezing regularly#2017-05-2100:33qqqinf-clojure appears to be what is causing the infinite looping#2017-05-2102:40dpsuttonThere's an issue opened on cider having to do with an internal drawing command in emacs. So far no information about if cider is causing it but you could see if you're having the same or similar issues#2017-05-2103:13qqqhttps://github.com/clojure-emacs/cider/issues/1992 ?#2017-05-2103:13qqq@dpsutton : is that the issue you are referring to?#2017-05-2103:14qqqyeah, sounds like my problem, except I'm not eve nusing cider#2017-05-2103:14qqqI'm just using inf-clojure#2017-05-2108:30dpsuttonwell they have no idea of a root cause so maybe chime in with a "me too, except no CIDER". they're trying to just gather information so you might have some information#2017-05-2108:34qqqyou knowwhat's weird?#2017-05-2108:35qqq@dpsutton : i'm osx. inf-clojure freezes for me. cider works fine for me.#2017-05-2108:35qqqI just switched back from inf-clojure to cider now.#2017-05-2116:09richiardiandreaMaybe it is clojure-mode?#2017-05-2117:54dpsuttonthat's what i was thinking, some kind of common component#2017-05-2213:03oskarkv@bozhidar A question about projectile if I may. I made a .projectile file in my home directory, but when I try to projectile-find-file in it I get an error https://ptpb.pw/3Wr1 Is that not supposed to work?#2017-05-2213:31jumar@oskarkv it certainly works for me - not sure about your case, though.#2017-05-2213:31oskarkvHm#2017-05-2214:36bozhidar@oskarkv Seems your projectile.cache file is corrupted.#2017-05-2214:36bozhidarDeleting it should fix the problem.#2017-05-2214:39oskarkvI don't seem to have such a file. 😛#2017-05-2214:39oskarkvI'll look into it more later. Thanks!#2017-05-2313:06adamfreydoes anyone else use inf-clojure with boot? I think it's completely busted. Running inf-clojure with lein repl works just fine, but starting an inf-clojure with boot throws an eldoc error each time you try to type something#2017-05-2313:07adamfreyhere's the stacktrace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("\\Ca*true\\Ca*" nil nil)
  #[257 "\301\302\303\304#)\207" [inhibit-changing-match-data "\\Ca*true\\Ca*" nil t string-match] 8 "\n\n(fn STRING)"](nil)
  inf-clojure--response-match-p("(js/global.hasOwnProperty \"$$LUMO_GLOBALS\")" #[257 "\301\302\303\304#)\207" [inhibit-changing-match-data "\\Ca*true\\Ca*" nil t string-match] 8 "\n\n(fn STRING)"] #<process inf-clojure<1>>)
  apply(inf-clojure--response-match-p ("(js/global.hasOwnProperty \"$$LUMO_GLOBALS\")" #[257 "\301\302\303\304#)\207" [inhibit-changing-match-data "\\Ca*true\\Ca*" nil t string-match] 8 "\n\n(fn STRING)"] #<process inf-clojure<1>>))
  inf-clojure--lumo-p(#<process inf-clojure<1>>)
  inf-clojure--detect-repl-type(#<process inf-clojure<1>>)
  inf-clojure--set-repl-type(#<process inf-clojure<1>>)
  inf-clojure-arglists-form()
  inf-clojure-arglists("nREPL")
  inf-clojure-eldoc-arglists(#("nREPL" 0 5 (fontified t face clojure-interop-method-face front-sticky (field inhibit-line-move-field-capture) rear-nonsticky t field output inhibit-line-move-field-capture t)))
  inf-clojure-eldoc()
  eldoc-print-current-symbol-info()
  #[0 "\204	\205\n\303>?\205\304 \207" [eldoc-mode global-eldoc-mode eldoc-documentation-function (nil ignore) eldoc-print-current-symbol-info] 2]()
  apply(#[0 "\204	\205\n\303>?\205\304 \207" [eldoc-mode global-eldoc-mode eldoc-documentation-function (nil ignore) eldoc-print-current-symbol-info] 2] nil)
  timer-event-handler([t 0 0 500000 nil #[0 "\204	\205\n\303>?\205\304 \207" [eldoc-mode global-eldoc-mode eldoc-documentation-function (nil ignore) eldoc-print-current-symbol-info] 2] nil idle 0])
#2017-05-2313:08adamfreyit's got a bunch of stuff about Lumo in there, when I'm running a boot repl, so I'm pretty confused. @richiardiandrea @bozhidar#2017-05-2313:10bozhidarI don’t have any time to debug this. I find it pretty odd overall that the REPL started by boot would behave differently, though.#2017-05-2314:38richiardiandreaAgree that it is odd, but there is some code that executes initially that tries to detect which repl type we are on, I will try to debug it asap, can you please report it as issue @adamfrey?#2017-05-2315:28adamfreygot it#2017-05-2406:16qqqis there a way for emacs to manave a ssh -L#2017-05-2406:16qqqso I have this ssh command whose sole purpose in line is to do port forwarding#2017-05-2406:16qqqhowever, sometimes, it hangs / I need to restart it#2017-05-2406:16qqqIs there a way to have emacs manage all this for me?}#2017-05-2414:06tanzoniteblack@qqq that sounds like a better job for a user spaced systemd unit (https://wiki.archlinux.org/index.php/Systemd/User) or whatever your init system of choice is (launchctl if you're on a mac?)#2017-05-2414:40qqq@tanzoniteblack : that's interesting; I'm not sure how to trigger the 'detect hang'#2017-05-2414:40qqqpart of the problem I have is: (1) I ssh -L, (2) I put mbp to sleep, (3) when I return , the ssh is running but the port forwarding is deadc#2017-05-2414:41qqqbut I am convincedc of one thing now, emacs is the wrong place to put this#2017-05-2414:53tanzoniteblacka quick google search finds suggestions to use http://www.harding.motd.ca/autossh/ for this use case, ( https://superuser.com/a/37768 mentioned it, as does a few others )#2017-05-2414:53tanzoniteblackand that's available in homebrew, I think, so should be painless to install and see if it does fix it for you?#2017-05-2518:16jjttjjI have a big log text file from a linux server that I now have on a windows computer with emacs. I can manipulate the file fine with clojure with line-seq, etc, but it's too big to work with. So I found some powershell incantation to extract the last n lines of a file and output it into a new file, but now when I attempt to work with it in emacs Im getting ^@ symbols between each character. Seems like some sort of encoding issue. Anyone know how I might be able to fix this?#2017-05-2518:19tanzoniteblack@jjttjj you’re only using the powershell thing because the file is too large to view in emacs? Or because you’re having problems manipulating it with clojure?#2017-05-2518:20jjttjjyeah basically I only need to work with the last X,000 lines. but it's 700mb of text so trying take-last on the line-seq isn't working so well#2017-05-2518:21jjttjjopen to other non-powershell options to work with this though#2017-05-2518:22tanzoniteblackcouple options depending on what you’re trying to do and what you have available:#2017-05-2518:22tanzoniteblackjust view/edit/search the thing in emacs directly using https://github.com/m00natic/vlfi ; which opens files in chunks#2017-05-2518:26tanzoniteblackyou can also always just use tail -n <line-count> filename > new-file.txt; while this isn’t available in powershell, it is available in emacs’ eshell#2017-05-2518:26tanzoniteblackwhich I believe works just fine on Windows as well#2017-05-2518:27tanzoniteblack(try it by invoking M-x eshell)#2017-05-2518:27jjttjjhmmm getting a command not found but vlfi should meet my needs for now, thanks!#2017-05-2614:37normanWhen I C-c C-f in cider (cider-pprint-eval-defun-at-point) It opens a popup buffer without selecting it.#2017-05-2614:37normanIf I’m only editing a clojure file, the popup buffer appears to the side and I can just C-x 1 to make my edit buffer on top#2017-05-2614:38normanHowever, if I have a clojure file and (for example) a repl open and my emacs is very big then the clojure window will split in two leaving me with three emacs sections#2017-05-2614:39normaneditor and popup buffer on top, repl on bottom. To close the popup buffer, I have to C-x o and then q#2017-05-2614:40normanThat strikes me as the kind of thing I should be able to do more easily. Any ideas?#2017-05-2614:41normanObviously I can trivially macro that and bind it to a key, but I’m wondering if there’s a more emacs way to say “close to the most recently opened thing, even if it’s not selected”#2017-05-2614:41normanIdead?#2017-05-2614:42dpsuttonso i don't think that there is anything for this, but i think we could easily make it#2017-05-2614:42dpsuttondigging through that call stack, it eventually hits cider-make-popup-buffer#2017-05-2614:42dpsuttonand marks it with this: (cider-popup-buffer-mode 1)#2017-05-2614:44dpsuttonso it looks like something along the lines of#2017-05-2614:44dpsutton(mapc #'kill-buffer (seq-filter #(lambda (b) (derived-mode b 'cider-popup-buffer-mode)) (buffer-list))#2017-05-2614:45dpsuttonobviously this syntax is wrong but that's the general idea. loop over all buffers and kill the ones which have cider-popup-buffer-mode#2017-05-2614:48normanThanks - I’ll look at that later when I’m back on on the big monitor and it hits me again#2017-05-2614:49normanI guess maybe I could also see if cider could just make sure that buffer is selected so I could just exit with “q”#2017-05-2614:49dpsuttonsounds good. feel free to ping me if you have any questions#2017-05-2614:49dpsuttonyou could possibly add a defcustom to do that#2017-05-2614:50dpsutton
(defun cider-popup-buffer (name &optional select mode ancillary)
  "Create new popup buffer called NAME.
If SELECT is non-nil, select the newly created window.
If major MODE is non-nil, enable it for the popup buffer.
If ANCILLARY is non-nil, the buffer is added to `cider-ancillary-buffers'
and automatically removed when killed."
  (thread-first (cider-make-popup-buffer name mode ancillary)
    (cider-popup-buffer-display select)))
#2017-05-2614:50dpsuttonthat's what calls things. notice that select is set to nil or not in other places#2017-05-2614:50dpsuttonbut you could change (cider-popup-buffer-display select) to (cider-popup-buffer-display (or select cider-always-focus-popup-buffers))#2017-05-2617:24jcromartieIn clojure-mode, the indentation under extend-protocol is all messed up#2017-05-2617:24jcromartienever mind#2017-05-2617:24jcromartieI just updated from package-list-packages#2017-05-2617:24jcromartieduh#2017-05-2617:25jcromartieit must have been fixed since whenever I set this up first 🙂#2017-05-2711:34bozhidar@dpsutton Yeah, perhaps we should make this configurable. Although most commands that create popup buffers have their own defcustoms for this.#2017-05-3013:25fabraoHello all, what do you think is the best file/project management for emacs to use with clojure?#2017-05-3013:29jeff.terrellProjectile? I guess it depends on what you mean by file/project management, but I think projectile fits the bill.#2017-05-3014:58fabraoYes, a something like side bar on left or right to explore files#2017-05-3014:59fabraothat can set the initial folder for start#2017-05-3014:59fabraohave you tired the project explorer?#2017-05-3015:00caioprojectile no doubt, but it has no bars#2017-05-3015:00dpsuttondired is a file browser and projectile is a project manager that lets you navigate to files easily; and then there's https://github.com/jaypei/emacs-neotree#2017-05-3015:06fabraohave you tried Project Explorer?#2017-05-3015:08fabraoin projectile you have to type the file to find, I´d preffer neotree in my case#2017-05-3015:11dpsuttonI have not#2017-05-3015:11dpsuttonyeah projectile is not the best for browsing but i use dired for that#2017-05-3015:11dpsuttonand once i've been in a project for a few days i generally know where i want to go so the fuzzy finding of projectile is great for me#2017-05-3015:12caioor just rely on avy#2017-05-3015:13caioit'll list the possibilities so you can browse the project and looks faster to me than using a visual dir tree as aid#2017-05-3020:37jumar@fabrao I'd say projectile + neotree. Spacemacs bundles them by default and they work really well for me.#2017-05-3020:37fabraothank u for information, I´ll try it#2017-05-3105:06stardivinerDoes anybody use Org-mode's ob-clojure with CIDER? I want to show result from this org-mode babel src block:
#+BEGIN_SRC clojure :session
(if true
  (do (println "Success!")
      "By Zeus's hammer!")
  (do (println "Failure!")
      "By Aquaman's trident!"))
#+END_SRC

#+RESULTS:

But I got nothing. Is there anything special I need to specify for :session header arguments?
#2017-05-3105:21stardivinerI tried :results output and :results value. none of them works.#2017-05-3119:50normanDoes anyone know of a way for two terminal emacs on the same machine to share buffers? I’m vaguely aware of server mode and emacsclient, which does not appears to do something different.#2017-05-3120:03ghosssserver and emacsclient should get you want you want. start emacs in one terminal and eval (server-start), in another terminal, run emacsclient -t, that will connect a client to the emacs from the other terminal#2017-05-3120:04ghosssI have (server-start) in my init file so that emacsclient is always available#2017-06-0103:47johnny.martin@norman could possibly just a M-x new-frame do what you need?#2017-06-0104:59johnny.martinJust tried and my emacs grumbled, This function is obsolete since 22.1; use make-frame instead.#2017-06-0112:31rickmoynihanhow can I make a cider-debug buffer read only? I keep typing changes into it and then loosing them 😞#2017-06-0113:34daveliepmannAnybody using tramp and docker-tramp to connect to files in a container running on a remote machine? I've encountered some weird behavior#2017-06-0113:49daveliepmann...`C-x C-f /docker:` only autocompletes containers when executed while in an eshell buffer in which I've already cd'd into the remote machine, which would be fine except after selecting the appropriate container, files listed are in my laptop's root directory, not the container.#2017-06-0114:25plexusAnyone know in elisp if there's a way to get to the path of the current elisp file? (i.e. the one a function is defined in, not the current buffer)#2017-06-0114:25plexusthe equivalent to Ruby's __FILE__ magic variable#2017-06-0114:26dpsutton(buffer-file-name (current-buffer))#2017-06-0114:27plexusnope, that's the current buffer, I want the file the function is defined in#2017-06-0114:27plexus
(defun unrepl-read-blob ()
  ;;TODO don't hard code this
  (get-string-from-file "/home/arne/github/unrepl.el/blob.clj"))
#2017-06-0114:27dpsuttonoh i misread "current elisp file"#2017-06-0114:27plexusblob.el is located next to unrepl.el, how do I find it?#2017-06-0114:28plexusI might have to come up with some shenanigans traversing from package-user-dir if it's not possible otherwise#2017-06-0114:29dpsuttoncan you count on the fact that they are adjacent?#2017-06-0114:31plexusyes, they are always in the same directory, I just need to find where that directory is 🙂#2017-06-0114:33dpsuttonfile-name-directory gets you the directory and then if you know the name of the other file you can combine them#2017-06-0114:33dpsuttonhttps://www.gnu.org/software/emacs/manual/html_node/elisp/File-Name-Components.html#2017-06-0114:33dpsutton(expand-file-name relfile dirname) to combine them it seems#2017-06-0114:35plexuswhat do I pass to file-name-directory though, if I don't know the location of unrepl.el?#2017-06-0114:35dpsuttonoh do you not know the location of it at all?#2017-06-0114:35dpsuttoni was assuming you were in that buffer to begin with#2017-06-0114:36plexuswell it's going to be installed by a user, so it's going to be under their package-user-dir, unrepl-x.x.x presumably#2017-06-0114:36dpsuttonshould you just load it, require it or setup a package directory file?#2017-06-0114:37plexusI think I can do something with load-file-name, will only work when loading the package with load, so it's a bit tedious for development time, but I think it will work#2017-06-0114:37plexusI can't just load it because it's not elisp, it's a clojure blob that I need to send to a repl 🙂#2017-06-0114:37dpsuttonohhh#2017-06-0114:38plexusI could add a pre-package step to turn it into elisp, wrap it in a (setq unrepl-blob ,,,) (provide 'unrepl-blob)#2017-06-0114:38dpsuttonany reason to not just defvar it?#2017-06-0114:38plexushow do you mean exactly?#2017-06-0114:39dpsutton(defvar unrepl-blob "(clojure-code to execute))"#2017-06-0114:39dpsuttonin unrepl blob and then presumably its part of the package#2017-06-0114:39dpsutton(require 'unrepl-blob) (unrepl-send-command connection unrepl-blob) or whatever#2017-06-0114:40plexusyeah that's what I meant. What's the benefit of defvar over setq here?#2017-06-0114:40plexusThis seems to work though : (setq unrepl-home (file-name-directory load-file-name))#2017-06-0114:41plexusafter doing (load "/home/arne/github/unrepl.el/unrepl.el") the unrepl-home is set correctly#2017-06-0114:41dpsuttonoh well then problem solved#2017-06-0114:43plexusthanks a lot for the help!#2017-06-0114:46dpsuttonno problem. anytime!#2017-06-0119:23escherizeoh man, i figured out how to “zoom in” and keep linum working#2017-06-0120:21oskarkvDoes anyone know how I can stop ignoring files in projectile? I want to be able to, for example, open a personal todo file that is in .gitignore.#2017-06-0121:31cmackI think you have to use normal find-file for that.#2017-06-0121:37oskarkvI found it, I think. Apparently I can use !file in .projectile#2017-06-0209:58pesterhazyExperience report: I've started using joker with fly-check as a linter and find it life-changing#2017-06-0212:04hlollidoes flycheck only work when running cider?#2017-06-0215:32jakemcc@pesterhazy joker + fly-check is super useful. Highly recommend to anyone else. Some of my vim buddies have started using joker with vim and are really liking it too. I really hope joker keeps going and gets more functionality#2017-06-0215:32jakemcc@hlolli independent of cider#2017-06-0220:37mpinghow do I prevent the backslash of escaping characters?#2017-06-0220:39dpsuttonwhat do you mean?#2017-06-0220:39dpsuttonor what is an example?#2017-06-0220:39mpingdunno if its cider mode or clojure mode#2017-06-0220:39mpingwhen I press \ emacs asks me what character I want to escape in the prompt#2017-06-0220:39dpsuttoni believe that's emacs itself#2017-06-0220:40dpsuttonit asks you in prompt?#2017-06-0223:21caioC-h k \ will show you the command it's running. at least you'll find out who's doing that#2017-06-0223:22caioI believe it's paredit#2017-06-0223:22caioyep. (paredit-backslash)#2017-06-0223:23soundguyso can it be re-bound to a different key?#2017-06-0223:23caioit's emacs. of course it can 🙂#2017-06-0321:09mping@caio tks#2017-06-0702:43qqqis there a nice way for emacs to manage two cider repls (connected to different machines/projects)#2017-06-0702:43qqqor should I run two instances of eamcs, one for each cider repl ?#2017-06-0703:10dpsuttoni can jack in to two different projects without much issue. i'd imagine cider-connect can handle it pretty well#2017-06-0705:46qqqYeah, but then things like C-x C-e#2017-06-0705:46qqqI'm not sure how that works.#2017-06-0705:46qqqMy current solution is to (1) have multiple repls running (outside emacs), (2) cider connect to one of them at a time [the other ones stay alive, as they're standalone repls]#2017-06-0706:25benedekyou can have several project jacked in in your emacs. there is a. connection browser and there is a current connection#2017-06-0706:26benedekso as far as I remember you have to set your current connection to the right repl when you move between projects...#2017-06-0706:26benedekor was this improved @dpsutton lately?#2017-06-0706:28benedekif you use C-u C-x C-Z on a namespace that also selects the right repl connection for you#2017-06-0706:29benedekabove key combo is to jump to the right repl for the namespace and also set the ns in the repl#2017-06-0709:52mikepjbDoes anyone know how to do a search replace for a new line (e.g replace all commas with a newline) in emacs without using quoted-insert` (C-q C-j)#2017-06-0709:53mikepjbcoming from vimland it seems like this process should be much easier and I'm missing something like s/,/,\r#2017-06-0712:58dpsuttonthe connection browser needs work. i think it just shows the session ids which isn't really helpful ha#2017-06-0713:22benedekta @dpsutton but is there some smartness in place to figure out to which repl to send a form to for evaluating or is it always the current repl connection?#2017-06-0713:23dpsuttonsometimes#2017-06-0713:23dpsuttonsomethings call out to just (cider-current-connection) and somethings call out to cider-map-conncetions#2017-06-0713:23dpsuttonand the latter does some stuff looking by project, etc#2017-06-0713:24dpsuttoni'm not sure how smart (cider-current-connection) is as its tough to know what its value will be in any given buffer#2017-06-0713:27benedekok so i am bit confused for a good reason. ta for the update#2017-06-0713:31dpsuttonyeah#2017-06-0713:31dpsuttoni have a long term goal to make the connection a required parameter at the very beginning of the interaction#2017-06-0713:32dpsuttonand that gets passed around#2017-06-0713:32dpsuttonit was a source of the clojurescript repl becoming a clojure one a while ago#2017-06-0713:33dpsutton
(defun cider--guess-cljs-connection ()
  "Hacky way to find a ClojureScript REPL.
DO NOT USE THIS FUNCTION.
It was written only to be used in `cider-map-connections', as a workaround
to a still-undetermined bug in the state-stracker backend."
#2017-06-0714:14mikepjbC-o works, it seems weird that I can't find a text visible representation of newline to use when using replace-string or replacing-regexp#2017-06-0718:06jjttjjis there a way in cider to automatically refer-all from clojure.pprint/clojure.repl no matter what ns the repl is in?#2017-06-0718:12jjttjj(I guess eldoc mode and cider-repl-use-pretty-printing helps but it would still be nice to auto refer in those namespaces if possible)#2017-06-0718:29dpsuttonyou mean just for repl output?#2017-06-0718:29dpsuttonthe worry about auto referring to those vars would be if you accidentally used the functions in your namespace it would only work under CIDER (including deploying to production)#2017-06-0719:10jjttjjgood point, for some reason i was under the impression that lein repl did that or another editor but I see that's not the case so I can see why it's best to avoid#2017-06-0719:11jjttjjactually I used nightcode at a clojurebridge recently, which has that behavior out of the box and I kind of liked it, but I see that it's kind of unique to nightcode#2017-06-0723:53oskarkvI'm trying to use cljr-remove-let but I'm getting the error "refactor-nrepl is unable to build an AST for game.tile-sets. tools.analyzer encountered the following problem: No namespace: user found" Anyone knows what's going on? I don't see what the user namespace has to do with anything, and it's exists too. cider-refresh works.#2017-06-0802:08richiardiandrea@oskarkv other then opening an issue on clj-refactor I would not know what else to say. It can be too many things, a sample repo could help#2017-06-0808:00jumarI'm trying to hotload dependency into the running repl via cljr-hotload-dependency (or cljr-add-project-dependency). Most of the times (using regular clojure libraries) it works. However, I'm not able to load some java libraries e.g. [org.openjdk.jol/jol-core "0.8"]#2017-06-0808:01jumarAny reason why it doesn't work? Any prerequisites that a dependency must met to be able to hotload it?#2017-06-0808:24benedeknot aware of any such prerequisites #2017-06-0808:24benedekwhat is the error you getting?#2017-06-0808:24benedekI guess you can have problems if there are dependency clashes...#2017-06-0808:25benedekthat greatly depends on you project tho#2017-06-0813:03jumar@benedek
error in process filter: can't find artifact ''
#2017-06-0813:03jumarin case of cljr-add-project-dependency, it's not found at all.#2017-06-0813:03jumarIf I add the dependency to my project.clj and restart the repl it works without issues#2017-06-0813:30benedekhm… wonder if it is due to a limitations of what repos we are checking for the artefact…#2017-06-0906:42jumarthat dependency is in central maven repo: https://mvnrepository.com/artifact/org.openjdk.jol/jol-core However, reading cljr-add-project-dependency documentation: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-project-dependency > Completing read among artifacts from clojars, and a selection from maven central.#2017-06-0906:42jumarI'm not sure what the "selection from maven central" means#2017-06-0906:52jumarI think I've found it: https://github.com/clojure-emacs/refactor-nrepl/blob/master/src/refactor_nrepl/artifacts.clj#L86#2017-06-0906:53jumarOnly artifacts matching [group-ids #{"com.cognitect" "org.clojure"}] are fetched from maven central#2017-06-0907:14benedekthat is weird, probably performance tweak… care to file an issue?#2017-06-0907:27jumarno problem - Maybe it makes sense to limit the results for cljr-add-project-dependency, but "hotload-dependency" could work.#2017-06-0907:28jumarUsing alembic directly can help in this case: (alembic.still/distill '[org.openjdk.jol/jol-core "0.8"]#2017-06-0907:46benedekso you can do that obviously if you add this manually to your project.clj and invoke hotload dependency#2017-06-0907:47benedekhttps://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-hotload-dependency#2017-06-0907:47benedeki guess reasoning behind this limitation is that would be very ineffective to retrieve everything from maven central for you to select from with add proj dep#2017-06-0914:29stardivinerI want to use Org-mode babel to generate inline plot image with Incanter or other Clojure plotting library. Here is the question: https://emacs.stackexchange.com/questions/30849/how-to-generate-inline-plot-result-for-ob-clojure And I'm trying one way: try to output image to =stdout= instead of a file:
#+BEGIN_SRC clojure :session :results file :dir "data/images" :file "clojure-babel-figure-result.png"
(use '(incanter core stats charts io))

(def my-plot (function-plot sin -10 10))

my-plot
#+END_SRC

#+RESULTS:
[[file:/home/stardiviner/Org/Projects/data/images/clojure-babel-figure-result.png]]
But the result file is empty.
#2017-06-1010:35stardivinerI want to know how to output image to stdout so that Org-mode babel can pipe output to a file result. (Assume Org-mode Babel can handle this)#2017-06-1010:36stardivinerI want to know how to output image to stdout so that Org-mode babel can pipe output to a file result. (Assume Org-mode Babel can handle this)#2017-06-1213:46hkjels@U28FF36Q4 I’m not entirely sure I understand your question, but inlining plots can be done without setting a result-flag#2017-06-1213:50hkjelshttps://orgmode.org/worg/org-tutorials/org-plot.html Note that all of the orgmode documents are org-files, so you can view their source by clicking the button at the very bottom#2017-06-0914:33stardivinerI want to know how to output image to stdout so that Org-mode babel can pipe output to a file result. (Assume Org-mode Babel can handle this)#2017-06-0919:01qle-guenhey I'm getting these errors in spacemacs, auto-completion not working: https://gist.github.com/qleguennec/97516fca6f2011778e2052e63cf8a765#2017-06-0919:03qle-guenit seems to be an error in the company package, has anyone ever get this kind of error?#2017-06-1010:36stardivinerI want to know how to output image to stdout so that Org-mode babel can pipe output to a file result. (Assume Org-mode Babel can handle this)#2017-06-1008:12stardiviner@qle-guen Try to load company with (require 'company), it it does not define variable company-frontends, then you need to re-install company package. If it does not solve this problem, then report but to company-mode issues.#2017-06-1707:46plexusare you still supposed to wrap (require 'cl) in eval-when-compile?#2017-06-1708:47dotemacswhy would you not want to do it @plexus ? 🙂#2017-06-1708:48dotemacsand why not use cl-lib instead?#2017-06-1708:48plexusit just always seemed so much useless ceremony to me. What's the harm of simply loading it?#2017-06-1708:48plexusI'm using case, seems that's not in cl-lib#2017-06-1708:49plexusrelated question, is it fair to limit a new package to be only compatible with Emacs 25.1 or up? 🙂#2017-06-1708:51plexusMy Travis tests are currently running on 24.3, and already ran into several things. No alist-get, <= doesn't have a three-arity version#2017-06-1708:51plexusit least let-alist has an ELPA package but seems there's no backport for alist-get#2017-06-1708:51dotemacswell the reason people wrap it, is so that your package when byte compiled doesn’t have to depend on cl… as for the compatibility with Emacs version, that’s kind of up to you, right ?#2017-06-1708:51dotemacsdo you anticipate that there will be a large userbase on 24.3 ?#2017-06-1708:52plexussure, I just have no idea how many people still use older versions#2017-06-1708:52plexusmost people I know seem to update fairly quickly, but I imagine there's a large contingent that doesn't#2017-06-1708:53dotemacsthat’s just a guess#2017-06-1708:53dotemacsmaybe there should be yearly survey on emacs versions and package usage#2017-06-1708:53dotemacsor maybe more like quarterly#2017-06-1708:53plexusthat would be pretty useful#2017-06-1708:53dotemacsyea#2017-06-1708:54plexusyearly would already be helpful, to get an idea of trends#2017-06-1708:54plexusevery time I write (cdr (assq )) or (and (<= ?0 char) (<= char ?9)) I want to throw my laptop out the window#2017-06-1708:55plexusthere's no digitp, I checked 🙂#2017-06-1708:55dotemacswell, maybe just target your own need first seeing as it’s open source#2017-06-1708:55dotemacsand then if you get enough complaints …#2017-06-1708:56dotemacs24.3 was released 4 years ago, well more like 3.5 but still#2017-06-1708:56plexusthing is it's usually harder to port to the old paradigms than vice versa... I'll see how much pain I can take#2017-06-1708:57plexusOTOH 25.1 is from last September, that's less than a year...#2017-06-1708:57plexusI'll see if I can set up a build matrix that does both, so that I can at least make sure 25.1 passes#2017-06-1708:58dotemacsyou’re testing on TravisCI ?#2017-06-1708:58plexusyes#2017-06-1708:58dotemacswell then you should be pretty good to go…#2017-06-1708:58dotemacsis this unrepl.el related ?#2017-06-1709:00plexusyeah, it's for the parser lib#2017-06-1709:01plexushttps://github.com/lambdaisland/clj-parse#2017-06-1709:04dotemacsoh, and for case just use cl-case so you can just require cl-lib#2017-06-1709:04dotemacsre clj-parse cool!#2017-06-1709:05plexusugh why does emacs lisp have to be so ugly? 😭#2017-06-1709:05plexusbut thanks, that's a good tip!#2017-06-1709:05plexuslearning lots of new things 🙂#2017-06-1709:10plexusjust realized (eval-when-compile (require 'my-own-hacks)) would allow you to define your own short convenience macros without polluting the global namespace. I wonder if the MELPA people would let that through.#2017-06-1709:12dotemacswell if https://github.com/purcell/package-lint doesn’t complain, then you’d be good to go#2017-06-1709:25plexus41:1: error: "clj-parse*" doesn't start with package's prefix "clj-parse". give me a break will ya 😉#2017-06-1709:41dotemacstry clj-parse-* 🙂 It’s probably just a regex in the linter#2017-06-1711:26andrea.crottianyone using https://github.com/yuya373/emacs-slack ?#2017-06-2223:00fabraoHello all, is there any plugin like that load an added dependency in project.clj?#2017-06-2300:50dpsuttoncheck out cljrefactor https://github.com/clojure-emacs/clj-refactor.el#2017-06-2621:06mattlydoes anyone know why clojure-mode uses font-lock-type-face for the namespace part of a keyword (that is, foo/ in :foo/bar) instead of keeping the whole keyword as clojure-keyword-face ?#2017-06-2621:08mattlyhm, the slash doesn't even have a font-lock applied to it#2017-06-2800:03richiardiandreaSo if I have a defcustom or a defvar that I want to be local to a comint buffer, where/how do I define it?#2017-06-2809:14a13@richiardiandrea I think you should use
defvar-local
instead of
defvar
, defcustom can't be local in any way. Well, you can try to apply make-variable-buffer-local to it, but it doesn't make sense.
#2017-06-2814:38richiardiandrea@a13 thanks i am going to try that, it always trips me...then .dir-locals el should be able to customize that right? I was also reading that buffers with no file need some trick for .dir-locals.el...will Google it#2017-06-2814:48dpsutton@richiardiandrea https://www.gnu.org/software/emacs/manual/html_node/elisp/Directory-Local-Variables.html specifically hack-dir-local-variables-non-file-buffer#2017-06-2815:08richiardiandrea@dpsutton awesome thanks! I was fed up with no feedback from comint so I now will have a var that will point to a file and dump there#2017-06-2816:21richiardiandreaThat command works smoothly thanks folks.#2017-06-2823:06weiis there a formatting style in Emacs that’s consistent with Cursive’s? trying to reconcile the formatting style at our company#2017-06-2823:08dpsuttoni've seen Cursive put ; single semi colon comments at the beginning of lines and this looks to be pretty ingrained into emacs to put it at the right side#2017-06-2823:08dpsuttonif that's what you're trying to do#2017-06-2823:08dpsuttonhttps://github.com/clojure-emacs/clojure-mode#indentation-options#2017-06-2823:09dpsuttonbut this will be a guide to get it going#2017-06-3007:44munenI'm trying to use register values within an isearch: C-s C-x r i a C-x r i a would normally insert the value of the register a into the buffer. However this does not work in the minibuffer. C-x closes the minibuffer window that C-s created and the value will be inserted into my previously open buffer. Is there a special command that I need to prefix the insertion with or is there another way to insert a register into a minibuffer?#2017-06-3009:18a13@munen maybe not the exact solution you want, but did you try to use swiper instead of isearch?#2017-06-3009:18a13it has much more consistent bindings, and inserting from register works as expected#2017-06-3009:22a13https://github.com/abo-abo/swiper#2017-06-3009:25a13and here's my config, if you're interested: https://github.com/a13/emacs.d/blob/master/init.org#ivy-and-related-stuff (requires use-package/quelpa though)#2017-06-3010:30munen@a13 Thanks for the tip! Swiper looks nice, but is a pretty big change^^ I'll definitively try give it a try, soon.#2017-06-3010:34a13@munen welcome! As for me, I switched (after 8 years of using isearch) to swiper in a couple of hours, the only thing i missed for a little bit was isearch-backward#2017-06-3010:40munenI have to admit that I'm normally using evil-search-forward or /, because of 15 years of muscle memory(; I'm only using C-s when recording macros, because evil-search-forward will not throw an error when reaching the bottom of the buffer, but wrap back to the top. That makes it harder to write macros that can be repeated for the current buffer. I'm not really searching for a 'more powerful' search. But maybe I'm missing out and I'm very happy to give swiper a spin after such a good recommendation. Thanks, again^^#2017-06-3010:41a13I see!#2017-06-3016:42jjttjjI keep getting the following error when trying to cider-jack-in
error in process sentinel: Could not start nREPL server: Possibly confusing dependencies found:

[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]

 overrides

[cider/cider-nrepl "0.15.0-SNAPSHOT"] -> [org.clojure/tools.nrepl "0.2.13" :exclusions [org.clojure/clojure]]

 and

[org.clojure/tools.nrepl "0.2.12" :exclusions [org.clojure/clojure]]


Consider using these exclusions:

[cider/cider-nrepl "0.15.0-20170629.061927-20" :exclusions [org.clojure/tools.nrepl]]

but adding the :exlusions in profiles.clj doesn't seem to fix it. Anyone know what I might need to do for this?
#2017-06-3018:26aliceWould anyone in here happen to be familiar with Spacemacs? I want to write a layer as a hook for clojure-mode that will add keybind functionality for smartparens and some custom functions, but I'm unsure of how to do that#2017-06-3018:31gsnewmarkalice: try asking in #spacemacs channel
#2017-06-3018:33aliceOops, didn't realize they were segregated here#2017-07-0106:39benedek@jjttjj if you jack in you better remove cider related stuff from your profiles.clj#2017-07-0106:39benedekyou only need that if you cider connect instead of jack in#2017-07-0106:40benedeksee the related part of the cider documentation #2017-07-0113:02plexusIn case anyone here finds this useful: an Emacs Lisp library that makes association lists and hash tables feel like clojure maps#2017-07-0116:05dotemacsplexus: loving the library name!#2017-07-0116:06plexusyeah not a fan of emacs lisp naming conventions, but this is one way to make it bearable. And seems like this letter isn't taken yet 🙂#2017-07-0116:09plexus@dotemacs if you have a moment I could use a bit of help with this https://github.com/plexus/a.el/issues/1#2017-07-0116:10dotemacsSure, a bit later tonight… And to be honest, I saw that some of stuff from the header was missing and figured that you’re still tweaking it …#2017-07-0116:14plexustweaking isn't exactly the word. I'm postponing looking up the docs and figuring out what the f* needs to be there again.#2017-07-0116:14plexusthis is probably my least favorite part of writing elisp#2017-07-0116:14dotemacshaha#2017-07-0116:15dotemacsI get you 🙂#2017-07-0116:16plexusso I figured maybe I could convince someone with more experience dealing with this stuff to have a look at it 😉#2017-07-0116:26dotemacsusing emacs 24.3 as a dependency and then linting, spits this out: 35:25: error: You should depend on (emacs "25") if you need alist-get’.` So leaving your declaration of emacs 25#2017-07-0116:34dotemacswill complete this a bit later… PR will come!#2017-07-0117:11richiardiandreaAwesome, I have been meaning to ask you this!#2017-07-0207:57dotemacsSorry for the delay @U07FP7QJ0 PR is in…#2017-07-0207:58plexusThank you 😍#2017-07-0113:02plexushttps://github.com/plexus/a.el#2017-07-0113:02plexus
(setq player (a-list :name "Arne" :stats (a-list :score 99)))
(a-update-in player  [:stats :score] '+ 1)
;;=> ((:name . "Arne") (:stats (:score . 100)))
#2017-07-0116:09plexus@dotemacs if you have a moment I could use a bit of help with this https://github.com/plexus/a.el/issues/1#2017-07-0321:25hkjelsIs :noweb incompatible with the use of :var?#2017-07-0321:27hkjelsin org-mode that is#2017-07-0407:20ajsis there a way to compile/eval an entire clojure buffer using inferior lisp (not cider) ? You can eval individual top-level expressions, but I'm looking for a counterpart to the "compile whole file" key binding#2017-07-0408:03pseud@ajs I am somwhat intrigued, why not just use Cider ? You'll be missing out on the tighter intregration. Is there some problem with Cider you encountered ?#2017-07-0408:03ajsI don't like Cider. Too bloated.#2017-07-0408:04ajsHeck rich hickey and luke vanderhart and other well-known clojure folks don't use it either. a lot of the contractors I've worked with also don't like it.#2017-07-0408:05ajsi have had problems using some projects from cider with inexplicable errors that my colleagues did not have, and after long time tracking down the problem, it was due to the cider-nrepl interaction on my machine only. it's just overly complex#2017-07-0408:08pseudWhile that's a tangential discussion, it's not as if Rich & Co are infallible beings - I wouldn't adopt customs from any other person without first reflecting on why I want it. Also, even when "bloated", anything in emacs is lightweight compared to what modern machines has to endure (Electron apps, for example). And perhaps the bloatedness exists in large part to offer additional functionality. That said, try looking in mode help - (C-h m) and see if there isn't some command which sends the entire buffer over. If not, you can always write some elisp to copy over parts of the buffer to the REPL buffer for evaluation 🙂#2017-07-0408:08ajsi used cider for 2 years so it's not like i'm not speaking from experience; i'm not blindly adopting what others do, i just really don't like it.#2017-07-0408:11ajsand so far, inferior lisp solves a lot of the complexity for me. i never used nearly all cider features, so i'm getting the same experience in a much lighter, faster setup#2017-07-0408:12ajsactualy inf-clojure was created because of the popularity of inferior lisp for clojure editing. unfortunately, inf-clojure is written by the cider author, and adds some cider features#2017-07-0409:31munenajs: My comment won't add a lot to the discussion. But I for one am very happy that bbatsov is such an active contributor to the community. Saying that 'someone gives us great tooling for free' unfortunately feels mean enough that I'm saying this even though it doesn't help the question at hand.#2017-07-0409:47richiardiandreaI am currently contributing quite a bit to inf-clojure. I don't think inf-clojure adds any cider feature actually. Which one is the most worrisome for you?#2017-07-0515:16ajs@U0C8489U6 i've started using inf-clojure and it's not bad so far. hopefully it does not grow to be anything complex#2017-07-0708:56richiardiandrea@ajs Are you using version 2.0.1? Do you find completions slow?#2017-07-0709:39ajsif you are talking about autocompletion, i have not used that in any language in many years. I find autocompletion overrated, and in general a pain to set up properly in any language. I do however use the generic emacs dabbrev-expand which has always been sufficient for me#2017-07-0709:39ajsi actually find that in general autocompletion doesn't save any time for me when coding#2017-07-0710:38richiardiandreayeah agree...any slowness in something else?#2017-07-0714:35ajsi haven't found inf-clojure to be slow, except maybe the startup, which was the same as cider#2017-07-0715:19richiardiandrea@ajs yeah but that is more like nRepl's fault#2017-07-0715:20richiardiandreasocket repl should be faster in theory#2017-07-0408:13pseudIf fast and light is your concern, you are using the wrong Lisp 😛 Did you have a look to see what the inferior lisp mode offers in terms of commands ? C-h m or M-x describe-mode. Also, describe-key & describe-bindings are often helpful.#2017-07-0408:15ajsclojure is lighter and faster than common lisp for many things#2017-07-0408:15ajsi have looked at the inferior lisp docs, and can do most things i want, but was curious how others had handled whole-file compilation. i can do it easily enough at the repl, but some things in emacs are still confusing for me#2017-07-0408:16ajsactually, with regards to common lisp, it depends on your compiler. and for "lighter" i mean, as a language, clojure is much more minimal than CL#2017-07-0409:31munenajs: My comment won't add a lot to the discussion. But I for one am very happy that bbatsov is such an active contributor to the community. Saying that 'someone gives us great tooling for free' unfortunately feels mean enough that I'm saying this even though it doesn't help the question at hand.#2017-07-0409:32ajsi can appreciate the work that went into cider, but it's not for everyone. that's all. hence my reaching out to others who do things without cider.#2017-07-0409:48richiardiandrea@ajs there is an attempt for improving on cider called unrepl, still early days though#2017-07-0409:49richiardiandreathe only path forward imho is to work on alternatives, contribute as much as possible will improve things for sure#2017-07-0409:53ajsthis is entertaining reading on the subject: https://gist.github.com/levand/b1012bb7bdb5fcc6486f#2017-07-0409:59richiardiandreayep all this is nice and old 🙂 nRepl is the only working solution for now because open source contributions on other projects have been slower...I personally have lately contributed more to inf-clojure than to cider because I share this view#2017-07-0410:27ajsdo you primarily use inf-clojure in your workflow?#2017-07-0411:35richiardiandreaYep I try to, sometimes I indulge in the stability of cider 😀#2017-07-0414:41nhaAnyone use sayid? I am trying to set it up, and get “Sayid didn’t respond. Is it loaded?” when trying a command. I ran sayid-setup-package which produced no output (several times in fact). I am using spacemacs in case it matters.#2017-07-0416:20donyormnha: Did you add it to dotspacemacs-additional-packages, spacemacs will uninstall any package not defined in .dotspacemacs or needed by a layer#2017-07-0416:22nhaIt works now 🙂 It seems I just restarted the wrong repl after adding it to my lein dependencies. thanks 🙂#2017-07-0417:38donyormgreat!#2017-07-0414:42jeff.terrell@nha - You might get more targeted help if you ask in #spacemacs.#2017-07-0414:42nhaAh could be, thanks#2017-07-0414:57dotemacs@jeff.terrell sorry, not used sayid, but been meaning to… is sayid somehow more used by spacemacsers ?#2017-07-0415:00bpiel@nha Can't really talk now, but sounds like sayid isn't loaded on the clojure-side of things. Add it to profiles.clj or project.clj?#2017-07-0415:40jeff.terrell@dotemacs - Not sure. It's possible, since it is (or soon will be?) in the Clojure layer of Spacemacs by default, thanks to @donyorm.#2017-07-0415:41dotemacsthanks#2017-07-0416:22nhaIt works now 🙂 It seems I just restarted the wrong repl after adding it to my lein dependencies. thanks 🙂#2017-07-0513:52degI'm playing today with a style where I use pre/post conditions heavily in my Clojure code. I like it a lot so far, but my source files are more cluttered. Is there a cider setting or mode or hack somewhere that will customize the fontification of the {:pre ... :post ...} map in each defn?#2017-07-0612:07magnarsDid clojure-mode indentation become a lot slower lately? I regularly re-indent the whole buffer out of habit, and now it takes several seconds even in a file of only ~100 lines.#2017-07-0612:13a13works fast as usual for me#2017-07-0612:13a13try to profile it#2017-07-0612:14a13@magnars M-x profiler-start reindent your code M-x profiler-report M-x profiler-stop#2017-07-0616:43bozhidar@magnars Pretty much no changes to indentation have been done in a long while.#2017-07-0708:48magnarsThen it must have happened when I upgraded to the latest Emacs version. I've been lagging behind for a while. It's just really slow. If everyone else can reindent a largish ns in subsecond times, I guess I'll have to start bisecting my settings then. #2017-07-0709:02bozhidarI think I know what’s causing the problem, but someone is going to have to fix it.#2017-07-0709:03bozhidarhttps://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4713dd425beac5cb459704e67dcb8f6faf714375#2017-07-0709:03bozhidarhttps://github.com/clojure-emacs/cider/issues/2023#2017-07-0616:44bozhidar@munen thanks for the kind words!#2017-07-0616:47bozhidar@ajs inf-clojure adds 0 Cider features. It has more features than inferior-lisp, that’s for sure, but they are all implemented in precisely the same manner. Not sure what exactly seems excessive to you. Most of the extra functionality like eldoc, completion and font-locking is completely optional (and quite useful). Not to mention the socket REPL support.#2017-07-0618:35ajsThanks for the clarification. I've been using it and definitely have found it a lot more useful for my purposes, and enjoyable, then cider was, and that's a great contribution to the community. Thanks!#2017-07-0616:48bozhidarIt certainly won’t grow to anything complex, because it was designed to be simple, but still a bit more powerful and useful then inferior-lisp, that wasn’t even Clojure-specific.#2017-07-0616:50bozhidar@richiardiandrea unrepl is an effort to improve upon nREPL, not cider.#2017-07-0616:52bozhidarI keep believing that nREPL’s only real problem is that it’s not being developed actively anymore - don’t see anything fundamentally wrong with it. It just needs more work to become even more useful (and mostly - more cljs friendly). Unfortunately due to the bullshit that clojure-contrib carries with it, no one wants to work on the project.#2017-07-0616:52bozhidar(contributor agreement, JIRA, etc)#2017-07-0616:54richiardiandreawell it is not mine but more like a common effort started by Christophe Grand and of course many other people started to jump in (like me)#2017-07-0616:55richiardiandreaIt is basically trying to define a better, more repl-y protocol#2017-07-0616:55richiardiandreafor example you will be able to upgrade from a repl type to another (clj vs cljs) just by sending a command#2017-07-0619:28bozhidarYeah, I know what it is. I’m just clarifying that this is a (potential) replacement for nREPL.#2017-07-0708:48magnarsThen it must have happened when I upgraded to the latest Emacs version. I've been lagging behind for a while. It's just really slow. If everyone else can reindent a largish ns in subsecond times, I guess I'll have to start bisecting my settings then. #2017-07-0703:34aaelonyhave to say that Cider is really great#2017-07-0708:15bozhidar@aaelony Thanks!#2017-07-0708:45richiardiandreaMaybe folks here have some suggestion: in inf-clojure I am using comint-redirect-send-command-to-process https://github.com/emacs-mirror/emacs/blob/master/lisp/comint.el#L3717 but I found it very slow. Originally inf-clojure was using the accept-... function directly https://github.com/clojure-emacs/inf-clojure/blob/2e1dd6c1e1540223f8cc4e3493c1e555144d5431/inf-clojure.el#L716#2017-07-0714:51ajsinf-clojure follows what is set for inferior-lisp-program, or uses its own setting?#2017-07-0715:22richiardiandrea@ajs maybe I do not understand the question, but the command it executes is either lein repl or boot repl ...#2017-07-0715:23ajsfor example, was previously using inferior lisp mode and i explicitly tell emacs to run list as lein trampoline repl, which is lighter than lein repl. was curious if inf-clojure respects this emacs setting or handles things differently#2017-07-0715:23ajss/list/lisp#2017-07-0715:24richiardiandreaoh ok you need to set a defcustom: inf-clojure-lein-cmd#2017-07-0904:14moogeyIs there a way to make emacs not pop open an error buffer when a symbol can’t be resolved?#2017-07-0910:14benedekyou can make the error buffer not pop up#2017-07-0910:14benedekif that is what you mean#2017-07-0910:15benedekdon't remember the name of the defcustom but should be quite intuitive #2017-07-0910:15benedekor just check my benedekfazekas/emacsd#2017-07-0910:15benedekon github#2017-07-0910:43ajsi have a project for which I used to use cider, on a different machine. I'm trying to run it without cider, just with lein repl. i get this: Caused by: java.lang.RuntimeException: No such var: trace/traceable?, compiling:(cider/nrepl/middleware/trace.clj:13:11)#2017-07-0910:43ajsthere is no cider in my profiles.clj, my project.clj at all. i'm not even in emacs. why is it compiling cider?#2017-07-0910:44ajsi also have no profiles in .lein/#2017-07-0914:40dpsuttonyou can run lein deps :tree and see if its coming in that way#2017-07-0917:37ajs@dpsutton looks like there is a dependeny figwheel sidecar, which then depends on cider. i don't use cider. Does this mean that this project, which I am collaborating on, has a build process that is dependent on your clojure editor?!#2017-07-0917:37ajsthat seems dangerous to me to have project settings that depend on the editor a developer chooses to use, how fragile#2017-07-0917:38dpsuttonSounds like it. I'm not too familiar with cljs config but this should be listed as a plug-in or Dev dependency#2017-07-0917:38dpsuttonThe setting can probably be moved to a profile#2017-07-0917:40ajsfigwheel is listed in the project.clj :profiles :dev :dependencies, but i need to use :dev as well#2017-07-1008:41richiardiandreaI am trying to profile inf-clojure and I was triggering profile-report after a profile-start...however, nothing happens and I don't see any report...am I missing something?#2017-07-1008:44richiardiandreaok lol, I was executing profile-stop before profile-report facepalm#2017-07-1107:54chrisblom@bozhidar I have to say I'm a big fan of Cider#2017-07-1107:57chrisblomdon't listen to the haters, features != bloat 😉#2017-07-1206:57richiardiandreaIf somebody is using inf-clojure, master got some nice fix and it would be great to have some feedback on the robustness of it 😀#2017-07-1206:57richiardiandreaTry master today 👍 #2017-07-1210:22ajsanyone know where that long list of cider keybindings went? it used to be on the github main page. i can't find the in the docs either#2017-07-1210:47a13https://github.com/clojure-emacs/cider/blob/master/doc/interactive_programming.md#2017-07-1214:26ajsThanks#2017-07-1221:06adamfrey@richiardiandrea eldoc works and seems fast for a boot repl on inf-clojure master#2017-07-1316:47adamfreyI saw a screenshot of some clojure today that had a colored font-face for names in let forms: https://twitter.com/ra/status/885525643315859457 Does anyone have a set up like this in Emacs?#2017-07-1317:40mattlyooh#2017-07-1317:41mattlyit doesn't appear clojure-mode sets a face there#2017-07-1317:42mattlyis that atom?#2017-07-1317:42mattlyI'm curious how it handles destructuring#2017-07-1317:43mattlyclojure-mode only defines three faces:#2017-07-1317:43mattlycharacters, keywords, and interop-methods#2017-07-1317:49mattly...since I'm waiting for a build to finish and otherwise curious, I took a look at clojure-mode to see how the font-locking is done#2017-07-1317:50mattlyit seems we're kinda stuck with using regexes to bind to a font-lock#2017-07-1318:13andrea.crottithere is this https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode-extra-font-locking.el#2017-07-1318:13andrea.crottiin case it might help#2017-07-1318:14caioI think cider does font locking as well#2017-07-1318:14dpsuttonyes cider will "intelligently" font lock what it knows is defined#2017-07-1318:14dpsuttonbeyond just positional font lock#2017-07-1318:15dpsuttonhttp://hackingcider.com/posts-output/2017-05-10-font-lock-bug/#2017-07-1318:18dpsuttonit also knows about locals as well#2017-07-1318:18dpsutton
There are text properties here:
  cider-locals         ("m" "v" "k" "nested" "sub")
#2017-07-1318:19dpsuttonso it won't font lock locals that shadow real values#2017-07-1318:54onionpancakesDoes anyone know if there is a way to indent Hiccup vectors? Like this?
[:div
   "foo"
   "bar"]
ATM, my emacs config is aligning them like regular vectors, like so.
[:div
 "foo"
 "bar"]
#2017-07-1320:02andrea.crottifirst it would have to detect that they are Hiccup vectors#2017-07-1320:02andrea.crottiwhich might not be so easy#2017-07-1320:02dpsuttonyeah i just put the second thing on the first line so that things line up with that#2017-07-1320:04andrea.crottimm to me it gets indented like that
[:div "foo"
 "bar"]
#2017-07-1320:04andrea.crottiif that's what you mean#2017-07-1320:05dpsuttonweird.#2017-07-1320:06dpsuttonah nevermind i was misremembering#2017-07-1320:07dpsutton
[:ul {:class "nav navbar-nav"}
     [:li (hiccup.element/link-to "/Conditions" "Conditions")]
     [:li (hiccup.element/link-to "/Rules" "Rules")]
     [:li (hiccup.element/link-to "/Rules/Differences" "Rules Matrix Diff")]
     [:li (hiccup.element/link-to "/TooLong" "Too Long")]
     [:li (hiccup.element/link-to "/Mappings" "Slang")]]
#2017-07-1320:07dpsuttonthat's what mine usually look like#2017-07-1320:07dpsuttonso kinda clear but not super clear#2017-07-1320:24onionpancakesYea, I guess its fine. leaving the indents as normal.#2017-07-1321:16adamfreythis might not exist, but is there a way in Emacs to have a buffer that has the contents of both file1 and file2? So the contents are one after the other like
file1 text...
file1 text...
----
file2 text...
you can move your cursor throughout the buffer and if you save the buffer while your cursor is in the top section, file1 is saved, if it's in the bottom file2 is saved.
#2017-07-1321:17adamfreythe functionality is similar to Indirect Buffers (https://www.gnu.org/software/emacs/manual/html_node/emacs/Indirect-Buffers.html#Indirect-Buffers) but not quite the same#2017-07-1409:17ajsit used to be that to use cider, you must explicitly provide a dependency on nrepl, such as in a profiles.clj in ~/.lein but it appears that is no longer necessary?#2017-07-1409:33benedekno it is not#2017-07-1409:34benedekif you use jack-in that is#2017-07-1409:34benedekthose deps are still needed but injected at start up#2017-07-1409:35benedekyou still need them if you connect to a running REPL#2017-07-1409:49ajsthat must be something relatively new (last year or so, perhaps)#2017-07-1409:49benedekyup something like that...#2017-07-1409:50benedekquite a few other emacs clj libraries followed suit #2017-07-1409:50benedekcljr flycheck clojure for example#2017-07-1416:52mikepjbdoes anyone know how to change the default behaviour of setting a mark?#2017-07-1416:52mikepjbWhen I press Ctrl + Space the first time to set the mark#2017-07-1416:52mikepjbthe mark resets if I press Ctrl + Space again whilst inside transient mark mode#2017-07-1416:53mikepjbit’d be nice if there was a setting to deactivate the current mark instead, this seems more natural to me#2017-07-1419:27moogeyctrl + g?#2017-07-1419:27moogey@mikepjb ^#2017-07-1709:36mikepjbhaha yes thanks @moogey#2017-07-1712:26mikepjbis it possible to do non capturing regex in emacs?#2017-07-1712:27mikepjbI’m trying to write a language mode that matches if statement syntax#2017-07-1712:28mikepjbI need to differentiate between not*if*ication and if(statement) or if (statement)#2017-07-1712:28mikepjb\\(if\\|else\\)\\(?:[^A-Za-z0-9]\\) this works but captures the (/{ after the if/else keyword#2017-07-1716:38ustunozgur@mikepjb not sure, but https://github.com/joddie/pcre2el could help in discovering it, if it's easier for you to write in PCRE#2017-07-1808:48mikepjbthanks for the suggestion @ustunozgur#2017-07-1817:03ag@mikepjb I would also recommend trying M-x re-builder and helm-regexp. Awesome commands to deal with regexps#2017-07-1819:38cmackand the rx macro… https://francismurillo.github.io/2017-03-30-Exploring-Emacs-rx-Macro/#2017-07-1909:50volrathThis announcement sort of fits well in this group. I wrote https://github.com/volrath/treepy.el, a library that ports clojure.walk and clojure.zip to elisp. The docs explain some of the differences, but most of the API stays the same.#2017-07-1912:08andrea.crottianyone using this little magit extension?#2017-07-1912:08andrea.crottihttps://github.com/sigma/magit-gh-pulls#2017-07-1912:08andrea.crottiI can't get it to work sadly, always complains about bad credentials#2017-07-1917:01ag@andrea.crotti have you seen Magithub yet? It's amazing. Use that#2017-07-1917:03andrea.crottiah no looks great yes @ag#2017-07-1917:05andrea.crottimm getting authentation issues also with that though#2017-07-1917:05andrea.crottiI've set up these two (and the token works)
ghub-username     ;; your username
ghub-token        ;; your personal access token
#2017-07-1917:08andrea.crottimm nvm Igot it working, thanks @ag#2017-07-2008:55rickmoynihanJust tried to M-x package-list-packages and am getting the following certificate error. Is anyone else seeing this?
Certificate information
Issued by:          Let's Encrypt Authority X3
Issued to:          CN=
Hostname:           
Public key:         RSA, signature: RSA-SHA256
Protocol:           TLS1.2, key: ECDHE-RSA, cipher: AES-128-GCM, mac: AEAD
Security level:     Medium
Valid:              From 2017-07-17 to 2017-10-15


The fingerprint for the connection to  has changed
from sha1:4d:5c:08:57:76:20:d7:4a:32:a9:f1:bf:ea:f5:24:f6:86:35:39:82
to sha1:c6:1d:d2:98:16:53:a8:a3:7d:e0:11:f9:5a:71:4c:e0:ac:04:3e:7b
#2017-07-2009:14dotemacsJust tried it myself, worked as expected#2017-07-2011:00rickmoynihanhmmm weird#2017-07-2011:01a13@rickmoynihan do you have the same issue with your browser?#2017-07-2011:06rickmoynihanno#2017-07-2011:07rickmoynihanit asks whether I want to accept the signature, but I don’t know how to verify its authenticity… not sure why its changed.#2017-07-2011:07rickmoynihanassuming it’s not malicious, but you never know…#2017-07-2011:10rickmoynihanFirefox returns a different SHA1 fingerprint: 93:7E:38:69:59:78:77:F4:99:C4:92:EF:EB:CD:4B:F5:2B:92:DD:9A#2017-07-2015:18oskarkvThis is my first time trying ClojureScript in CIDER. Apparently I can't use js/require in CIDER, but my compiled code works in the browser. I get org.mozilla.javascript.EcmaError: ReferenceError: "require" is not defined in CIDER. Why?#2017-07-2015:52bozhidarNew EuroClojure, new CIDER https://github.com/clojure-emacs/cider/releases/tag/v0.15.0#2017-07-2015:52bozhidarEnjoy!#2017-07-2019:15ajsi'm trying to add some custom cider keybindings, but it doesn't look like the way to do it is with (define-key cider-mode-map ... emacs claims that cider-mode-map is void. any pointers?#2017-07-2019:16dpsuttonhow are you loading things? with use-package?#2017-07-2019:17ajsi have cider already loaded, and then in my .el i'm trying to add a custom keybinding.#2017-07-2019:18ajsi am using the package#2017-07-2019:25ajsoh i guess that mode map only exists as a var when the mode is active. how do you add a custom keybinding to a mode that is not active yet?#2017-07-2019:25ajssuch as in an init.el#2017-07-2019:30oskarkv@ajs That does not sound right.#2017-07-2019:31dpsuttonit may not exist until the mode has invoked once. when you first start up there are autoloads that allow you to crank of cider but the map may not exist yet#2017-07-2019:33oskarkv@dpsutton Really? How would one bind keys in that case?#2017-07-2019:33oskarkvOr maybe I'm misunderstaning#2017-07-2019:33dpsuttonyou'll make it a hook to cider mode#2017-07-2019:34dpsutton(add-hook cider-mode-hook (lambda () (define-key cider-mode-map ...)))#2017-07-2019:34dpsuttoni think#2017-07-2019:34dpsuttongive that a whilrl#2017-07-2019:34oskarkvOk, but I have never needed that for any package#2017-07-2019:34dpsuttoni've run into this very issue with org and that resolved it for me#2017-07-2019:35oskarkvMaybe use-package and general takes care of that 😛#2017-07-2019:35oskarkvSomehow#2017-07-2019:36dpsuttoni thought use-package had a straightforward way to register key bindings?#2017-07-2019:36oskarkvI'm not using use-package for that#2017-07-2019:38dpsuttonoh i see. yes i think use-package has some mechanism for this. might be good to read how they accomplish this to ensure that things exist when they modify the keybindings#2017-07-2019:38ajsi'll try adding the hook#2017-07-2019:45ajshm i think cider-mode-map is not the right map to use, maybe clojure-mode-map? i don't get the error any more but my custom bindings are having no effect with cider-mode-map#2017-07-2019:46oskarkv@ajs Oh, yes, that might be it, hehe#2017-07-2019:46ajsor, maybe clojure-mode-hook instead of cider-mode-hook#2017-07-2019:46ajsi shall try the various permutations#2017-07-2019:46dpsuttonwell cider-mode-map is for sure there#2017-07-2019:47oskarkvI don't think I have bound anything in it, hm#2017-07-2019:47oskarkvAnd I only use my own bindings#2017-07-2019:48oskarkvBut I do use cider-repl-mode-map#2017-07-2019:49oskarkv@ajs Anyway, I'm using use-package (with :ensure t) and general.el, and I have never had any problem with maps not existing.#2017-07-2019:49ajsis that lambda expression supposed to be quoted or not? i see uses of (lambda ... with and without a leading quote#2017-07-2019:50oskarkv@ajs Not quoted#2017-07-2019:51oskarkvMaybe it does not matter, but I don't quote my lambdas#2017-07-2019:52ajswell i can't seem to get any combination of these to stick#2017-07-2019:52ajsi think cider-mode-map is the correct one#2017-07-2019:52ajsit's used in the clojure-emacs examples#2017-07-2019:53oskarkv@ajs paste your code? Both the loading of cider and the bindings#2017-07-2019:54ajs@oskarkv near the end: https://gist.github.com/astoeckley/e1faa2bab0cad0c17c33f6133b4e6361#2017-07-2019:55dpsuttonlooks right to me. but also looks like spacemacs#2017-07-2019:56dpsuttonand all i mean by that is that things get complicated and I have no idea what they are doing with respect to normal mode, insert mode, etc#2017-07-2019:56ajsit's not spacemacs, but the bindings are evil-inspired. my emacs setup is actually quite lean#2017-07-2019:56dpsuttonok. just making sure we weren't fighting against layers#2017-07-2019:57ajsi'm just not able to hook into cider mode for some reason#2017-07-2020:02oskarkv@ajs Does cider-mode-map exist when you are in clojure-mode?#2017-07-2020:02ajsit doesn't appear so#2017-07-2020:02oskarkvHehe#2017-07-2020:02oskarkvDoes any of your bindings work? 😛#2017-07-2020:02ajsbut strangely some of the bindings from the default cider setup do work#2017-07-2020:03ajslike jack in#2017-07-2020:03ajsbut i get an error from my code that cider-mode-map is void#2017-07-2020:04dpsuttoncan you M-x toggle-debug-on-error or whatever and see what's going on?#2017-07-2020:05dpsuttonand what if you comment out your automatic keymap hookup, restart emacs, jack in to a project and then try to manually add a keybinding to the clojure-mode-map. would that work?#2017-07-2020:10ajslet me try some things#2017-07-2020:14ajsso a restart of emacs and resetting my experiments back to only use cider-mode-map and cider-mode-hook appear to be working now#2017-07-2020:15ajsperhaps enough settings had occurred since a restart that they were conflicting#2017-07-2020:23oskarkvHm, when I run CIDER for ClojureScript I get org.mozilla.javascript.EcmaError: ReferenceError: "require" is not defined. (rhino.clj#41) when I try to use (js/require "fs"). But my compiled code (with lein figwheel) works in the browser. Any ideas of what could be wrong?#2017-07-2021:06oskarkvHm, if I use the Node repl for cider-cljs-lein-repl then require works, but not cljsjs.mousetrap 😞#2017-07-2201:26radon@mikepjb check out https://github.com/benma/visual-regexp.el and https://github.com/benma/visual-regexp-steroids.el.#2017-07-2201:28radon@rickmoynihan this happens with recent Emacs versions on macOS, I fixed it following these instructions: https://emacs.stackexchange.com/a/18070/12534#2017-07-2222:03noogaI used emacs-live for a long time and now I’m writing my own config. I’m trying to make C-x f bring ivy with a list of recent files just like C-x C-f lets me find files in general#2017-07-2222:03noogaI can’t find it in emacs-live packs so it looks like I’m stuck 😄#2017-07-2316:29hlollihttps://scontent.ftxl1-1.fna.fbcdn.net/v/t1.0-9/20228932_1417906928258181_5300976827447074290_n.png?oh=c9bf02e11ffd6b965b23035894fadbc7&amp;oe=59FBAAA1 Elisp the most popular lisp these days?#2017-07-2317:40dpsuttoni was reading something that emacs lisp has the best debugging and tooling infrastructure ...#2017-07-2318:11richiardiandreaI am not surprised, elisp has been around for long long loong time 😄#2017-07-2321:41sundarjim thinking of taking the plunge into emacs#2017-07-2321:41sundarjalready run into a snag however: on Ubuntu, should i install emacs24 or emacs-snapshot from ppa:ubuntu-elisp/ppa?#2017-07-2321:51sundarjguess ill go with the former for now#2017-07-2322:09dpsuttoni'd say it's worth your time to find emacs25#2017-07-2322:32sundarjok sweet thanks, looks like that ppa has it#2017-07-2409:53dotemacsI’m surprised that VimL has almost twice as many “digits”/repos as Emacs Lisp#2017-07-2411:39bozhidarWell, vim is a much more popular editor, so there’s nothing surprising here.#2017-07-2411:39bozhidarKeep in mind that it’s shipped by default with every Unix-like OS in existance (`vi`‘s actually required, not vim, but most OSes ship vim anyways)#2017-07-2413:11jeff.terrell> vi's actually required In what sense? Is that some POSIX standard or something? Do e.g. lightweight special-purpose docker images still have vi? Just curious.#2017-07-2413:18dpsuttonThis utility shall be provided on systems that both support the User Portability Utilities option and define the POSIX2_CHAR_TERM symbol. On other systems it is optional. lightweight special-purpose docker images have what you put in them, right? This has more to do with an OS conforming to a standard#2017-07-2414:19dominicmI'm trying to take advantage of https://github.com/clojure-emacs/cider/pull/2027 and I've got this:
((clojure-mode
   (cider-boot-parameters . "dev")))
However it doesn't work without (require 'cider) in my init.el. Any way I can set this up such that it will work as long as cider is installed?
#2017-07-2417:05ag@U09LZR36F have you tried:
(with-eval-after-load 'cider (setq cider-boot-parameters "dev"))
#2017-07-2417:06dominicmI think dir-locals.el would mark the evaluation of that as unsafe#2017-07-2418:48agyeah, any emacs-lisp code in dir-locals would be marked unsafe (I think). You'd have to press y or !#2017-07-2419:58dominicmBut you can set certain variables marked as safe. But that's kinda pointless if the variable hasn't been loaded yet.#2017-07-3113:44radon@U09LZR36F I guess dir-locals require actual declared variables in order to work right. In the worst case you can just (defvar cider-boot-parameters) in your init.el to declare the var.#2017-07-3113:46dominicmYeah, that's the problem. Although, such a defvar would need a safe right? 😛. Back at square 1. The usage here is for people unfamiliar with emacs/init.el, taking training course or joining a project with spacemacs & such. Harder to communicate changes to init.el, when jack-in just works for other things.#2017-07-2418:09ericfodedocker run busybox vi is a thing#2017-07-2714:40richiardiandreahave you folks ever see this kind of warnings with dash.el?
/.emacs.d/packs/dev/foundation-pack/vendor/submodules/dash ((2.13.0-31-gb4faa93) %)$ cask
Warning: Unknown defun property `pure' in -remove-item
Warning: Unknown defun property `side-effect-free' in -remove-item
Warning: Unknown defun property `pure' in -non-nil
Warning: Unknown defun property `side-effect-free' in -non-nil
Warning: Unknown defun property `pure' in -replace
Warning: Unknown defun property `side-effect-free' in -replace
Warning: Unknown defun property `pure' in -replace-first
Warning: Unknown defun property `side-effect-free' in -replace-first
Warning: Unknown defun property `pure' in -replace-last
Warning: Unknown defun property `side-effect-free' in -replace-last
Warning: Unknown defun property `pure' in -flatten
Warning: Unknown defun property `side-effect-free' in -flatten
Warning: Unknown defun property `pure' in -flatten-n
Warning: Unknown defun property `side-effect-free' in -flatten-n
Warning: Unknown defun property `pure' in -concat
...many many more...
#2017-07-2715:48qqqin emacss, how do I make the string lambda stay as 'lambda' in the buffer, but look like an upsidedown y (and only take the space of 1 char for indentation purposes)#2017-07-2716:01sundarjM-x prettify-symbols-mode i think#2017-07-2717:22caio@qqq I have this in my config
(add-hook
 'clojure-mode-hook
 (lambda ()
   (push '("fn" . ?λ) prettify-symbols-alist)
   (prettify-symbols-mode 1)))

(add-hook
 'lisp-mode-hook
 (lambda ()
   (push '("lambda" . ?λ) prettify-symbols-alist)
   (prettify-symbols-mode 1)))
#2017-07-2808:31richiardiandreawoah! I have just tried xwidget-webkit-browse-url on github 😱 🙀#2017-07-2814:32jeff.terrellCare to share a screenshot? I tried it myself but Your Emacs was not compiled with xwidgets support and I don't see a relevant option to the macOS homebrew package.#2017-07-2814:53richiardiandreawill do, I am on the 25.2 snapshot of the official ppa#2017-07-2816:11jeff.terrellThanks! Very interesting…#2017-07-2815:06dpsuttoni need to recompile with that option#2017-07-2816:12jeff.terrellI'm reminded of that joke about how emacs is not a text editor but an operating system that has a text editor built-in… simple_smile#2017-07-2816:15dpsuttoni like the version: emacs is a good OS it just needs a decent text editor#2017-07-2816:16jeff.terrellAh yeah, maybe that's how I first heard it. Although IMO it has a decent text editor with evil-mode.#2017-07-2816:30qqq@richiardiandrea : what are neat ways you can script the xwidget webkit using elisp ?#2017-07-2816:31richiardiandreauhm don't know yet, for sure many 😄#2017-07-3108:43ejembabtw Evil is not the only package for modal editing ... I personaly don't like evil. But I like modal editing.#2017-07-3108:43ejembahttps://github.com/jyp/boon/ is one of the packages#2017-07-3110:24ajs@ejemba I like God-mode#2017-07-3110:47ejemba@ajs yes it looks good I forgot about this one#2017-07-3111:51hlolli@ejemba was testing boon out, do you use v and esc to activate insert mode, or do you bind it to tab?#2017-07-3111:56richiardiandreaBoon looks real nice, there are even Colemak bindings
#2017-07-3111:58hlolliI've been an Evil sceptic, but now that I feel like my fingers are getting tired after long runs of programming, I'd give something new a tr#2017-07-3114:24jeff.terrell@hlolli - Did your fingers get tired as you typed that message? 😆#2017-07-3114:26jeff.terrellI've used a lot of vim's features. Even read through the entire manual in college. I was skeptical when I tried emacs that evil-mode would be faithful enough to vim not to be painful, but I was pleasantly surprised. It's not 100% accurate to vim (nor should it be), but it's kind of amazing to me how many details transfer seamlessly.#2017-07-3114:27jeff.terrellBoon looks interesting, and more power to it, but I'm too entrenched in vim-style modal editing to want to try that experiment. simple_smile#2017-07-3116:46dominicmMy problem with evil is that I don't know emacs. So when I inevitably end up outside evil, I can't move, type, change window, etc.#2017-07-3117:06jeff.terrellThat's a fair criticism. Spacemacs tries to smooth this over by evil-ifying the keys, but there are still times I think I'd be stuck if I didn't kinda sorta know my way around using vanilla emacs bindings.#2017-07-3117:08dominicmIt's not really a problem with evil itself. It's a problem I have with moving to emacs, I guess.#2017-07-3117:12gonewest818These discussions always get me wondering how distorted my world view must be… I learned emacs in the 1980s, and since then I’ve been tempted by other editors, but I always revert back.#2017-07-3117:24jeff.terrellSerious question: are you ever hindered by pinky strain?#2017-07-3120:59gonewest818no, I’ve been fortunate enough not to have RSI issues.#2017-07-3117:19gonewest818It’s Atom and Sublime and vim that seem like a weird adjustment to me#2017-07-3117:23dominicmVim was my first serious look at editors after deliberating over emacs & vim for days. I was writing python at the time. The modal editing and not being an operating system was what skewed me to vim. I'm now very jealous of the very cool features CIDER is able to have, whilst vim is just getting async support at all, and still uses a home grown language which doesn't make sense to me at all.#2017-07-3118:53eggsyntax@dominicm FWIW, I had been vimming for many years, no emacs experience at all, and I switched to spacemacs about a year ago. There was a bit of a learning curve at first, but not too much, especially since the built-in help tools are really first-rate. You really only have to learn a very small subset of emacs-isms. And at this point I'd hate to switch back.#2017-07-3118:58eggsyntaxAnyone aware of a way to delete a sexp? That is, to delete it without copying it to the kill-ring? Sometimes I just want something gone forever. I’ve been trying to even come up with a way to do it with an emacs lisp fn…I haven’t found a way to kill-into-register, which would work; nor have I found a way to select a sexp (which would mean I could use delete-region). I'm using spacemacs' built-in sexp functionality (`evil-lisp-state`) on top of what's built into emacs.#2017-07-3119:06richiardiandrea@eggsyntax are you using paredit? That or similar structural editing facility should have that.#2017-07-3119:06dpsuttoni think it will violate his "without putting into kill-ring" requirement#2017-07-3119:07eggsyntaxYeah, I can kill-sexp with no problem.#2017-07-3119:07eggsyntaxI'm using evil-lisp-state, which is built on top of smartparens.#2017-07-3119:08dpsutton
(defun ruthlessly-kill-line ()
  "Deletes a line, but does not put it in the kill-ring. (kinda)"
  (interactive)
  (move-beginning-of-line 1)
  (kill-line 1)
  (setq kill-ring (cdr kill-ring)))
#2017-07-3119:09dpsuttonha. one suggestion: just hijack your killring#2017-07-3119:09dpsuttonhttps://stackoverflow.com/questions/637351/emacs-how-to-delete-text-without-kill-ring#2017-07-3119:09dpsuttonbut some suggestions here#2017-07-3119:09eggsyntaxOoooh, good idea, I like it. Thanks!#2017-07-3119:10dpsuttoni think the kill-ring is an emacs data structure in ring-buffer.el. so there may be some kinda "api" version of this#2017-07-3119:10dpsuttonnot sure hwat kind of assumptions and invariants it may have#2017-07-3119:10eggsyntaxYeah, I'll have to play around with that a bit.#2017-07-3119:12eggsyntaxIn #spacemacs @alandipert just suggested "a simple function that calls kill-sexp and then pops the kill ring?" -- I think that's a pretty ideal solution, can't believe I didn't think of that one 😉#2017-07-3119:30richiardiandreak cool sorry for the noise then, I should've read it more carefully 😄#2017-08-0116:32eggsyntaxNah, input always appreciated, lord knows I've misread plenty myself 😉#2017-08-0116:29acronxwidget-webkit-browse-url literally does nothing after asking me for a URL; nothing in messages, how can I find out what's going on?#2017-08-0116:31richiardiandreain my case it just works and opens the page, but I had to kill it once because it was not displaying anything#2017-08-0116:33acronHmm, doesn't appear in kill-buffer, where else would I look?#2017-08-0117:40mgrbyte@acron Is there an *xwidget-webkit* buffer?#2017-08-0208:18acron@mgrbyte No, there is not 😞#2017-08-0706:22v3gacan someone tells me why cider fails when trying to start a clojurescript repl? https://gist.github.com/anonymous/9d635eeda53d1bac1de2f592e636a4a0#2017-08-0710:36scaturr@decim - maybe you have figured this out already - but it looks like 171 of your snippet may give a clue?#2017-08-0710:36scaturrCaused by: clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec:#2017-08-0804:26v3gafunny enough it does compile outside of cider. I noticed this a few weeks ago when I first attempted to work with clojurescript doing a tutorial. It doesn’t seem to mater what project i’m in, Cider doesn’t seem to like it. I’ll be doing some more toying around this morning so I can go back and see if the stack trace is similar.#2017-08-0710:37scaturrIs a (ns) structured incorrectly? does the program build outside of cider?#2017-08-0710:37scaturrrequire instead of :require?#2017-08-0713:58hlolliI've always had some problem with cider-jack-in-clojurescript. It starts 2 repls (this can be configured) and it's matter of luck if cider recognizes that a repl is running. For my side, I'd always recommend people starting normal clojure repl and use piggyback to transform it into cljs repl.#2017-08-0721:20ag@hlolli what do you mean "problem"? When you have 2 repls you can evaluate Clojure (when you're in Clojure file) and Clojurescript (when you're in .cljs) file. Even more - you can evaluate .cljc file by just changing the mode. It even grays out things that's irrelevant for specific mode.#2017-08-0721:21agHaving two repls running simultaneously is quite nice#2017-08-0804:26v3gafunny enough it does compile outside of cider. I noticed this a few weeks ago when I first attempted to work with clojurescript doing a tutorial. It doesn’t seem to mater what project i’m in, Cider doesn’t seem to like it. I’ll be doing some more toying around this morning so I can go back and see if the stack trace is similar.#2017-08-0823:06scaturrwhat is the preferred way to edit html in emacs?#2017-08-0823:06scaturris there a decent mode?#2017-08-0823:07scaturrgoogling turns up mixed results#2017-08-0823:32scaturrnevermind! found web mode#2017-08-1005:57v3gaweb mode is awesome linked with simple-httpd so you get automatic updates. If you’re dealing with figwheel it’s not necessary but when just doing raw html…i love simple-httpd#2017-08-0823:32scaturrseems pretty solid and its relatively easy to set up#2017-08-0910:42amdt👍 for Web mode, I use it every day and it makes editing all sorts of HTML-based templates an absolute breeze.#2017-08-0910:44amdtIt's got some really nice navigation and selection abilities ('C-c C-e a' for selecting everything inside an element comes to mind) and support for folding.#2017-08-0922:57domkmIs there a setting in clojure-mode for indenting multiline strings?#2017-08-1000:51dpsuttoni think emacs has the M-q versoin#2017-08-1000:51dpsuttongive that a shot#2017-08-1002:20domkm@dpsutton That seems to remove wrapping, not indent new lines#2017-08-1002:54gonewest818at least for me, with paredit also installed, I get M-q is bound to paredit-reindent-defun:
M-q (translated from <escape> q) runs the command
paredit-reindent-defun (found in paredit-mode-map), which is an
interactive compiled Lisp function in 'paredit.el'.

It is bound to M-q.

(paredit-reindent-defun &optional ARGUMENT)

Reindent the definition that the point is on.
If the point is in a string or a comment, fill the paragraph instead,
  and with a prefix argument, justify as well.
#2017-08-1212:26hlolliI'm writing an article on emacs package, and I have an English question. Is a function binded to a key/keysequence or is a function bounded to a key/keysequence?#2017-08-1212:32chrisjdJust "bound". :)#2017-08-1212:38hlollinice, my english is sometimes flaky.#2017-08-1220:50chrisjdAnyone else getting emacs crashes on macOS lately? Seems libjpeg got upgraded to v9, but emacs (in homebrew) depends on v8.#2017-08-1220:59chrisjdbrew reinstall emacs --with-cocoa seems to have fixed it here.#2017-08-1409:46hlolli@chrisjd I made one emacs package with modules, but I don't use MacOsX, would you know if brew reinstall emacs --with-modules would include the modules (this flag needs to be given to emacs at configuration time).#2017-08-1423:27aliceHm, multiple-arity functions aren't having their bodies properly syntax highlighted for me#2017-08-1423:27aliceanyone else?#2017-08-1511:51hlollihow do you make emacs start scrolling earlier than when the cursor is jumping from the upmost or lowest position of the window?#2017-08-1511:51hlolliI used to have better scrolling config, but I was refactoring my config and must have deleted that.#2017-08-1511:58chrisjd@hlolli On your question yesterday (sorry, I was walking around town when I saw it!): brew does indeed appear to recognise the --with-modules option for brew reinstall emacs. 🙂#2017-08-1512:00hlolliok thanks a bunch for checking that out. I guess this option would have to be done in the brew package manager itself, or I just wait until Emacs includes this option by default in future versions.#2017-08-1512:50dpsutton@hlolli i think you want (setq scroll-margin 6)#2017-08-1512:55hlolliahhh, @dpsutton smooth, thanks#2017-08-1516:43escherizeOh that's a good one, @dpsutton.#2017-08-1516:44dpsuttonif there are any vimmers in here its equivalent to scroll-off. I can't stand a curson at the extreme of the buffer#2017-08-1516:44escherizeI thought it was going to be like (setq recenter-positions '(middle 0.05 0.93)) but instead it's for moving the cursor up one at a time ( right? )#2017-08-1721:19hlolliHow do I set clojure-define-indent so that this snippet
(do-at 1 (time-signature 1 4)
      (tempo (constantly 120) "Andante"))
becomes
(do-at 1 (time-signature 1 4)
           (tempo (constantly 120) "Andante"))
no matter how high vale I give it, it wont move more
(define-clojure-indent
	    (do-at '(4)))
#2017-08-1806:43ag@hlolli maybe check clojure-indent-style var?#2017-08-2714:50hlolliI recently got chromecast, and was looking around to chromecast emacs into my television. Would it be complete violation of gnu if I were to make a package using google-cast-SDK ? Or at minimum disgust free-software people?#2017-08-2818:52ag@U0CAUAKCG hmmm, interesting question. I wonder if you'd have problems publishing it to ELPA#2017-08-2818:53agbut there are other alternatives, like MELPA and marmelade#2017-08-2901:41a13AFAIK MELPA now requires plugins to be GPL-compatible too#2017-08-2909:52hlollihttps://github.com/danielfm/spotify.el I guess similar licence holds for spotify, and providing the package outside melpa should be fine#2017-08-2916:56adamfreyI'm looking at an emacs packages source and I'm seeing some functions a-merge and a-list. Does anyone recognize where those functions might be coming from?#2017-08-2917:00adamfreyfound my answer over in #cider#2017-09-0112:35lmergenanyone knows whether it’s possible to customise cljr’s behaviour of cljr-clean-ns so that it never attempts to remove unused imports ? i’m running into the situation where it’s removing imports where i only use i.e. multimethod declarations, and no specific function calls#2017-09-0112:54dpsuttoncljr-libspec-whitelist#2017-09-0112:54dpsuttoni'm seeing that in the code, looks like it would be useful to you#2017-09-0119:38agany magit experts here? Can someone help me squashing commits in the middle of a log?#2017-09-0119:40jeff.terrellYep. I do that kind of thing frequently. Want to describe your problem, or pair on it?#2017-09-0119:43agwhen I press, r i while cursor being exactly how indicated it says: Proceed despite merge in rebase range#2017-09-0119:43agI think my problem is that it's not straight history, those commits are from a feature branch#2017-09-0119:44jeff.terrellYeah, sounds right. So can you proceed anyway or does it stop you?#2017-09-0119:45agI pressed c - continue#2017-09-0119:45agbut not it shows bunch of commits that I don't expect, and at the end the log looks kinda screwed up (maybe)#2017-09-0119:46jeff.terrellDoes the magit process buffer (`$`) help illuminate what's going on?#2017-09-0119:47agthis is what it's doing git … rebase -i 3a87a0bc which is correct#2017-09-0119:49jeff.terrellIn general, I recommend dividing and conquering here: create a branch from HEAD^ (i.e. 4b874df6). Then you just have to squash the top 3 commits on the branch. After that you can rebase or even cherry-pick your final commit (`Tian`-something) atop the squashed commit and push that new history up.#2017-09-0119:49agyah, probably that's what I need to do#2017-09-0119:50agalright thanks Jeff!#2017-09-0119:50jeff.terrellSure, good luck! 👍 If you still run into problems (e.g. b/c of the merge commit), let me know.#2017-09-0119:56agI think my problem is that in my team instead of choosing one strategy: either "rebase all the way" or "merge all the time" we mix it and create tangled mess#2017-09-0119:57jeff.terrellYeah, I could see that being problematic. simple_smile FWIW I put a lot of thought into the git best practices at my company: https://github.com/RoleModel/BestPractices/#2017-09-0120:00agThanks. The problem with "best practices" is that hard to make people follow them without slapping on their hands when they don't#2017-09-0120:00jeff.terrellTrue…people are the hardest problem in programming. 😉#2017-09-0120:03agand customers.#2017-09-0120:05agsoftware development would be so great if there were no customers/clients/consumers#2017-09-0120:05agwhiny, demanding, little sons of bitches#2017-09-0814:33alpoxHi all! Has anyone encountered the problem that cider just doesn’t open a cider-repl buffer and also does not connect to the nrepl-server even though that one is running? (All after a call to cider-jack-in)#2017-09-0821:22kingmob@alpox Not personally. Have you tried falling back to cider-connect instead? That might be able to connect to some random nrepl server. Or, you can run lein repl from the command line, and use cider-connect for that.#2017-09-0910:14alpox@kingmob trying that raises a “condition-case: Symbol’s value as variable is void: helm-bookmark-map”#2017-09-1113:22kingmob@alpox I dunno what to say there, other than that helm is a separate Emacs package that integrates into a billion other things. If you’re not too invested in your existing .emacs yet, I would give Prelude a try. It’s an Emacs setup built by @bozhidar who does Clojure dev, and he ensures it all works pretty well.#2017-09-1113:32alpox@kingmob i cannot work much with different setups, sadly. Im using mostly plain spacemacs#2017-09-1113:35kingmobAhh, spacemacs is cool, but has its own way of doing packaging. Is their Cider up-to-date?#2017-09-1113:48bozhidar> @kingmob i cannot work much with different setups, sadly. Im using mostly plain spacemacs#2017-09-1113:48bozhidarThere’s no such thing as plain Spacemacs. 😄 😄 😄#2017-09-1114:07chrisspacemacs cider is up to date, it just uses elpa/melpa#2017-09-1114:08chrisare you on spacemacs develop or master?#2017-09-1114:08chrisa bugfix came across develop this morning related to helm-bookmark#2017-09-1114:08chris(get on develop anyway, it's better)#2017-09-1114:08chrisif you're there already just run a git pull#2017-09-1114:10chrisjust checked the commit, it says it fixes a void-variable error#2017-09-1114:10chris@kingmob#2017-09-1114:10chrisso that should fix you up#2017-09-1114:11kingmobThanks @chris, but it’s @alpox having Cider problems in Spacemacs.#2017-09-1114:11chrislol shit, welp#2017-09-1118:19alpox@chris thanks for the input 🙂 the Symbol... helm-bookmarks-map error is gone, but cider still doesn’t open a repl on cider-jack-in 😕#2017-09-1120:42chris@alpox: I'm not sure about not being able to jack in, but I would recommend against using cider-connect to connect to a repl running in a terminal#2017-09-1120:42chriscider does a bunch of dependency injection to get itself running, so you might find inconsistencies in versions if you do it that way#2017-09-1120:43chrisdo you have anything weird in your ~/.lein/profiles.clj#2017-09-1120:43chrisany weird plugins or versions or anything?#2017-09-1120:43chriswhat is the actual error you're getting?#2017-09-1121:59gonewest818although, the cider documentation explains what needs to be done manually if you don’t want dependencies injected automatically. https://cider.readthedocs.io/en/latest/installation/#ciders-nrepl-middleware#2017-09-1215:22jeff.terrellPSA: I just finished the Getting yourself organized with OrgMode screencast series by Rainer König, and my head is swimming with possible org-mode applications. Lots of good stuff there. First video is here: https://www.youtube.com/watch?v=sQS06Qjnkcc&amp;list=PLVtKhBrRV_ZkPnBtt_TD1Cs9PJlU0IIdE&amp;index=1#2017-09-1218:15hkjelsorg-mode is brilliant, but it’s unfortunate that it’s so tightly coupled to Emacs, for me anyways cause I’m the only emacs-user at work#2017-09-1218:38chrissame, I have to export to pdf or markdown to really give to anyone else, which is too bad#2017-09-1219:50lmergeni personally use org-trello. #2017-09-1219:50lmergenworks great when your team's using trello. #2017-09-1219:56jeff.terrellMy team is most definitely using trello. Might have to look into this.#2017-09-1321:00michaelwfoglemanpandoc is pretty essential to collaborating with emacs + org-mode#2017-09-1321:02dpsuttonfor school i have to turn things in with times new roman in word docs. so i write in org and commit, then upload as docx files from pandoc. crazy nice#2017-09-1407:33hkjelsSo, when I said org-mode, I really meant agenda, markup, babel, capture etc If everyone within a team uses Emacs and org-mode it could be a tremendous advantage, but it falls short in one way or another if not If I had the time to do a non-profit project, this would probably be it these days: https://github.com/hkjels/org/issues/2#2017-09-1516:16agigaoHey guys, how can I use leiningen in eshell? - lein: command not found#2017-09-1516:21dpsuttoni think its because its not on the exec-path. I think you can do (add-to-list exec-path "~/bin/lein").#2017-09-1516:21dpsuttonthat's probably not the syntax or commands but that's the gist of what you want, @chokheli#2017-09-1516:30agigao@dpsutton All right, thanks!#2017-09-1516:30dpsuttondid that solve it for you?#2017-09-1516:31dpsuttoni think its path related. an easier thing might be to make sure that lein is on your path and emacs is seeing that path.#2017-09-1518:10mgrbyteCheck out https://github.com/purcell/exec-path-from-shell#2017-09-1518:11mgrbyteI use this (from melpa), ensures Emacs env matches your shell#2017-09-1520:46gonewest818This works for me:
(add-to-list 'exec-path "/usr/local/bin")
(setenv "PATH" (mapconcat 'identity exec-path ":"))
#2017-09-1520:47gonewest818I needed the second line for eshell.#2017-09-1521:11gonewest818and I suppose I should say mine is the reverse of “exec-path-from-shell”, in that this just initializes the shell’s path from exec-path.#2017-09-1609:01hkjelsanyone having problems with melpa?#2017-09-1609:02hkjelsgoing to the site and search works just fine, but downloading packages seems to fail#2017-09-1609:03dotemacsSo just using it via the web browser @hkjels?#2017-09-1609:03hkjelsthat works#2017-09-1609:03dotemacsjust did M-x list-packages and they loaded in sub second…#2017-09-1609:03hkjelsdownloading using use-package fails#2017-09-1609:04hkjelsor more correctly, it says that the packages don’t exist#2017-09-1609:04dotemacsHmmm… I just installed a random packages from melpa stable#2017-09-1609:04dotemacsno issue#2017-09-1609:07hkjelsOK, I guess the problem is here then#2017-09-1609:12hkjelsSo, instead of debugging, I did the crude version of deleting packages and re-initialize and that somehow solved it#2017-09-1609:13hkjelsweird, but whatever works#2017-09-1609:51psdpHow to switch between different REPLs in Cider?#2017-09-1806:58oskarkv@bozhidar Do you know which function in cider-nrepl is the one that gets the metadata (arglists) that the dynamic font locking uses? I'm trying to fix the problem that functions defined with def instead of defn gets the wrong color. But I can't figure out how where the metadata comes from. I have tried changing ns/ns-vars-with-meta-clj and meta/var-meta but none of them seem responsible.#2017-09-1808:17oskarkvAh, now I get it 😛#2017-09-1814:38bozhidarA problem that solves itself - those are my favourite problems. 😉#2017-09-1905:30oskarkv@bozhidar Almost as good as adding features by deleting code.#2017-09-2318:14jjttjjis there any way in cider to jack-in or connect to a remote repl from Windows with putty instead of ssh? I keep getting the following error error in process filter: nrepl--ssh-tunnel-connect: [nREPL] Cannot locate 'ssh' executable#2017-09-2407:35pesterhazySure, open the ssh tunnel manually and use cider-connect instead of cider-jack-in#2017-09-2407:36pesterhazyUse the port forwarded#2017-09-2709:25qle-guenis there a way to put a breakpoint on a specific sexp instead of the wole defn ?#2017-09-2710:44jumar@qle-guen I always used only cider-debug-defun-at-point but I guess you can use #break or #dbg: https://cider.readthedocs.io/en/latest/debugging/#2017-09-2711:58qle-guen@jumar yes but for some reason that doesn't break anything#2017-09-2712:02jumarwell, it seems to work for me:
(defn my-fn [x y]
  #break (println "x and y are: " x y)
  #dbg (let [z (+ x y)]
    (dotimes [i 10]
      (println "some side effects: " i))
    (println "z is: " z)))

(my-fn 10 20)
Disclaimer: I use Spacemacs
#2017-09-2712:03qle-guenI use spacemacs too#2017-09-2712:11qle-guenand it's kinda annoying because it messes with parinfer#2017-09-2712:11qle-guenanyway there should be a way to debug a sexp with emacs#2017-09-2712:48qle-guenanybody knows how to remove a breakpoint created by cider-debug-defun-at-point?#2017-09-2712:49dpsuttonjust re-evaluate the form#2017-09-2712:52qle-guenah yes#2017-09-2712:52qle-guen@dpsutton thanks#2017-09-2816:58mikepjbdoes anyone know how to look up source code for the namespace under your cursor in emacs with clojure-mode/cider?#2017-09-2816:59dpsuttonhitting M-. should go to it, if you've loaded the namespace you are currently in#2017-09-2816:59dpsuttoncider-find-var if you have spacemacs or remapped keys#2017-09-2817:00mikepjbyes, thank you @dpsutton#2017-09-2817:00mikepjbcider-find-ns and similar are just what I was looking for#2017-09-2817:01dpsuttonits not talked about a lot, but i really like cider-browse-ns as well#2017-09-2916:00jeff.terrellI gave a lightning talk yesterday that I converted into a screencast: Enhancing your focus with OrgMode https://youtu.be/gDHE23vl9E0 I think it's a good (~14m) overview of some OrgMode features that I use daily. Hopefully it's a decent introduction to OrgMode and will entice people to check it out and maybe switch to emacs. simple_smile#2017-10-0315:01manas_marthiHi Jeff, I saw this video just now. I have similar preferences about text based tools. Thank you for sharing the features and how it is useful to you. I just installed it. One more screencast on a beginners guide on using it would be great#2017-10-0316:26jeff.terrellHey, you're very welcome! Good idea—maybe I should do that one next. Thanks for the input!#2017-09-3016:40gonewest818I have set lpr-switches to include “-o lpi=14” to produce more lines of output per page. However, when I print with print-buffer emacs itself paginates the text and inserts a header with date and buffer name and page number, and it seems to cut every page short. It doesn’t know I’m using a smaller font. What’s the setting for this? #2017-09-3021:20gonewest818ok, I got the answer from the source. By default, print-buffer uses pr to paginate, and the switches for pr will be lpr-page-header-switches. See https://github.com/emacs-mirror/emacs/blob/master/lisp/lpr.el#L168-L184#2017-09-3021:20gonewest818so therefore my init.el is now
(setq lpr-switches '("-o" "cpi=14"          ; characters per inch
                     "-o" "lpi=8"           ; lines per inch
                     "-o" "page-top=32"     ; margins in points (1/72 inch)
                     "-o" "page-bottom=32"
                     "-o" "page-left=32"
                     "-o" "page-right=32"))
(setq lpr-page-header-switches '("-l" "80") ; lines per page
#2017-10-0221:38vinnyataidehey there, anyone got hlsexp to eval region?#2017-10-0322:24a13there are tooo many useful commands in emacs 🙂#2017-10-0322:26a13as for commands autocompletion stuff: there are smex, counsel-M-x, helm-something(i don't use it, so don't know), smex and counsel-M-x (with smex installed) also can show most recent commands on top#2017-10-0406:54aghave you tried https://github.com/Wilfred/helpful ?#2017-10-0408:29a13I tried, nice thing, but doesn't integrate well with existing "describe-" functions#2017-10-0412:04gfrederickswhat is the Most Good method for adding colored pretty-printing to the repl buffer, with or without cider?#2017-10-0413:08bozhidarWith CIDER the REPL is colorful by default, you just have to enable pretty-printing. Don’t think you can do anything simpler than that.#2017-10-0418:18gfredericksI probably have a weird/old/malconfigured cider#2017-10-0418:19gfredericks@bozhidar what mechanism/library does it use for the pretty-printing/coloring? It would be cool if I had a unified approach to that, especially w.r.t. extending to custom types#2017-10-0418:21bozhidarIt’s configurable https://cider.readthedocs.io/en/latest/configuration/#pretty-printing#2017-10-0418:22bozhidarThe rest of the relevant document is here https://cider.readthedocs.io/en/latest/using_the_repl/#2017-10-0422:04gfrederickscool, thanks!#2017-10-0511:07gfredericksI would have found the pretty-printing documentation on readthedocs on my own, but when you type "pretty" into the search box it gives no results#2017-10-0511:07gfredericks¯\(ツ)/¯#2017-10-0516:57leontalbotMy cljc files when opened in Emacs get renamed .cljc.clj even if I run under clojurec-mode. Any ideas?#2017-10-0808:59valtteriI’ve been writing Clojure for a while and now I’d like to get familiar with building webapps using ClojureScript. Any setup recommendations for Emacs? I’m looking for something that’s easy to get started with. I’m familiar with Lein and Cider but I’m open to alternatives since I’m starting from scratch. Stuff I’d like to have: - auto-compile & browser live reloading - REPL to interact with I don’t yet have very clear picture of other utils I want or need but I surely want to use Emacs as the editor.#2017-10-0810:21shakdwipeeaI am currently using https://github.com/danielsz/holygrail as starting point#2017-10-0814:05valtteriThanks for the link! Setup was frustration free and after 10 minutes I’m already hacking. 👍 Only confusion was that since it was my first time with Boot, I needed to call boot dev twice for it to launch.#2017-10-0815:00shakdwipeea👍 #2017-10-0815:02shakdwipeeaThe first time is for boot setup, I think.. #2017-10-0822:14madstapSo with this setup you call cider-connect instead of cider-jack-in or cider-jack-in-clojurescript? Do you have both a clj repl and a cljs one?#2017-10-0902:54shakdwipeeaYes this launches a clojure nrepl, which you can connect using cider-connect. This provides auto compilation of cljs but I don't think this provides a cljs repl out of the box, but that can be added using https://github.com/adzerk-oss/boot-cljs-repl . The dev task will be sth like
(deftask dev
  "Run a restartable system in the Repl"
  []
  (comp
   (environ :env {:http-port "3000"})
   (watch :verbose true)
   (system :sys #'dev-system :auto true :files ["handler.clj"])
   (reload)
   (cljs-repl)
   (cljs)
   (repl :server true)))
Now from your connected repl, you should be able to call (start-repl) for the cljs repl connected with browser.
#2017-10-0906:13valtteriThat’s actually a good point. I probably want to have two REPL’s, one to interact with backend code and one with the frontend (browser). I’ll attempt to add cljs-repl to the mix later today with aforementioned instructions. Dunno though yet if REPL-driven development is as much fun with CLJS as it is with CLJ.#2017-10-1309:42qqqwhat's the emacs command for "this frame/window is bound to this buffer, and may never change"#2017-10-1318:06agpurpose.el package is what you're looking for#2017-10-1309:47mgrbyte@qqq not sure such a thing exists#2017-10-1309:48mgrbyteis that for when you want to have a separate window displaying something and you always want that something in it?#2017-10-1310:19qqq@mgrbyte: yeah, I want window/frames dedicated to cider-repl and cider-errolr#2017-10-1310:19qqqbut for some reason, these buffers tend to 'jump around'#2017-10-1310:19qqqI want dedicated windows, where I place via my window manager, for cider-error and cider-repl#2017-10-1311:43acron@qqq iirc when something like cider creates a new buffer it calls an emacs fn split-window-sensibly which, roughly, picks your biggest window and splits it in half, creating a new window#2017-10-1311:45acronyou could override split-window-preferred-function (which defaults to split-window-sensibly) and provide a fn which attempts to put windows where you want them#2017-10-1311:45acron(https://www.gnu.org/software/emacs/manual/html_node/elisp/Choosing-Window-Options.html)#2017-10-1520:12rymndhngany yasnippet users here? I have a use case where I have multiple transformations I want to apply to a user’s input. My snippet is very verbose because I’m typing out the transformation in multiple places — is there a way for me to extract the transformations out into a variable so that my template is easier to look at?#2017-10-1619:38mpinghi#2017-10-1619:38mpingis there a way to view all functions from a namespace, and jump? something like a popup would be ideal#2017-10-1619:39chrisa clojure namespace?#2017-10-1619:41dpsutton@mping check out imenu if i'm understanding you correctly#2017-10-1619:41dpsuttonif you meant clojure namespace, check out cider-browse-ns#2017-10-1619:41mpingsomething like cider-browse-ns that would allow me to jump back and forth#2017-10-1706:45jumar@mping I think that dpsutton's suggestion about imenu is a good one. If you know what ns you want, just do cider-find-ns and then invoke imenu (I do helm-semantic-or-imenu)#2017-10-1812:42andrea.crottitoday I upgraded a few packages ( > 30 since it was a while) from melpa and Emacs started acting funny#2017-10-1812:42andrea.crottiit just gets stuck when doing some random things like: - dired on a directory - opening an XML file - visiting the Messages buffer#2017-10-1812:43andrea.crottiI tried to bisect the configuration but so far could not detect what's the actual problem, and reproducing it it's very time consuming since it gets stuck for a while#2017-10-1812:44andrea.crottiany idea how to find out what's going on exactly? Is there a way which functions have been taking most of the time in Emacs?#2017-10-1813:59gonewest818I’ve never used the Elisp profiler but ... https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html#2017-10-1815:23andrea.crottimm I tried that but it seems to do nothiing#2017-10-1815:24andrea.crottithe profiler-stop doesn't give me any report or creates any buffer with the results#2017-10-1815:25dpsuttonyeah it has a very counter-intuitive interface. calling profiler-stop does not print the report, it turns off the profiler. you have to call the report while the profiler is running#2017-10-1815:26dpsuttonprofiler-start and then later profiler-report before profiler-stop @andrea.crotti#2017-10-1816:37andrea.crottihehe wtf ok 😄#2017-10-1816:37andrea.crottiI'll try thanks @dpsutton#2017-10-1816:43andrea.crottisomething to do with Helm#2017-10-1816:44dpsuttonprojectile-current-project-files seems like projectile to me. it's probably building the cache of project files#2017-10-1816:45andrea.crottiyeah well but until I don't kill the file that makes it go bonkers#2017-10-1816:45andrea.crottiit's entirely unusable#2017-10-1816:47andrea.crottibut both projectile and helm-projectile didn't really change#2017-10-1816:47andrea.crottisince last week#2017-10-1816:53andrea.crottilooks like it's projectile though#2017-10-1816:54andrea.crottiif I disable that it all works#2017-10-1817:43gonewest818out of curiosity, are you installing from melpa or melpa-stable?#2017-10-1909:05andrea.crotti@gonewest818 I was installing from melpa#2017-10-1909:06andrea.crottibut I now tried to pin both projectile and helm-projectile to melpa-stable and installed 1.4#2017-10-1909:06andrea.crottiand it still goes bonkers#2017-10-1909:06andrea.crottiso don't really get what's going on#2017-10-1911:55gfredericksI finally sorted out why my cider repl wasn't pprinting (had to remove the whidbey plugin, obvious in hindsight). Now I'd like to be able to C-u C-x C-e to print the result of the preceding expression to the buffer (which it already does), but have it pprint instead of one giant line.#2017-10-1911:55gfredericksis that a feature or will I have to get my hands dirty to monkeypatch it in?#2017-10-1914:08gonewest818cider-pprint-eval-last-sexp leaves the result in a popup buffer… I realize it’s not exactly what you asked but…#2017-10-1917:47gonewest818@gfredericks btw, I made some attempts at a cider-pprint-eval-last-sexp-to-buffer in this gist, but ended up asking a question in #cider because it’s not working as I expect. https://gist.github.com/gonewest818/5f68a092994ba135d915bf14c807329f#2017-10-2006:32v3gaI’ve just tried out squiggly-clojure and I’m experiencing extreme lag when typing. Anyone have any idea whats going on?#2017-10-2223:45fabraoHello, I could use emacs with multiple instances. Is there any way to use emacs with multiple configs? Like multiple .emacs.d?#2017-10-2301:20ag@fabrao unfortunately there's no straightforward way of doing that. you can do something like emacs -q -l ~/my-config/init.el but that requires setting user-emacs-directory in the config#2017-10-2301:22agyou can create a different user on the host machine, and launch Emacs with -u option. Which does sound a bit crazy#2017-10-2301:22agI guess you can also symlink to ~/.emacs.d and then remove it (after done playing with the config).#2017-10-2301:23agit all depends on what exactly you're trying to do#2017-10-2406:57chrisblomwhat is a good emacs package for IRC?#2017-10-2414:18gonewest818@chrisblom ERC works well#2017-10-2414:18chrisblom@gonewest818 thanks, will try it#2017-10-2414:22gonewest818Sure. You can see my config here https://github.com/gonewest818/.emacs.d/blob/master/init.el#L123-L160#2017-10-2517:00adamfreydoes anyone know how to get a list of all the files that have uncommited changes in Emacs? Either through vc.el or magit?#2017-10-2517:03chrisin what context?#2017-10-2517:03chrismagit-status has a list you can commit, or do you want it from elisp?#2017-10-2517:08adamfreyfrom elisp @chris#2017-10-2517:13chrismagit has magit-unstaged-files#2017-10-2517:14chrisand also magit-untracked-files#2017-10-2517:21chris@adamfrey#2017-10-2518:10adamfreythat's helpful thanks chris#2017-10-2608:37Macrozcider-doc opens the doc and then s opens the source but why not open the source right away along with the doc? Documentation is usually short enough that the source would fit in as well. Or perhaps Grimoire etc. with more extensive examples.#2017-10-2721:08agdoes anyone know how to grab fully qualified name of the current symbol under cursor?#2017-10-2721:09dpsuttonin emacs lisp?#2017-10-2721:09agor filepath/function-name#2017-10-2721:09agin clj/cljs#2017-10-2721:14agI guess I can use concat of (cider-current-ns) and ... something else that gets me the name of the current function, which would be?#2017-10-2721:19agokay, this does the trick:
(defun get-current-clj-fn ()
  (interactive)
  (concat
   (cider-current-ns)
   "/"
   (helm-cmd--get-current-function-name)))
for those who don't use helm, here's the src code:
(defun helm-cmd--get-current-function-name ()
  (save-excursion
    (beginning-of-defun)
    (cadr (split-string (buffer-substring-no-properties
                         (point-at-bol) (point-at-eol))))))
#2017-10-2721:22agSlight improvement:
(defun get-current-clj-fn ()
  (interactive)
  (message (kill-new (concat (cider-current-ns) "/" (helm-cmd--get-current-function-name)))))
#2017-10-2922:17dpsuttoni just set up i3 window manager and have moved some things around. now the suggestions from emacs that are normally right under the text are quite skewed and all over the place. Is there a way to fix this that anyone knows?#2017-10-2922:56munen@dpsutton I'm using i3 and Emacs. I suppose you're talking about the MiniBuffer. I never had an issue with it being skewed and didn't have to fix anything for it. I know this doesn't really help, so far. But maybe there's something responsible in your Emacs config.#2017-10-2922:57dpsuttonno, its not the minibuffer, let me see if i can get a screenshot#2017-10-2922:57dpsuttonit's the autocomplete suggestions which happen "inline"#2017-10-2922:57dpsuttonand since i just learned how to adjust the volume i think screenshots are a little ways off 🙂#2017-10-2922:59munenhihi If you have imagemagick installed, you can just call import foo.png on the commandline.#2017-10-2922:59munenOr if you've got gimp, you can use that.#2017-10-2923:04munenauto-complete and squiggly lines (for example from flycheck) are the only things I can think of when you say "it's the autocomplete suggestions which happen inline".#2017-10-2923:07munenIt's after midnight here, so I'll be dropping off real soon. If you manage to take a screenshot and put it here, I'll get back to it if nobody else answered before me. Anyways - good luck and enjoy i3 and Emacs. Those are easily the best at what they are doing.#2017-10-2923:08dpsuttonthere. and sometimes it's even worse. but it's a minor worry in the grand scheme of what can go wrong in emacs 🙂 and i'm quite enjoying i3#2017-10-2923:08dpsuttondon't stay up on my account. i'm more than happy and it was just a passing though
#2017-10-2923:11munenI honestly don't know how this could go wrong. I'll sleep on it and maybe can come up with something^^#2017-10-2923:12dpsuttonwell thanks for the help and screenshots. have a good night#2017-10-3000:24rymndhnghas anyone seen weirdness in helm-projectile-find-file? When I switch projects, and I invoke helm-projectile-find-file, i see the previous project's file list, and I have to invoke it one more time to get an updated list of files#2017-10-3010:52chrisblomis there a way to install older version of packages with use-package ?#2017-10-3010:53chrisblomI've updated cider but want to go back to version 0.14#2017-10-3100:41brainfreezeIf you haven't deleted the old version, you should be able to delete the new ones to downgrade.#2017-10-3100:47brainfreezeAnd it looks like the cider on melpa-stable newer thatn 0.14, so you'd have to build it yourself because use-package doesn't have the ability to actually build packages from commits or tags, it just grabs whatever MELPA or GNU ELPA have on hand. You can clone it with git if you want, or use something like Quelpa and Quelpa-use-package, since they let you build packages from source#2017-11-0209:03Ian FitzPatrickhi all, does anyone here use ob-clojure with cider? I can’t seem to find the namespace that ob uses…#2017-11-0414:46vemvtwo qs: 1 - anyone still using auto-complete rather than company? I switched when everyone did but I miss a robust docstring popup 2 - anyone has good-looking docstring popups working in OSX? there's but it uses native popups, which seem non-customizable under OSX so I see ill-fitting font, colors etc. on a related note I opened https://github.com/company-mode/company-mode/issues/733#2017-11-0421:31solfHello guys, I've been trying to find which package brings the "on-the-fly" eval to emacs I've seen in some gifs, do you have any idea?#2017-11-0421:56vemv@dromar56 this?#2017-11-0421:58munen@dromar56 For which language? For elisp it's built-in(;#2017-11-0615:31daveliepmann@dromar56 I use CIDER for getting in-buffer evaluation of Clojure code. Once I'm jacked in (`cider-jack-in`/`C-c M-j`) I just eval at point with eval-last-sexp/`C-x C-e`.#2017-11-0618:47gonewest818Anyone know the solution for this? When I invoke Amazon aws cli under eshell any “help” output (`aws help`, aws lambda help, etc) does not get intercepted into a buffer like the output of man or less, even though under the hood the cli appears to implement paging with less -R. As a result
$ aws help
WARNING: terminal is not fully functional
-  (press RETURN)
#2017-11-0618:54vemv@gonewest818 maybe rlwrap/readline issue, memory is blurry#2017-11-0619:07gonewest818I’m RTFMing right now … eshell-visual-commands and eshell-visual-subcommands#2017-11-0619:15gonewest818found it. (setq eshell-visual-options '(("aws" "help")))#2017-11-0716:13solf@vemv @daveliepmann Sorry for the late answer. I've been using cider-jack-in and eval-last-sexp, but I've seen some GIFs where you didn't had to run manually eval-last-sexp, instead whenever you typed it would eval many (all?) the expressions of the buffer. It's a bit hard to explain, I'll have to search longer for the gif#2017-11-0716:15dpsuttonthat sounds like the repl, @dromar56#2017-11-0716:18solfI found a video of light table showing what I mean, but I could swear that I saw a guy doing an emacs package for that : https://www.youtube.com/watch?v=YY6B9EHbH24#2017-11-0716:19solfFound a video on emacs : https://www.youtube.com/watch?v=mNO-vgq3Avg&amp;feature=youtu.be#2017-11-0716:20solfThe package seems to be this one https://github.com/Fuco1/litable#2017-11-0716:20dpsuttonah, try enliighten mode in CIDER?#2017-11-0716:21dpsuttonhttps://www.youtube.com/watch?v=X6aoObQrHEE#2017-11-0716:22solf@dpsutton thanks, that seems to be it 🙂#2017-11-0716:22dpsuttonawesome! i've never looked into it myself. seems nice! Stay side effect free though 🙂#2017-11-0716:23dpsuttonalthough i think enlighten is only when you run code. that emacs lisp one looked like as you type#2017-11-0716:24solfIt should be helpful enough, maybe adding some idle-timer that automatically runs it#2017-11-0716:26solfIn any case, it looks cool#2017-11-0719:31dpsuttonwhat's the best osx emacs? I know there's someone maintaining some patches onto osx versions of emacs#2017-11-0719:32dpsuttonis it aquamacs?#2017-11-0719:36bostonaholicI just brew install emacs --with-cocoa --with-ctags --with-gnutls --with-librsvg #2017-11-0719:36aghttps://github.com/d12frosted/homebrew-emacs-plus#2017-11-0719:36bostonaholicthere is also brew cask install emacs#2017-11-0719:38dpsuttoni remember hearing there was a patch set out there maintinaed by someone from Japan that added some nice features. But these were not brought into the repository because floss operating systems did not have those features. smooth scrolling and some other ones#2017-11-0719:38dpsuttonwas wanting to recommend that version to him#2017-11-0719:42jeff.terrell@dpsutton - I think I tried that one, and there were a few things I didn't like, to the point where I switched back to Homebrew emacs. It did have some improvements, but they weren't worth it.#2017-11-0719:43dpsuttonthanks. i'm gonna pass that along#2017-11-0719:46chrisagree, either emacs-plus or regular brew install emacs with flags are the best#2017-11-0719:46agemac-plus adds a few optional keys... --with-natural-titlebar is my favorite#2017-11-0719:46chrisrailwaycat emacs had a bunch of stuff that didn't end up working well for me#2017-11-0719:46gonewest818I’m using the build from https://emacsformacosx.com but I don’t think there’s anything special about it — just automated builds of the gnu sources.#2017-11-0719:47chrisI was using emacs-plus with no-title-bars when I last used a mac#2017-11-0719:51gonewest818is this the one dpsutton was referring to? https://bitbucket.org/mituharu/emacs-mac/#2017-11-0719:53jeff.terrellThat's the one I tried.#2017-11-0719:55dpsuttoni'm not sure. i just remember seeing it on the dev mailing list#2017-11-0719:55dpsuttonand him offering to merge and RMS saying he needed feature parity in free OS's to have the same features as macOSX otherwise it would be promoting a non-free OS#2017-11-0720:45tanzoniteblack@dpsutton https://www.lunaryorn.com/posts/bye-bye-emojis-emacs-hates-macos.html this is what you were talking about?#2017-11-0720:47dpsuttonyeah but it misunderstands his point. It's not "we are not welcome and never will be". He doesn't want to hilight features of non-free OS's which he fears would compel people towards it. He said he would be happy to see the feature if someone would extend the floss OS's to support that feature#2017-11-0720:47dpsuttonand it was either that or subpixel scrolling#2017-11-0720:49dpsutton
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > We should aim to provide the best possible Emacs experience on every
  > platform,

Usually, but not always.  The purpose of GNU Emacs is to be a good
part of the GNU system and thus to make the GNU system better; other
platforms are secondary.  GNU Emacs should never offer people a
practical reason to use some other system instead of GNU.

Therefore, when someone implements a useful new feature but only for a
non-GNU system, we do not accept it that form.  Instead we say, "Make
it work equally well on GNU, and we will accept it."

  > many friends
  > of mine who were long-time GNU/Linux users work on OS X today, me
  > included

This is a VERY bad thing.  Can we find ways to discourage this?

In principle, adding nice features to Emacs that work on GNU/Linux and
do not work on MacOS could help.  But I don't see much scope for
success that way.  I think our principal hope of influencing people is
through influencing the way they think about the choice of system.
For instance, by teaching them to value freedom (which MacOS denies)
more and convenience (which Apple might offer them) less.

If we took the attitude that we aim to "serve the users" wherever they
happen to be, that would convey the message, "Sure, switch to MacOS --
we will make it easier for you."  For us, a self-defeating approach.

Thus our stance is that a person who moves from GNU/Linux to MacOS is
being self-destructively foolish.  We take this seriously and we must
speak and act in accord with it.  This way, we can influence some
people.
#2017-11-0721:00dpsuttoneh. its principled and clear. i don't think i would have made that decision, but then again, I wouldn't have created a big movement in the 70s either 🙂#2017-11-0721:16daveliepmannIt doesn't seem to misunderstand the point at all. The facts are clear: "The Emacs developers disabled a feature that was working fine for MacOS users just because free systems lack support." One can rationalize that all day but the take-home for users is that because of political reasons they don't get a feature that already works. To me that's pretty anti-user. Anyway, I'm super glad mituharu is doing the hard work of making a Mac port so that some of those features can see the light of day.#2017-11-0721:19dpsuttonthe feature is available. gnu is just not wanting to support more features on a non-free operating system than on free ones. it seems like both sides win here. although i can certainly agree it kinda rubs wrong in some sense#2017-11-0723:06vemvhow do I make emacs believe AltGr is super? on linux something akin to
(setq mac-control-modifier 'super)
(setq mac-option-modifier 'meta)
(setq mac-command-modifier 'control)
(but those commands are for mac)
#2017-11-0723:12vemv...likely not possible without a OS-level remap which is precisely what I want to avoid#2017-11-0801:05Cam SaulYeah, you can do it with an .Xmodmap. I did this on my laptop running Kali to make my right modifier keys act as 'hyper and 'alt so I can set up more key bindings. Unlike Windows or macOS I don’t think there’s any way to do that in Emacs Lisp#2017-11-0801:08vemvthanks for the input @camsaul. I'd do exactly that but I rarely use my linux laptop (vs. macbook), don't want to touch xmodmap ever again 😆 I wanted this especially for my coworkers (we're creating a joint setup), but if part of the README says set up this xmodmap..., things begin to get fragile#2017-11-0801:15Cam Saul@vemv you can always just simulate modifier keys by typing C-x @ <letter> e.g. C-x @ h for 'hyper or C-x @ s for 'super. Almost as easy as the real thing!#2017-11-0801:18Cam SaulBut realistically maybe just take something like <f7> that’s not used by default and use it as a prefix and put all your custom project-specific keybindings under that.#2017-11-0813:02akjetmais it possible/easy to get cider to persist repl history on a per-project basis?#2017-11-0813:03akjetmaright now it's not saving history at all. or at least, it's not showing anything when i start a repl#2017-11-0813:10akjetmanvm, non-project specific history is good enough. achieved with (setq cider-repl-history-file "path/to/file")#2017-11-0814:17a13.Xmodmap is not the best way, one can try setxkbmap#2017-11-0817:21tanzoniteblack@akjetma if you do want to do per-project, you could probably configure that variable via a .dir-locals.el file (https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html) in each project directory#2017-11-1401:56qqqanyone have a good emacs/clojure setup for unicoede function names? I'm thinking of using special cahrs for htings like union/intersection/closure/other standard math ops#2017-11-1402:08gfredericksfor what part? typing them?#2017-11-1404:58bostonaholic@qqq if you’re using spacemacs, you can (setq clojure-enable-fancify-symbols t)#2017-11-1404:58bostonaholicif not, just reuse the code from spacemacs -> https://github.com/syl20bnr/spacemacs/blob/master/layers/+lang/clojure/funcs.el#L12#2017-11-1405:04qqqActually, I just found a key to insert-char#2017-11-1405:04qqqand I don't mind typing the unicode name to get the symbol#2017-11-1405:05qqqso typing the unicode symbol becomes 1. hotkey to trigger insert-char 2. type 'union' and watch helm auto complete / filter#2017-11-1519:36hkjelsis it possible to set a breakpoint and use a REPL with the context of that point?#2017-11-1519:43dpsuttonin cider there's a few options e Eval code in current context#2017-11-1519:44dpsuttonhttps://github.com/clojure-emacs/cider/blob/master/doc/debugging.md#keys#2017-11-1521:58hkjels@dpsutton thanks!#2017-11-1521:59dpsuttonyou're welcome! i'm glad that's working out for you#2017-11-1521:59dpsuttongive me one second, i've got a function you might like#2017-11-1521:59dpsutton
(defun cider-debug-create-local-let (start end)
  (interactive "r")
  (if cider--debug-mode-response
      (nrepl-dbind-response cider--debug-mode-response (locals)
        (let* ((code (buffer-substring-no-properties start end))
               (bindings (apply #'append locals))
               (formatted-bindings (mapconcat 'identity bindings " ")))
          (kill-new (format "(let [%s]\n %s)" formatted-bindings code))
          (message "copied let form to kill ring")))
    (message "No debugging information found.")))
#2017-11-1521:59dpsuttonwhile debugging, you can highlight code you want to inspect and this will form a let binding with all of the debugger locals#2017-11-1522:00dpsuttonso while stepping through, call this function with some text highlighted and then quit debugging. it grabs the locals from the debugger and formats a let statement with all of those locals bound to what they were in teh environment and the body of the let is the code you highlighted#2017-11-1522:01dpsutton@hkjels#2017-11-1522:04hkjelsAhh, that’s perfect! thanks#2017-11-1708:31decoursinIs there something like squiggly-clojure for clojurescript?#2017-11-1711:54benedekjoker works on cljs too#2017-11-1816:05decoursinThat's nice#2017-11-1816:06decoursin@benedek Thanks#2017-11-1816:36decoursinIn the Clojure side of things, which static linter do you prefer? Do you have them all enabled or just one?#2017-11-1816:38vemv@decoursin while not emacsy, I use: lein-cljfmt, lein-how-to-ns, lein-bikeshed#2017-11-1816:48decoursinDo you use those integrated within Emacs nonetheless?#2017-11-1816:54decoursinWhy do you prefer lein-bikeshed over kibit, eastwood, or clojure.typed?#2017-11-1817:02vemv> Do you use those integrated within Emacs nonetheless? (edited) I wrote some code to auto-watch my files and apply the fixes in a fine-grained manner, reusing my main JVM#2017-11-1817:03vemvnot easy b/c lein plugins are hardcoded against lein, so I had to copy/paste a bit#2017-11-1817:03vemv> Why do you prefer lein-bikeshed over kibit, eastwood, or clojure.typed? l-b is the one the I use least actually out of my 'stack'. but I use it b/c clojurescript compat#2017-11-1817:06decoursinAh ok thanks!#2017-11-1817:07vemvcolleague uses joker a lot for our cljs codebase, well-integrated with emacs apparently#2017-11-1817:16decoursinYeah, I have that setup for CLJS now, it's pretty nice so far!#2017-11-1818:06decoursinBased on my survey, Kibit & Eastwood are almost useless integrated within Emacs.#2017-11-1818:11decoursinSince they can only run when the source code compiles, they can't actually detect compile errors. (Detecting compile errors can also be done with just a normal stacktrace, but it would be nice to get a red squiggle underneath the errors to quickly find the problem, rather than searching the stacktrace.) Sure they provide some nice static analysis hints and tips, but hardly much that needs to run after every change/save.#2017-11-1818:12decoursinAs such, cored.typed seems like the only useful linter (of the three) to be integrated within Emacs.#2017-11-1818:18decoursinWhat do you guys think?#2017-11-2003:01dpsuttonholy smokes the code that makes company work is complex#2017-11-2014:18chrisme anytime I see how anything in emacs is implemented#2017-11-2015:22solfI have a love-hate relationship with emacs#2017-11-2015:23solfStarted using it 8 years ago, at the same time I started programming. So it's basically all I've ever know. I've tried other editors/IDE (sublimime, atom, vscode, intellij), I always come back to emacs#2017-11-2015:24solfBut honestly sometimes I wonder if it's not because of Stockholm syndrome#2017-11-2016:01agno. unfortunately (or shall I say fortunately) there's simply no other editor/IDE like Emacs. Hackable, extensible and malleable. I hope someday soon it gets real browser and maybe graphics layer (so we can draw overlays). As long the keyboard input exists - Emacs will be used.#2017-11-2020:02vemv+1 for the unfortunately! the day they match the Emacs offering I'll consider jumping. Till then I'm a reluctantly happy user of this single-threaded arcane lisp.#2017-11-2017:53qqqanyone else finding (evil-indent [start of buffer] [end of buffer]) to be slow on files of > 1000 lines ?#2017-11-2018:32ajsWhat is the advantage of evil indent over regular emacs indent-buffer, which I use in Clojure files #2017-11-2019:58vemvcider-format-buffer being another alternative#2017-11-2104:30qqqIs there a emacs-projectile-sed ? I want to do search replace of one regex with another regex, but I want to do it across all files in the project.#2017-11-2106:21jumar@qqq projectile-replace?#2017-11-2106:23jumarin spacemacs I often use helm-project-smart-do-search (`SPC /`) with that you can enter edit with C-c C-e and do the appropriate changes in special buffer#2017-11-2112:47solfIf you don't use spacemacs, you can do the search-then-edit with helm-ag-projectile. That's what I use, but I'm sure could search for (helm|avy)-(grep|ag|rgrep)-projectile and you should find an equivalent with your choice of tools.#2017-11-2117:35michaelwfoglemanqqq - I'd use projectile-ag, then use (wgrep-change-to-wgrep-mode) to make the results buffer editable, and then use replace-regexp or query-replace-regexp - might be a better way 🙂#2017-11-2118:59qqqso I'm using projectile-replace, and I have one minor complaint: it's not 'interactive'#2017-11-2119:01dpsuttonwhat do you mean interactive?#2017-11-2119:02qqq== when I use search + replace on a single buffer in emacs: 1. when I type the FROM-REGEX, it starts highlighting parts of lines 2. when I type the / TO-REGEX, it shows the new value in red in place == when I use helm-ag , it interactively shows all l8ines from all files that match == when I use projectice-replace, I'm "flying blind" in that it asks me a FROm-REGEX, a TO-REGEX, but I don't see any interactive matching / narrowing#2017-11-2119:02qqqprojectile-replace is like a 'literal sed over all project files', - is it possible to get an 'show me intermediate steps after every keystroke' ?#2017-11-2120:01jumarIt will "interactively" ask for confirmation to replace each occurrence (or all occurrences in given file / all occurrences in all files). I'd suggest to just use helm-* if you want more interactivity (but then again I don't know the details about projectile-replace - I think I've never used it)#2017-11-2120:36ag@qqq I'm not at my laptop (can't check) usually I would read the docstring and see if command supports universal arguments. #2017-11-2207:11qqqactually, having used it a few times, I really like the 'interactivity' of projectile-replace#2017-11-2207:11qqqthe ask each confirmation is nice to make sure all the changes are right#2017-11-2207:22qqqis there a way to define abbreviations that do NOT require spaces ? https://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html defines an abbrev "foo" => "..." but then activate it requries pressing f o o [space] Is there a way to define 'abbrevs' taht can be activated by just typing f o o#2017-11-2411:31jazzytomatoHi, I’m new to emacs and I’ve installed prelude + cider. I’m looking for the “go to definition” command, i.e. when the point is on a function name, I’d like to jump to that fn. I’ve searched online and I found that it should be M-. but this triggers “visit tags table”#2017-11-2415:58jumaryou might want to try spacemacs - really helpful especially for beginners#2017-11-2413:44solfM-. is the standard shortcut to "go to definition", by default it's binded to the command xref-find-definitions which is the one that prompts you to "visit tags table"#2017-11-2413:45solfHowever when you're on a clojure file and have cider-mode active, cider remaps M-. to cider-find-var#2017-11-2413:46solf@jazzytomato You can check out what command is binded to a key using C-h k, so in your case C-h k M-.#2017-11-2413:51solfAh, being on a clojure file (so in clojure-mode) is not enough, you need to jack in (`C-c M-j`) to actually activate cider-mode#2017-11-2413:51jazzytomatoAh#2017-11-2413:51jazzytomatothat’s it#2017-11-2413:53jazzytomato:thinking_face: it’s a bit annoying if you just want to go around in projects without starting a REPL though#2017-11-2413:54solfYeah but I imagine you don't have a choice, since it's CIDER that brings the "go to definition" feature, and I imagine through the REPL#2017-11-2413:54solf(I'm a beginner on clojure so I might be wrong, not a beginner on emacs though)#2017-11-2413:55jazzytomatoas a workaround I’ve installed dumb-jump#2017-11-2413:55jazzytomatothanks for your help#2017-11-2413:56solfI've heard good things about dumb-jump, I'll have to try it#2017-11-2418:31qqqprojectile-replace has dramatically improved the quality of my code#2017-11-2418:32qqqeasy to replace all foo -> bar ===> when a name no longer makes sense, more likely to rename it to a better name#2017-11-2714:58vemvanyone running individual cljs tests via cider?#2017-11-2714:58vemvI want something essentially equivalent to sending (cljs.test/run-tests 'the.current.ns) to the repl#2017-11-2714:59vemvI guess I can trivially implement such a defun, but CIDER/menu-bar integration would fancier#2017-11-2716:02bostonaholic@vemv how about C-x cider-test-run-ns-tests#2017-11-2717:17vemv@bostonaholic does it work for you?#2017-11-2717:18bostonaholicyup#2017-11-2717:26vemvjust noticed this (didn't before because I have most emacs output silenced by default)#2017-11-2717:29bostonaholicah#2017-11-2718:07qqqIs there some way, in Chrome Devtools, when I click on a *.cljs source map, have the source load up in Emacs instead of Chrome?#2017-11-2819:27hkjelsI don’t know if that’s possible, but I’d use it!#2017-11-2815:04vemvdumb q, how do I mutate (in-place) a list value? set/setq don't seem apt for the job as one cannot (set (list 2) (list 3))#2017-11-2815:22a13
(progn
  (defvar mylist '(2))
  (setq mylist '(3))
  (print mylist))
#2017-11-2815:22a13works for me#2017-11-2815:23a13btw, what are you going to mutate by (set (list 2) (list 3)) ?#2017-11-2815:24a13how about doing (set 2 3) ?#2017-11-2815:24a13😄#2017-11-2815:24vemvI know I know#2017-11-2815:24vemvbeing in Clojurians Slack I know the benefits of immutability etc 🙂#2017-11-2815:25a13O_O#2017-11-2815:25vemvbut elisp lists are mutable right? your recipe isn't what I'm looking for unfortunately#2017-11-2815:26a13list SYMBOLS are mutable#2017-11-2815:26a13list is a list#2017-11-2815:26a13as I said before, you can try (set 2 3) with the same success#2017-11-2815:27a13binding a value to another value doesn't make sense at all#2017-11-2815:28a13btw, what are you trying to do?#2017-11-2815:29vemvI think it can make sense? consider a javascript array you can mutate its length from 10 to 0 and back right?#2017-11-2815:29a13I don't know JS 🙂#2017-11-2815:29vemvand references to that array will see the latest mutated value, accordingly#2017-11-2815:32a13>you can mutate its length from 10 to 0 and back right? you can emulate this in elisp by cadr-ing 🙂, but your HAVE to have a symbol which you are trying to bind to a new value (with a reduced len)#2017-11-2815:33a13And I still can't understand, how (set (list 2) (list 3)) should work?#2017-11-2815:34a13ok, if you don't like to create new variables, you can use something like#2017-11-2815:36a13
(defun myset (a b)
  (setq a b))
#2017-11-2815:39a13you can do this in elisp too#2017-11-2815:40vemvok, so I'm asking if there's a readily available function that provides a behavior equivalent to "mutate this whole list setting it to some-other-list"#2017-11-2815:40vemvby means of push/pop, or otherwise#2017-11-2815:42a13
(defvar a '(1 2 3))

(defun mutate-it (coll)
  (setq coll (cdr coll))
  (setq coll (cdr coll))
  (setq coll (cdr coll))
  (push "foo" coll)
  (push "bar" coll)
  (push "baz" coll))

(mutate-it a)
#2017-11-2815:42a13the literate translation#2017-11-2815:43vemvdoesn't work#2017-11-2815:43vemvyou cannot use setq#2017-11-2815:43a13I can#2017-11-2815:43a13
(setq a (mutate-it a))
#2017-11-2815:44vemvit's not the JS behavior#2017-11-2815:44vemvsee last line of my screenshot, I just a#2017-11-2815:44a13JS has bad behaviour, lol#2017-11-2815:45a13also, you can use defmacro and do anything you want to#2017-11-2815:54dpsutton@vemv there's push: https://www.gnu.org/software/emacs/manual/html_node/elisp/List-Variables.html#2017-11-2815:54dpsuttonand pop: https://www.gnu.org/software/emacs/manual/html_node/elisp/List-Elements.html#2017-11-2816:14dpsuttonyou have to push onto a variable#2017-11-2816:14dpsutton(push list-i-want-to-mutate 4)#2017-11-2816:14dpsuttonotherwise just use cons (cons 3 (list 2))#2017-11-2816:24vemvthanks for the pointer#2017-11-2816:24vemvgot it finally!#2017-11-2817:15vemv^ that works, but in certain usages I need to (-clone ...) (dash.el library) things first. couldn't figure out exactly why#2017-11-2817:15vemvwhich is ironical, yep#2017-11-2817:16vemv
(defun vemv/bounded-list/insert-at-head! (x bounded-list bound)
  (mutate-to bounded-list (cons x (-clone bounded-list)))
  (mutate-to bounded-list (-take bound (-clone bounded-list)))
  bounded-list)
#2017-11-2818:16a13Just#2017-11-2818:16a13don't#2017-11-2818:16a13use#2017-11-2818:16a13javascript#2017-11-2818:16a13thank you#2017-11-2918:21qqqhttps://imgur.com/a/rvcJC camelCase vars are put in grey, and are hard to read how do I figure out what is setting this and change it ?#2017-11-2918:28tanzoniteblackput your cursor on the variable and run M-x describe-face it should default to whatever face (i.e. color/font modifier) is setting that value and where it's defined (and with the value you can set an override value for that face)#2017-11-2918:29qqqclojure-interop-method-face#2017-11-2918:30tanzoniteblackhttps://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L95 well..that seems to match what you described 🙂#2017-11-2918:31qqqgot it working now; thanks!#2017-11-3014:12vemv
$ open -a /usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/Emacs.app /Users/vemv/gpm/src/horizon/src/horizon/controls/widgets/grid/header.cljs +0:66
> The file /Users/vemv/gpm/src/horizon/+0:66 does not exist.
#2017-11-3014:13vemvanyone got "open at specific line" working? GUI OSX emacs#2017-11-3014:48gonewest818Try —args +0:66 so the line:col specification is passed through to emacs.#2017-11-3015:07vemv--args seems to be picked up! but doesn't jump to line/col#2017-11-3015:07vemvmaybe an issue with my setup. if anyone can confirm it works, appreciated#2017-11-3017:15gonewest818… I’m getting LSOpenURLsWithRole() failed for the application /usr/local/Cellar/emacs/25.3/bin/emacs-25.3 with error -10810#2017-11-3017:40gonewest818for whatever reason, the open command isn’t working for me, but here’s a note from the emacs manual:
'+linenum:columnnum file'
Visit file using find-file, then go to line number linenum and put point at column number columnnum. 
so your issue is, you need to pass the filename to emacs after the “+0:66”.
#2017-11-3017:46gonewest818in a terminal you should be able to navigate inside Emacs.app and see the actual binary, e.g. it’ll be something like /usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/Emacs.app/Contents/MacOS/bin/emacs. Once you know that, you should be able to invoke it directly: /usr/local/Cellar/emacs-mac/emacs-25.3-mac-6.8/Emacs.app/Contents/MacOS/bin/emacs +0:66 widgets/grid/header.cljs#2017-11-3020:20vemv@gonewest818 didn't work for me sadly!#2017-11-3020:20vemvtried with both emacsforosx and railwaycat-emacs, and no .emacs.d#2017-11-3020:22vemvbetting this would be solved with emacs-server. not worth the hassle for me at the moment (another way would be if one could send arbitrary text messages to an existing Emacs process... don't know if that's possible though)#2017-11-3021:17gonewest818was there an error?#2017-11-3021:25vemv@gonewest818 no#2017-11-3021:25vemvstock emacs opened the file, but at line/col 0#2017-11-3021:41gonewest818well, it’s the classic “works for me” situation. Both of these work on my macbook.
$ emacs --version
GNU Emacs 25.3.1
Copyright (C) 2017 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$ emacs +4:5 foo.txt 
$ emacsclient +4:5 foo.txt
Waiting for Emacs...
$ 
#2017-11-3021:44vemv@gonewest818 interestingly, plain emacs (terminal) works. but non-GUI emacs is useless for me#2017-11-3021:44vemvGUI emacsclient might work, must try out one day#2017-11-3021:51gonewest818for me that’s homebrew emacs (/usr/local/bin/emacs) … not the ancient apple one (/usr/bin/emacs)#2017-11-3021:53vemvthanks for all the hints!#2017-12-0101:24ag@gonewest818 why don't you use -e key and do it in emacs-lisp? like emacsclient -e '(load-file,,,, etc#2017-12-0101:26gonewest818☝️ @vemv, see above#2017-12-0101:29agoh... yeah.. sorry, wrong @#2017-12-0103:51vemvmy prefered distro doesn't appear to support GUI emacsclient https://github.com/railwaycat/homebrew-emacsmacport/issues/82#2017-12-0103:51vemvanyway thanks!#2017-12-0214:49vemvclojure-mode (the culprit I believe) indents [:ul with two spaces#2017-12-0214:49vemvI think it treats something (vectors? html?) as a special case#2017-12-0214:50vemvelsewhere, similar code would be indented with 1 space#2017-12-0214:50vemvthe problem is that clojure-mode indents with 2-spaces here, and cider+cljfmt, with 1#2017-12-0214:50vemvso the discrepancy makes editing annoying#2017-12-0214:50vemvany idea of what could be going on? --- edit: this was the fix (setq clojure-indent-style ':always-align) I had been using ':align-arguments for quite long, didn't realise it's not the default option#2017-12-0322:27solfTo run tests I have to save the buffer then run C-c C-k then use one of the commands that run tests (or use auto-test-mode), correct?#2017-12-0322:28solfAny baked-in way to avoid having to the buffer with C-c C-k? I wish to automatically run the tests when I save the buffer#2017-12-0322:36solfNevermind, I set cider-save-file-on-load to t so C-c C-k automatically saves the buffer. That plus auto-test-mode and I run the tests with a single shortcut, which is what I wanted.#2017-12-0410:25hlolliSomeone ever heard of the possibility of dual mode in single buffer, so say between lines 1-100 I'd want to write clojure code and from line 100-200 I'd want to write c code. Is this possible that when the cursor enters these lines, the mode would change?#2017-12-0410:37qqq@hlolli: org mode allows multiple languages in one file, but you have to delimit it using something ugly like #+ LANGUAGE ... or something#2017-12-0410:39hlollihmm ok, this statement would then cause syntax error when I'd compile it.#2017-12-0411:28qqqI'm sure the org mode line is configurable (so to embed it as a comment)#2017-12-0411:28qqqyou can also use web/tangling, which will generate the snippets#2017-12-0413:09dpsuttonhttps://www.emacswiki.org/emacs/MultipleModes#2017-12-0413:09dpsuttonSeem to be several ways including native indirect buffers. Have you tried any of these?#2017-12-0416:11solfmmm-mode tries to solve the problem of multiple languages in one file, but since emacs really wasn't made with that in mind, it can be pretty buggy at times (haven't tried it in years though)#2017-12-0416:12solfI haven't heard of the other third-party packages but I'm sure they probably have many quirks for the same reason than mmm-mode#2017-12-0416:12solfIndirect buffers + narrowing is for me the best bet#2017-12-0416:12solfBasically trying to emulate what org-mode babel does (using indirect buffers themselves surely)#2017-12-0419:47dotemacs@hlolli I’d look at how web-mode does it and try to get that going somehow to fit your use case. Not that C is web related, but web-mode seems to be the best support for multiple languages in a single buffer…#2017-12-0419:48hlolli@dpsutton no I'll check @dromar56 thanks for the point @dotemacs I check it out thanks.#2017-12-0500:11New To ClojureHi, is there a way to have such layout in Emacs:
+--+---+---+
|1 | 2 | 3 |
+--+---+---+
or (when corresponding files are opened):
+--+---+---+
|  | 2 | 3 |
|1 >---+---+
|  | 4 | 5 |
+--+---+---+
Where: 1 is project files tree window; 2 is CLJ or Elisp files window; 3 is REPL or bash shell window; 4 is CLJ tests, Markdown files window; 5 is exceptions window? I tried to use purpose-mode for that but it doesn't work consistently (from time to time buffers are opened in random windows and frames are additionally split without any reason).
#2017-12-0500:13bostonaholic1 you can get with neotree#2017-12-0500:14New To Clojure@bostonaholic neotree is good indeed. that's what I'm using currently.#2017-12-0500:39dpsuttonI wrote a package called resize-window to make window management easier. I can't use emacs without it now#2017-12-0500:39dpsuttonCould help you set up that layout easily#2017-12-0500:42dpsuttonhttps://github.com/dpsutton/resize-window#2017-12-0504:48gonewest818(fwiw) In your readme you mention using overlays for emphasizing the selected buffer… Here’s a rough implementation where I’m using face remapping in the unselected buffers instead. The remapped faces are computed to be “dimmer” than the actual theme but otherwise matching the themes hues. Alpha quality, barely tested. https://github.com/gonewest818/dimmer.el#2017-12-0506:42dpsuttonnice. that's what i want to do but i wasn't sure how to get a list of all visible buffers so i just went with the current buffer#2017-12-0507:37gonewest818I was thinking something like (mapcar 'window-buffer (window-list)) and then check and remove duplicates. But what I’ve got seems snappy enough even though it’s doing unnecessary work on the offscreen buffers.#2017-12-0522:46gonewest818… correction, I’ve got reports of sluggishness so I’m doing some profiling. I did say “alpha quality, barely tested” didn’t I?#2017-12-0517:26New To Clojurethanks @dpsutton!#2017-12-0517:27New To ClojureWhy doc can't be used in CIDER repl? I used it all the time in clojure-inf repl.
> (doc type)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: doc in this context, compiling:(*cider-repl
#2017-12-0517:27dpsuttonclojure.repl/doc#2017-12-0517:27dpsuttonit's just another function in a namespace. you need to make sure you refer to it#2017-12-0517:27dpsuttonin the user namespace they are imported and exposed.#2017-12-0517:28New To Clojurethat works but is slower than (doc type) in lein repl in terminal#2017-12-0517:28dpsutton
(clojure.repl/doc clojure.repl/doc)
-------------------------
clojure.repl/doc
([name])
Macro
  Prints documentation for a var or special form given its name
#2017-12-0517:29dpsutton
(use 'clojure.repl)
nil
breeze.jib.server.core> (doc doc)
-------------------------
clojure.repl/doc
([name])
Macro
  Prints documentation for a var or special form given its name
#2017-12-0517:29dpsuttonuse clojure.repl and then you can go with it#2017-12-0517:31New To ClojureRestarted repl and now it's as fast as in terminal (had a lot of text in that buffer). Thank you, @dpsutton, again!#2017-12-0518:52ghosss@ghsgd2 M-x cider-repl-clear-buffer can help when your cider buffer gets too long for emacs to handle#2017-12-0518:53dpsuttonalso, hit , in the repl for some options. one of which is clear. also refresh and some other goodies#2017-12-0518:57New To Clojure@ghosss, @dpsutton thank you a lot!#2017-12-0522:25agcan you guys remind me what should be the value of cider-lein-parameters for jack-in-clojurescript if the lein task is dev? I tried setting it to "dev" but I think it didn't work#2017-12-0522:27agit's running the task, ring and figwheel, compiles clojurescript, but doesn't connect to the repl. And doesn't create cider-repl buffers#2017-12-0615:21cgoreDo you maybe mean dev profile?#2017-12-0615:22cgoreAn example: (set-variable 'cider-lein-parameters "with-profile +dynamodb-local,+test repl :headless") This is setting the profile dynamodb-local and also the profile test, but the task is repl.#2017-12-0618:44New To Clojurelist-packages shows
Certificate information
Issued by:          Let's Encrypt Authority X3

The TLS connection to  is insecure for the following reasons: 
certificate was signed with an insecure algorithm
the certificate was signed by an unknown and therefore untrusted authority
certificate could not be verified
While certificate seems to be valid. What's wrong with Emacs?
#2017-12-0710:12andrea.crotti@ghsgd2 it's not saying it's not valid#2017-12-0710:12andrea.crottijust that the algorithm used is considered insecure#2017-12-0710:12andrea.crottidon't see it on mine (or I already accepted that some time ago)#2017-12-0710:21New To Clojure@andrea.crotti It stopped asking for confirmation today after accepting it. Let's Encrypt is well-known and often used so thought it has proper algorithms. Thank you!#2017-12-0710:31andrea.crottiyeah sure I also use it#2017-12-0711:08New To ClojureHave
(deftest foo-test
(testing ...)
(testing ...))
How to run specific (testing...) test case in CIDER?
#2017-12-0711:41Shantanu KumarHi, I have trouble adding an Elisp function (which used to worked with older Emacs versions) to newer Emacs:
;; C-M-space should remove multiple whitespace lines into a single blank
;; character
(defun multi-line-just-one-space (&optional n)
  "Multi-line version of just-one-space: Delete all
  spaces, tabs and newlines around point,
  leaving one space (or N spaces)."
  (interactive "*p")
  (let ((orig-pos (point)))
    (skip-chars-backward " \t\n")
    (constrain-to-field nil orig-pos)
    (dotimes (i (or n 1))
      (if (= (following-char) ?\s)
    (forward-char 1)
  (insert ?\s)))
    (delete-region
     (point)
     (progn
       (skip-chars-forward " \t\n")
       (constrain-to-field nil orig-pos t)))))
(global-set-key (kbd "C-M-SPC") 'multi-line-just-one-space)
#2017-12-0711:41Shantanu KumarCan anybody suggest changes to make it work? I have tried (global-set-key (kbd "C-M-SPC") (lambda () (interactive) (multi-line-just-one-space))) to no avail#2017-12-0711:57New To ClojureWhat C-h k shows for C-M-SPC key presses at your computer?#2017-12-0712:11Shantanu Kumar@ghsgd2 It says the following:
C-M-SPC runs the command multi-line-just-one-space (found in
global-map), which is an interactive Lisp function in
'~/projects/checkout/dotemacs/init-user.el'.

It is bound to C-M-SPC.

(multi-line-just-one-space &optional N)

Multi-line version of just-one-space: Delete all
  spaces, tabs and newlines around point,
  leaving one space (or N spaces).
#2017-12-0712:13Shantanu KumarOh my! I restarted Emacs and it’s working. Whereas It gave an error message earlier after I just evaled the init-user.el buffer#2017-12-0712:20New To ClojureI have 2 cursors in Emacs after M-x cljr-extract-function. How to revert back to 1 cursor?#2017-12-0712:20New To ClojureC-g helped#2017-12-0714:37benedekthat was multiple cursors kicking in#2017-12-0714:37benedekthere is a config option to opt out of multiple cursors#2017-12-0714:38benedekalthough you might just love it :) it is a separate package. you can work magic with it#2017-12-0719:46agdoes anyone know how to get fully-qualified name of clojure symbol-at-point?#2017-12-0719:49aglike cider-symbol-at-point but fully qualified#2017-12-0722:08solf@ag Something like this?
(defun cider-fully-qualified-symbol-at-point (args)
  (interactive "P")
  (message (cider-interactive-eval (concat "`(" (cider-symbol-at-point t) ")") )))
#2017-12-0722:09solfbasically I call cider-symbol-at-point, then wrap that in "`()", then send to the repl for evaluation
#2017-12-0722:42agthat worked! Thanks @dromar56#2017-12-0811:25New To ClojureIs there a way to automatically reformat clj buffer in CIDER?#2017-12-0812:52solfM-x cider-format-buffer#2017-12-0816:10New To ClojureThank you, @dromar56!#2017-12-0817:35bozhidar@dromar56 Another way would be to just get this from the var-info middleware.#2017-12-0818:01solfThanks @bozhidar, I didn't knew about that#2017-12-0820:47New To Clojure#2017-12-0820:47New To Clojure#2017-12-0821:24adamvhha, thanks for copying my question already#2017-12-0821:35ag@adamvh lein project?#2017-12-0821:38adamvhcorrect, i type cider-jack-in-clojurescript while editing a .cljs file inside a lein project (but not project.clj itself if that matters). i believe project.clj is set up correctly (with piggieback etc).#2017-12-0821:39adamvhto be more specific about my situation, i'm just cloning the Fulcro repo from github and trying to start repls#2017-12-0821:41ag
(setq cider-cljs-lein-repl
      "(do (require 'figwheel-sidecar.repl-api)
           (figwheel-sidecar.repl-api/start-figwheel!)
           (figwheel-sidecar.repl-api/cljs-repl))")
#2017-12-0821:41agbetter way is to create .dir-locals.el and set the values there. this is what we use in our project: .dir-locals.el
((nil . ((cider-cljs-lein-repl .
          "(do (require 'figwheel-sidecar.repl-api)
               (require 'integrant.repl)
               (integrant.repl/go)
               (figwheel-sidecar.repl-api/cljs-repl))"))))
#2017-12-0822:10adamvhso, integrant fails for me with some error about a system-prep function but, if i use the first version, i find myself with 2 eminently functional repls, so thanks!#2017-12-0900:55agyou don't need to use integrant. it's just an example how we set the vars. and we use integrant#2017-12-0917:49Ryan RadomskiWhat am I missing for source code navigation in clojure-mode? I use neotree, paredit, M-., and C-x C-f to find my way around#2017-12-0918:15dpsuttonProjectile. Project aware bagitron#2017-12-0918:15dpsuttonNavigation#2017-12-0918:22Ryan RadomskiProjectile seems to be exactly what I was looking for. Thanks!#2017-12-1012:01qqqI want to use unicode chars, but I want all sources to be ascii. Is there a way to get fn to look like \lambda, and so forth ?#2017-12-1012:01qqqso to be clear, the source file contains fn, but emacs diksplays it as \lambda in the buffer#2017-12-1012:03New To Clojure@qqq See http://emacsredux.com/blog/2014/08/25/a-peek-at-emacs-24-dot-4-prettify-symbols-mode/#2017-12-1012:04New To Clojure
(λ (x y)
  (if (≥ x y)
      (something)
    (something-else)))
#2017-12-1012:04qqqprecisely what I wanted; thanks!#2017-12-1012:04qqq@ghsgd2: in return, any quick questions I can help with?#2017-12-1012:05New To Clojure@qqq I have Emacs 25.3.1 built for MacOS. C-x 5 2 shows new frame with giant font which makes it unreadable. Any ideas how to fix that?#2017-12-1012:06qqqI'm using Emacs 25.1 on OSX#2017-12-1012:06qqqI also use C-x 5 2#2017-12-1012:06qqqI've never had the problem you're describing.#2017-12-1012:07qqqI have this in my config:
(progn "config font"
       (add-to-list 'default-frame-alist '(font . "Fira Code 14"))
       (set-default-font "Fira Code 14"))
replace Fira Code 14 with your favorite font, and see if it helps.
#2017-12-1012:07qqqI think the default-frame-alist '(font ...) part specifies the font new frames use.#2017-12-1012:08qqqI also have a hydra with:
("9" (set-default-font "Fira Code 14"))
  ("0" (set-default-font "Fira Code 18"))
this lets me easily toggle the font of the current buffer
#2017-12-1012:15New To Clojure@qqq That fixed the issue, thank you!#2017-12-1019:23qqq@ghsgd2: prettify-symbols currently gives me: "ascii string -> single unicode char" can I somehow get "ascii string -> unicode string" ? one silly example would be "defn" -> "=\lambda" or something like that#2017-12-1020:01New To Clojure@qqq Good question. I'm not using such feature so could check https://www.emacswiki.org/emacs/PrettySymbol . One of implementations might have support this.#2017-12-1022:54fedregHave been using emacs with clojure for the past few months with no problems but now trying to work on a cljs reagent app and am having issues with the cljs repl. Specifically, either the repl hangs on compile and does not return an error, or I get errors such as No such namespace: js when trying to do simple js interop. I added this to my emacs config
(setq cider-cljs-lein-repl
        "(do (require 'figwheel-sidecar.repl-api)
           (figwheel-sidecar.repl-api/start-figwheel!)
           (figwheel-sidecar.repl-api/cljs-repl))")
And am just running cider-jack-in-clojurescript after running lein figwheel. What am I missing? Thanks for any help!
#2017-12-1107:35New To Clojure@fedreg Try https://cider.readthedocs.io/en/latest/troubleshooting/ . I'm not using cljs but that page could help.#2017-12-1107:54Macroz@magnars I just found your expand-region.el yesterday, looks very cool! However I also tried to upgrade to Emacs 25 and found out that it works there differently than in 24. Is that a known problem or maybe I have some setup problem? I mean that e.g. expanding does not expand to the beginning of the word in 25, only to the right.#2017-12-1108:03magnarsNo, I try not to upgrade anything in Emacs, as it only brings me grief. That goes doubly for Emacs itself. It’s unfortunate, but I have stuff to do. #2017-12-1109:08MacrozI'll have a look at it sometime#2017-12-1109:08Macrozcompletely understandable 🙂#2017-12-1114:25hkjelsis there a function to end an interactive command? basically <RET>#2017-12-1115:19New To ClojureCIDER periodically marks random parts of source files with blue highlight. How to reset buffer to remove those marks?#2017-12-1115:19New To Clojurehttps://i.imgur.com/tM3BiKB.png#2017-12-1115:58dpsuttonI've never seen that before. I am not sure it's CIDER as I've never seen it before. But you can put your cursor on it and run M-x describe-text-properties and it should say the properties. not sure if it lists overlays though#2017-12-1115:58dpsuttonyes it does. @ghsgd2 try that#2017-12-1116:07New To Clojure@dpsutton I did Ctrl-S Ctrl-G and it disappeared. Will do when it occurs next time.#2017-12-1116:08New To Clojurehttp://www.techradar.com/how-to/computing/apple/ask-what-is-distnoted-on-mac-1305721 >If you are using emacs, you might want to disable any anti-virus software, too. 🤐#2017-12-1117:31solf@hkjels There's (abort-recursive-edit), which is the function used by minibuffer-keyboard-quit, which is the function called when you do C-g on the minibuffer#2017-12-1119:18adamvhin CIDER, how do i pass JVM args to a lein repl?#2017-12-1119:19adamvhah, i can do this in project.clj#2017-12-1119:24adamvhon second thought i'd still like to know how to do it in cider#2017-12-1119:31New To Clojure@adamvh Set cider-lein-global-options in customize to add extra options to repl#2017-12-1119:32New To ClojureAlso there's cider-lein-parameters#2017-12-1121:45qqqhttps://imgur.com/a/OU4uF the first comment is NOT comment-colored#2017-12-1121:55richiardiandreaI see this properly colored#2017-12-1121:45qqqdoes this also happen for others, or is my emacs config screwed up ?#2017-12-1121:57naomarik@qqq i get the correct colors#2017-12-1121:58qqqcan you show me a screenshot#2017-12-1122:05qqqfound the 'bug' in my init.el -- thanks to everyone for confirming#2017-12-1122:07New To ClojureWhy starting CIDER repl (`cider-jack-in`) takes so long (approximately 20 seconds)? lein repl is 4 seconds.#2017-12-1122:08qqqcider is almost instantaneous for me, though I'm running a boot repl, then cider is just jacking in#2017-12-1122:11New To Clojurecider-connect is instantaneous indeed. But after connecting to lein repl it writes
WARNING: CIDER's version (0.15.1) does not match cider-nrepl's version (nil). Things will break!
         More information.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.3.1 and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.  
#2017-12-1122:11New To ClojureThings will break 😞#2017-12-1122:12qqq[cider/cider-nrepl "0.16.0-SNAPSHOT"] (swap! boot.repl/default-middleware conj 'cider.nrepl/cider-middleware) made everything work for me in boot#2017-12-1122:12qqqnote: I'm using cider snapshot in emacs too#2017-12-1122:12qqqwhat you have to do is make sure that the cider-nrepl version that project.clj uses and your emacs cider version match up, that's all#2017-12-1122:13New To ClojureThank you, @qqq!#2017-12-1123:28bozhidarCider 0.15 was pretty slow to start indeed. That’s going to be addressed in 0.16.#2017-12-1123:28bozhidarThere we’re loading middleware on demand and the load time is pretty much the same you’d get from lein repl without any middleware.#2017-12-1202:28qqqis there a way to have an emacs frame 'own' the cider-error buffer ?#2017-12-1202:28qqqi want this frame toonly display cider-error / I want cider-error to only be dispalyed in thsi frame#2017-12-1206:35New To Clojure@bozhidar When 0.16 is going to be released?#2017-12-1206:39bozhidarIn the next week or two. You can use the snapshot even now, as @qqq is doing.#2017-12-1206:42bozhidar@qqq seems something like this is doable (although everything is doable in Emacs) https://ftp.gnu.org/old-gnu/Manuals/elisp-manual-21-2.8/html_node/elisp_433.html#2017-12-1206:42bozhidarI don’t use a multi-frame setup myself, so I’ve never thought much on this subject.#2017-12-1207:51New To ClojureThank you, @bozhidar!#2017-12-1210:09qqq@bozhidar:
(defun create-frame-for-cider-error ()
  (with-selected-frame (my-get-frame "frame-cider-error")
    (switch-to-buffer "*cider-error*") 
    (set-default-font "Monospace 18")
    (set-window-dedicated-p (frame-selected-window) 't)))


(defun create-frame-for-cider-repl ()
  (with-selected-frame (my-get-frame "frame-cider-repl")
    (switch-to-buffer "*cider-repl localhost*") 
    (set-default-font "Monospace 18") 
    (set-window-dedicated-p (frame-selected-window) 't)))


appears to work for me
#2017-12-1222:29bozhidarGreat! :thumbsup:#2017-12-1318:12New To ClojureIs it possible to jump to previous position of cursor somehow (and to previous of previous of previous too)? For example, I switched to definition of a symbol or used incremental search and want to go back a few times.#2017-12-1411:52daveliepmannDid you jump to definition using CIDER's M-.? If so I recommend: `M-, runs the command cider-pop-back (found in cider-mode-map), which is an alias for ‘xref-pop-marker-stack’ in ‘cider-util.el’.`#2017-12-1414:45New To Clojure@U05092LD5 That's exactly what I'm doing. Thank you a lot, will use M-,.#2017-12-1318:21christhat's what the jump-list is for in evil#2017-12-1318:22chrisif you aren't using evil you can pop marks, I think?#2017-12-1318:23chrishttps://www.gnu.org/software/emacs/manual/html_node/emacs/Mark-Ring.html#2017-12-1319:09New To Clojure@chris pop-global-mark is a bit crude. It works for switching back to previous buffer but doesn't accurately remember previous positions of cursor in the same buffer. Thank you, it's better than nothing so I will find uses for that.#2017-12-1320:32eggsyntax@ghsgd2 if you're using evil mode, I suggest evil-jump-backward. Typically bound to C-o, I believe.#2017-12-1320:32eggsyntaxTheoretically C-i takes you back forward, but it doesn't work for me.#2017-12-1320:33chrisC-i doesn't work because of some obscure emacs stuff#2017-12-1320:33chrisyou can get it to work with a hack#2017-12-1320:33chris(keyboard-translate ?\C-i ?\H-i) (global-set-key [?\H-i] 'evil-jump-forward)#2017-12-1320:33christhose two lines will reenable C-i#2017-12-1320:34chrisbasically, it routes it through the Hyper keymap (which nothing uses because no one really has a Hyper key) and maps something in the hyper keymap to jump forward#2017-12-1320:34chrisI don't remember why that's necessary in the first place though#2017-12-1320:38chrisor if you're on spacemacs you can just use dotspacemacs-distinguish-gui-tab t in the init function#2017-12-1320:43New To Clojure@eggsyntax, @chris Thank you! I think it's time for me to learn evil mode. 🙂#2017-12-1320:44eggsyntaxI'm certainly a fan. But I came from vim, so it was a no-brainer for me.#2017-12-1321:37adamvhi find the lisp manipulation a little more awkward in spacemacs' lisp mode, but maybe that's just because my paredit muscle memory got really deep#2017-12-1321:38adamvhin particular spacemacs seems to lack an equivalent to C-M-d (go down one sexp) which often leaves me feeling lost and just hjkl'ing like a pleb#2017-12-1414:13valtteri@New To Clojure https://www.gnu.org/software/emacs/manual/html_node/emacs/Mark-Ring.html check this for jumping back to previous positions. Emacs leaves a “mark” with most commands that jump the cursor elsewhere.#2017-12-1414:43New To Clojure@valtteri Seems to work, but order differs from actual. For example, put cursor at the beginning of the file using mouse, then scroll to the end and put cursor there. Press C-u C-SPC and see what happens.#2017-12-1414:58valtteriI don’t use mouse at all with emacs. 🙂 I scroll to the end of buffer with C-> and then C-u C-SPC gets me back to the starting spot.#2017-12-1415:00valtteriYou can also always manually leave a mark with C-SPC#2017-12-1706:12tianshuHi, is there a function in elisp to get "b" by "a" in (("a" . "b") ("c" . "d"))?#2017-12-1706:33gonewest818assoc https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html#2017-12-1706:36tianshuThx!#2017-12-1706:36tianshu@gonewest818#2017-12-1911:22stardivinerDoes anybody using Org-mode ob-clojure? I have issue here https://github.com/clojure-emacs/clojure-mode/pull/465. Do you have same issue?#2017-12-2218:14Ryan RadomskiDoes anybody know of a way to auto line wrap clojure maps? I've been using fill-paragraph, but it goes off of columns which doesn't always give the desired result.#2017-12-2222:03agwhat do you mean by that? cider-format-edn-region?#2017-12-2222:04agor functions from fill.el?#2017-12-2623:52vemvanyone using a ruler at column e.g. 80? of course I could find a few alternatives but they didn't seem flawless. if anyone is 100% happy with his choice please do recommend#2017-12-2700:14agfill-column-indicator.el doesn't work for you?#2017-12-2700:18vemvdon't specifically recall what I researched 1 month ago but I didn't get a good impression from the various alternatives. having a look now, 35 GH issues isn't exactly encouraging...#2017-12-2700:37agThis kind of stuff I guess will be always difficult to build, unless we get someday a proper support for graphics layer. So people can build nicer overlays. But I don't know if this ever happens.#2017-12-2700:39vemvAppreciate the input!#2017-12-2713:07bozhidarI prefer to just have whitespace-mode colour differently parts of lines that go over certain limit. I’ve been using it for a very long time and this looks like a charm.#2017-12-2719:17bostonaholichow do I add custom formatting rules when using cider? e.g. I have a macro that I want formatted similar to let#2017-12-2719:17bostonaholic
(let [foo 1]
  (prn "indented 2 spaces"))

(attempt-all [foo 1]
             (prn "indented to ["))
#2017-12-2719:20dpsuttonhttps://github.com/clojure-emacs/clojure-mode#indentation-of-macro-form#2017-12-2719:20dpsuttonit's actually in clojure mode is why you didn't find it i bet#2017-12-2719:21bostonaholicyeah, I was looking in cider and cljfrmt#2017-12-2719:32bostonaholicthanks @dpsutton#2017-12-2807:26bozhidar@bostonaholic You can also have CIDER do the indentation, btw - https://cider.readthedocs.io/en/latest/indent_spec/#2017-12-2807:27bozhidarBut probably the approach that @dpsutton suggested is good enough for you, even if it’s not as reliable as using CIDER’s indentation metadata.#2017-12-2810:05qqqis there anemacs builtin for: take current location, insert space chars until current char is at location 70#2017-12-2810:05qqqto be precise "insert spaces before cu4rent cursor, until cursor is at column 70"#2017-12-2810:10bozhidarDon’t think so, but it would be pretty simple to build such a command.#2017-12-2810:10bozhidarWhy would you need something like this?#2017-12-2810:14qqqthis is going to sound stupid; I find code much easier to read when I write it as:
(def some-fn .                       (fn [] ... 
because: 1. I'm on an ultra wide monitor 2. the lhs is "uncluttered" so I can easily read off the function names
#2017-12-2816:39vemvdon't mean to be "that guy", but better to solve the root problem than starting what seems a non-ideal practice - it can bite back when you collaborate on clj projects I'd frame the problem as a window-management problem (at OS level), or frame-mgmt problem (at emacs level) namely: how to have an centered, not-overly-wide editor frame in my ultrawide screen?#2017-12-2810:23qqq
(defun insert-to ()
  (interactive)
  (if (< (current-column) 40)
      (insert-char ?\s)))
is what I have so far
#2017-12-2810:23qqqusing if instead of while to avoid infiniteloop since I'm not sure if insert-char goes left or right#2017-12-2810:24qqqokay, it appears to work now 🙂#2017-12-2815:26bostonaholic@bozhidar That’s cool, I didn’t know about style metadata. However, I’m not a fan of adding editor-specifics to source code. That includes things like adding .idea (intellij files) to .gitignore or adding // -*- java -*- at the top of a file to signal to the editor to use java-mode.#2017-12-2817:07bozhidarWell, this metadata is currently understood only by CIDER, but it’s really something generic which I hope others would eventually process as well.#2017-12-2817:08bozhidarI’d love to see someone work on https://github.com/weavejester/cljfmt/issues/49#2017-12-2817:08bozhidarThat would be big for the Clojure community.#2017-12-2819:05bozhidarHey everyone, Here’s one (a bit overdue) Christmas present for all of you - a major update to CIDER, the popular Clojure interactive development environment, built on top of Emacs and nREPL. The big news is that CIDER 0.16 starts much faster when you use cider-jack-in (due to deferred loading of most of the nREPL middleware that CIDER uses internally to power its features). As usual - there are other small new features, improvements and bugfixes. Go over the release notes for all the details! Enjoy CIDER 0.16 (ir)responsibly and have an awesome New Year! P.S. Special thanks to ClojureX’s team for helping me find the energy and the resolve to finish the work on this release and to all the amazing people who contributed to it! You’re awesome! Keep rocking! 🙂 P.P.S. We’ve got plenty of small newcomer-friendly tickets that you can help with here https://github.com/clojure-emacs/cider/issues?q=is%3Aissue+is%3Aopen+label%3A%22low+hanging+fruit%22
### New Features

* [#2082](), [cider-nrepl#440](): Add specialized stacktraces for clojure.spec assertions.
* [#2111](): Add `cider-pprint-eval-last-sexp-to-comment` and `cider-pprint-eval-defun-to-comment`.
* Add a REPL shortcut for `cider-repl-require-repl-utils` (this makes it easy to require common functions like `doc`, `source`, etc. in REPL buffers).
* [#2112](): Add a new interactive command `cider-find-keyword` (bound to `C-c C-:`).
* [#2144](): Create a Docker image to mimic the Travis CI environment.

### Changes

* `cider-switch-to-last-clojure-buffer` switches to most recent relevant Clojure(Script) buffer instead of the last "remembered" buffer.
* [cider-nrepl#438](): Improve startup time by deferring loading CIDER's middleware until the first usage.
* [#2078](): Improve startup time by bundling together sync requests during startup.
* `cider-rotate-default-connection` will warn if you use it with only a single active connection.
* `cider-format-buffer` tries to preserve the point position.

### Bugs Fixed

* [#2084](): Select correct REPL type (clj or cljs) in `cider-switch-to-repl-buffer` conditional on the current buffer.
* [#2088](): Fix functions defined with `def` being font-locked as vars instead of functions.
* [#1651](), [cider-nrepl#445](): Fix `cider-expected-ns` returns `nil` on boot projects.
* [#2120](): Fix Travis CI build errors for Emacs versions >25.2.
* [#2117](): Ensure `cider-repl-result-prefix` is only inserted before the first result chunk.
* [#2123](): Process properly the Java version in Java 9.
#2017-12-2819:44bostonaholicthanks for all of your wonderful work @bozhidar!#2017-12-3000:31qqqin emacs, is there an easy way to do outlining/folding based on sexp ?#2017-12-3005:13gonewest818I’m on vacation without a laptop but it looks as if origami.el supports recursive folding and unfolding. Presumably lists, vectors, hash maps, sets, etc are all interactively foldable. #2017-12-3006:46qqqplaying with it now, orgami mode looks like what . Ineed; thanks!#2017-12-3007:41qqq

anyone know how that works with creating new parsers ?
#2017-12-3007:42qqqthe regex seems to be matching both the start and the end#2017-12-3008:03tianshuis there a JavaScript-like Array in Emacs Lisp? I want to mutate it with push and pop.#2017-12-3008:25qqqas a regex, what does "(def\\w*\\s-*\\(\\s_\\|\\w\\|[:?!]\\)*\\([ \\t]*(.*?)\\)?" mean#2017-12-3008:26qqqI get the (def is a literal (def#2017-12-3008:26qqqand \\w is \w is word#2017-12-3008:26qqqand \\s is \s is space#2017-12-3008:26qqqbut what is \\s-* and \\s_#2017-12-3008:53cmackhttps://www.emacswiki.org/emacs/RegularExpression may help. They look like expressions that work with the syntax table#2017-12-3009:07qqqthanks really useful, \s- whitespace character and \s_ symbol constituent explains alot#2017-12-3009:57qqqwhat is the meaning of .*? in emacs ?#2017-12-3016:30gonewest818https://www.emacswiki.org/emacs/NonGreedyRegexp#2017-12-3009:57qqq(as a regexp)#2017-12-3016:03gfredericksthe clojure executable & deps.edn seem like they could be a very good integration point for org-mode stuff#2017-12-3016:03gfredericksI'd love to figure out how to have code snippets in org-files, with optional deps listed, and have it run perfectly with no extra context necessary#2017-12-3020:12qqqI've been playing with origami for code folding. It's not behaving as I would like it to. Then I realized one thing: eamcs/cider already indents my clojure code properly; is there a nice way to get code folding via simply indenting ?#2018-12-3100:04gonewest818Ah, sorry — I had hoped origami would work for you. On the one hand, there are other folding plugins besides origami. Perhaps one of the others... on the other hand, I think Origami determines folds via indentation when no specific regexp exists. You could nuke the clojure regexp (and/or manually unset clojure mode?) to see if that works better for you. #2018-12-3100:10qqqorigami is very interesting#2018-12-3100:10qqqfor the regex one, I plyaed with defining my own regex, but could never get it quite to work (either overlap, or matching until end of file)#2018-12-3100:10qqqfor the indent method, it appears, in elisp mode, to ikgnore any line that does not start with (def#2018-12-3100:11qqqso it's a very nice lib, but there's some magic going on#2018-12-3103:18qqqwith lispy, is there a way to move "into" a sexp? for example, cursor is at | |(+ 2 3) now, the kehs hjklf all do not move me to the +, 2, or 3 they seem to only move to corresponding ( or ). but I want to move into the "symbols" of the sexp, is that possible?#2018-12-3109:52qqq
(defun find-init-el ()
  (interactive)
  (find-file "~/.emacs.d/init.el"))

(general-define-key :prefix "<home>"
		    "f 6" 'find-init-el
		    "f 7" '(find-file "~/.emacs.d/init.el")
		    
		    )
f 6 works, but f 7 does not -- how do I fix this?
#2018-12-3116:33bozhidar@qqq You should wrap this in some interactive lambda.#2018-12-3116:34bozhidar
(lambda () (interactive) (find-file ...
#2018-12-3121:45qqqfor whatever reason, I find this surprisingly hard to do: I want something that will do all folds where it starts with (do ;; ... or (def ... or (def ... and fold until the matching ) it's okay to look for the end based on identation, as I will guarantee that the file is properly indented#2018-01-0107:58qqq
(defun wrap-hydra (f)
  (lambda ()
    (interactive)
    (evil-normal-state)
    ((symbol-function f))))
(general-define-key "<end>" (lambda () (interactive) (evil-normal-state) (hydra-end-key/body)))
(general-define-key "<end>" (wrap-hydra 'hydra-end-key/body))

the first works, but the wrap-hydra fails; what am I doing wrong?
#2018-01-0108:19bozhidar((symbol-function f)) is not valid syntax#2018-01-0108:20bozhidarI assume you wanted to do something like (funcall f)#2018-01-0108:21bozhidar
(defun wrap-hydra (f)
  (lambda ()
    (interactive)
    (evil-normal-state)
    (funcall f)))
#2018-01-0109:01qqqcan you please enlighten me on this, which step is wrong? 1. elisp is a lisp-2, f has three fields attached to it, whch can be retrieved via symbol-name symbol-value symbol-function 2. (symbol-function f) extracts the function from the symbol 3. ((symbol-function f)) calls the extracted function clearly I'm wrong somewhere; question is: which step ?i#2018-01-0113:23qqq=== I'm weak in elisp. Is there an easy way to count the number of leading spaces in an emacs string?#2018-01-0115:36vemv@qqq https://github.com/magnars/dash.el + https://github.com/magnars/s.el#2018-01-0119:02bozhidarOr the newer seq.el (built-in since Emacs 25.1)#2018-01-0119:18donmullenI’m doing development with emacs / cider - and noticing that on Mac OS - a process called “Loader” sometimes spikes to like > 200% CPU. Has anyone seen this before and know what I might be doing wrong? I’m doing some core.async development - wondering if I am generating threads that aren’t completing??#2018-01-0119:43bozhidarI’ve never seen something like this myself.#2018-01-0223:24qqqI'm 99% sure this is true; but just to be sure, (match-string 0) returns the ENTIRE string the regexp matches right?#2018-01-0223:26qqq@donmullen: is 'Loader' an Emacs or a JVM sub thread ?#2018-01-0302:40qqqhttps://www.gnu.org/software/emacs/manual/html_node/elisp/Conditionals.html <-- elisp has if/cond, does it also have case ?#2018-01-0302:46qqqfound it; pcase#2018-01-0303:35vemv(buffer-string) returns this for me - a string with properties:#2018-01-0303:36vemvhow can I check if a specific property is contained?#2018-01-0303:36vemvpseudocode: (if (contains? (buffer-string) "cider-repl-stdout-face"))#2018-01-0304:07vemvSolved with: ...(prin1-to-string (buffer-string))...#2018-01-0303:38dpsutton@qqq pcase is notoriously kinda weird. john wiegeley, the emacs maintainer, has written on it if you'd like to see some documentation http://newartisans.com/2016/01/pattern-matching-with-pcase/#2018-01-0304:04qqq@dpsutton: it's okay, I'm not doing anything complicaetd; here is the extend of my pcase usage:
(defun my-get-level (s)
  (let ((ans (pcase (my-count-star s)
	       (0 999)
	       (x x))))
    (message "match: %s -> %s" s ans)
    ans))
#2018-01-0400:33qqqis anyone here using lispy? I'm having problems with folds not showing the "..."#2018-01-0500:48vemvnew to helm, chose the helm-ag variant I think I understood the basics, but I can't properly do the "replace" part of my "search and replace" intent I can choose a directory to search in (OK) search for a pattern (OK), choose candidates / all of them (OK), and then choose 1 of the 4 offered actions the problem is that none of the 4 offered actions means "apply a replacement string". These are the actions offered by helm-do-*: * Open file * Open file other window * Save results in buffer * Edit search results "Edit search results" works, but it seems more than I want. I don't want to do arbitary edits on the matching lines. I want to type <replacement string> and have it applied to each occurrence in those lines.#2018-01-0500:48vemvmy guess is that there is an action other than Edit search results which does precisely that?#2018-01-0500:56qqqyes, there is#2018-01-0500:56qqqlet me find it from my init.el#2018-01-0500:56qqqI think the functino you want is 'projectile-replace', it's part of the projectile librtary, which means you have to attach it to a particular project/directory#2018-01-0500:57qqqthe way it works is you type the search string, the replace string, then it interactivle asks you: repalce this instane? replace all in this file? ...#2018-01-0500:57qqqI'm a big fan of it.#2018-01-0500:57vemvthat'd work for sure but for now I'm avoiding projectile#2018-01-0501:34qqqin evil/emacs, how to I say: take the current line shift the view/buffer/window so that the current line is at the to pof the screen/window#2018-01-0513:07jeff.terrellSame as in vim: zt. Also zb for the bottom of the screen and zz for the center.#2018-01-0502:30dpsutton@vemv are you avoiding projectile for a reason or have a different preferred setup?#2018-01-0502:41vemvno specific bias againt it, simply I try to use small libraries whenever possible#2018-01-0503:16vemvKinda solved, time will tell if my solution is good enough#2018-01-0503:18vemvFrom what I researched, this one of those functionalities that Emacs / libraries will never provide out-of-the-box#2018-01-0506:36gonewest818@qqq well the function would be (recenter-top-bottom 0)… I don’t use evil-mode, so I don’t know if there’s already a binding for that.#2018-01-0510:16bozhidar@vemv Helm is orders of magnitude bigger than Projectile. 😄#2018-01-0510:19bozhidarObviously I’m quite attached to Projectile, because I wrote it, but I’ve never liked the huge scope of Helm. I was pushing hard back in the back to split this to some core framework, so people could actually have small add-ons to it. If you want something really simple I’d recommend counsel - https://github.com/abo-abo/swiper#counsel It has some basic integration with git and ag.#2018-01-0510:20bozhidarI myself use a combination of Projectile, ivy-mode and counsel depending on what I’m doing.#2018-01-0510:53qqq@bozhidar: you also work at toptal right? is it possible to create a cider-toptal plugin where: 1. when I run into a bug, I can do M-x pay-toptal-$50 2. a toptal expert joins via screen sharing and starts helping me debug my code I'm only half joking, something like this would be a huge productivity gain; it's like aws / uber for clojure expertise#2018-01-0511:07bozhidar😄#2018-01-0511:08bozhidarYeah, the team is certainly going to appreciate the idea.#2018-01-0511:08bozhidarHow do you know I work there? That surprised me.#2018-01-0512:36qqqhttps://github.com/bbatsov <-- lists you as VP of Engr at Toptal#2018-01-0512:37qqq@bozhidar: I've been trying to push this idea of "paid stackoverflow" (having played with both upwork and codementor), perhaps toptal can implement this#2018-01-0512:38qqqoften times, I run into an engr problem that I make no progress on for 2+ hours, and I just now -- that if only I knew the libs / domain, I could resolve it in 5 mins#2018-01-0512:39qqqin those cases, I'd love to somehow just find that person in the world, who has the expertise and is free at the moment, give them $50, and have them solve the problem for me#2018-01-0512:41bozhidarHaha, I forgot about this. Yeah, I’m the VP of Engineering at Toptal. The company’s huge growth played a big part in me having less time for OSS. That’s a cool idea, I’ll run it by our product team.#2018-01-0512:54qqqI don't know about clojurians-slack policy concerning commercial gigs, but if there were experts here I could dm with #clojure / #emacs / #cider questions at $50 each (help more difficult than what I would expect a random stranger to do for free), it'd be interesting to see how it works out#2018-01-0515:25richiardiandreaI remember this from a while back, there are plenty of platforms now but the most promising one is https://openbounty.status.im/app IMHO. #2018-01-0513:58benedekdeffo an interesting idea#2018-01-0514:00benedekwonder if the cider team could support that in a way that a cut from the fee would go into a cider pot and could be used to fund cider work (solving cider issues, new features etc)#2018-01-0514:15bozhidarhttps://www.bountysource.com/ had a similar idea#2018-01-0514:16bozhidarWhile nobody does OSS for money, making some money from working on some ticket certainly increases your motivation.#2018-01-0515:20gfredericksI'm seeing strange behavior from cider-pprint-eval-last-sexp-to-comment#2018-01-0515:21gfredericksin particular, there is no change on the screen immediately after running it. if I move the cursor, the output appears. But when using linum mode, the line numbers haven't changed yet (in the case where the output is multi-line); moving the cursor a second time updates the line numbers#2018-01-0515:22gfrederickswhen I add indirection via my own defun for the purpose of binding C-x C-e to something that pretty prints to the repl or buffer, the first problem goes away, but the second doesn't#2018-01-0515:23gfredericksshould I just make a github issue? can anybody recommend a workaround for the linum-mode problem? (I couldn't find any linum-related functions available at all, so wasn't sure what to try)#2018-01-0515:46bozhidarSounds like some problem I’ve seen reported somewhere else recently. Might be good to file a ticket with some repro steps.#2018-01-0516:27gonewest818@gfredericks I saw something like this during development, and put some notes in the pull request. The underlying problem I saw was the mechanism in emacs that suggests abbreviations for long function names (messages like “you can also invoke that function with M-x s-r-g”). Those abbreviations are computed on the fly, and there’s a caveat in the core about the possible delay.#2018-01-0516:28gonewest818Anyway, the thing is, the abbreviations thing doesn’t happen if you’ve already bound a key to that function. In that case you’ve seen the message reminding you of the key binding. #2018-01-0516:28gfredericksOkay, so that explains why the first effect went away when I set a keybinding#2018-01-0516:28gonewest818Yep#2018-01-0516:29bozhidarWe might put this in the troubleshooting section of the manual.#2018-01-0516:29bozhidarI keep forgetting about this new Emacs functionality.#2018-01-0516:29bozhidarOr display some message linking to this when people are running a newer Emacs.#2018-01-0516:30gonewest818Have you tried just waiting it out? I can’t recall, but I think there is a timer in there to make sure these abbreviations aren’t clobbering other output to the minibuffer.#2018-01-0516:31gfredericksWhich effect are you referring to?#2018-01-0516:31gonewest818The second( Not suggesting you want to work that way, just curious if the line numbers and so on would eventually update by themselves.)#2018-01-0516:32gfredericksI'll check#2018-01-0516:33gfredericksHow long should I wait?#2018-01-0516:35gfredericks(it's been at least a minute)#2018-01-0516:36gonewest818I’d say that’s Long enough... #2018-01-0516:37gfredericksI'm doing this on an unconfigured emacs 26.0.50.2, btw, so hopefully that means it's reproducible#2018-01-0517:11gonewest818fwiw, I can reproduce the linum-mode interaction in Emacs 25.3.1 also.#2018-01-0517:17dpsuttoni think eli has made a native line numbers implementation in c in emacs. it's annoying when people suggest changing your workflow but i think its supposed to solve some issues and might be worth looking at#2018-01-0517:19dpsuttondisplay-line-numbers-mode seems to be how to toggle it#2018-01-0517:20bozhidar@dpsutton When was this added?#2018-01-0517:20dpsutton(setq display-line-numbers 'relative) ah nice#2018-01-0517:20dpsuttonnot sure. i was browsing the list and saw eli had added it and was asking for feedback. looks new in 26#2018-01-0517:21bozhidarWhich is still unreleased. 😉#2018-01-0517:21bozhidarMight checkout the current state, though.#2018-01-0517:21dpsuttonoh it is? i forget where things are. i build from git and mine says 27 so i figured 26 was out#2018-01-0517:21dpsuttonhttps://www.reddit.com/r/emacs/comments/6hux6a/native_display_of_line_numbers/#2018-01-0517:21dpsuttonreddit comments about it submitted by eli with a link to the mailing list if you prefer#2018-01-0517:22bozhidarYeah, 26 was branched as it’s near a release and the master is now 27.#2018-01-0517:22bozhidarI was also building Emacs from bzr and then git for a long time, but stopped at some point as often I’d encounter bad builds and just waste some time.#2018-01-0517:23dpsuttoni'm loving it because i got the new xreffind-defintiions` early which was amazing in 25#2018-01-0517:24dpsuttonand i only build new versions every few months so i don't run into issues#2018-01-0517:28vemv> Helm is orders of magnitude bigger than Projectile. 😄 (edited) but helm-ag seemed (subjectively) a bit more focused in goals than projectile. I already had some project-management code, didn't want conceptual overlap helm looked scary from the beginning, but used as the implementation detail of X (helm-ag in this case) it gets more acceptable anyway, just sharing my reasoning. Projectile seems pretty awesome, I hear it's used by many!#2018-01-0517:39cmackI use the two together with helm-projectile#2018-01-0518:06richiardiandreaHello emacs gurus I have a question#2018-01-0518:07richiardiandreaI see in cider-complete https://github.com/clojure-emacs/cider/blob/3e9ed12e8cfbad04d7618e649322765dc9bff5d6/cider-interaction.el#L636#2018-01-0518:07richiardiandreawhich creates a list with keywords after the first (main) completion function#2018-01-0518:07richiardiandreabut then I see this in the company-capt backend: https://github.com/company-mode/company-mode/blob/a4e14ed869a99ca8772f32b884b79ea573bccbb8/company-capf.el#L151#2018-01-0518:08richiardiandreawhich takes the 4th element and gets a property from it#2018-01-0518:08dpsuttoni've looked into company-capf and it is incredibly hard to understand#2018-01-0518:09richiardiandreaoh cool, my experience is limited and I am happy that I am not the only one finding it weird#2018-01-0518:09dpsuttonits pulling that from the mutated company--capf-data and i don't understand all of the times it gets set#2018-01-0518:09dpsuttonhttps://github.com/company-mode/company-mode/blob/a4e14ed869a99ca8772f32b884b79ea573bccbb8/company-capf.el#L43#2018-01-0518:09richiardiandreaI did:
(defvar u (list 3 4 (lambda ()) :annotation-function (lambda (t ))))
(plist-get (nthcdr 4 u) :annotation-function)
but it never works
#2018-01-0518:09dpsuttonbut the 4th cell of that is data. the ones before are buffer, point, and a counter#2018-01-0518:10richiardiandreaoh#2018-01-0518:10dpsuttonthat code is really really weird#2018-01-0518:10richiardiandreaso cider passes a list, I wanted to basically understand how to build that list#2018-01-0518:10richiardiandreaif there was another way then just concatenating#2018-01-0518:11richiardiandreabut I see the only option here seems (concat (list (beg) (end)) (some-of-my-functions-returning-the-rest-as-list)#2018-01-0518:18richiardiandrea@dpsutton should this work in your opinion?
(nconc (list (car bounds) (cdr bounds)
                   (if (fboundp 'completion-table-with-cache)
                       (completion-table-with-cache #'inf-clojure--completions)
                     (completion-table-dynamic #'inf-clojure--completions)))
             (when inf-clojure-completions-annotation-fn
               (list :annotation-function #'inf-clojure-completions-annotation-fn)))
#2018-01-0518:18richiardiandreaI am going to try but I think this is the idea I had in mind#2018-01-0518:19dpsuttongo for it. i was looking through that exact code for a bug in planck completion interaction. it wasn't fun and i couldn't figure out why the completion function was fired so many times. it gets ... weird. but i don't remember the details righ tnow#2018-01-0518:21richiardiandreayeah inf-clojure tries its best ... 😄 some quirks are inevitable though..#2018-01-0518:25dpsuttonit wasn't inf-clojure i don't think#2018-01-0518:25dpsuttonbut compeltitions were working. if cljs.c would comple cljs.core/#2018-01-0518:26dpsuttonbut running completitoin on cljs.core/ would find completitions and then try again. and i think it had to do with the smart completion like breaking up words. like a.i should find assoc-in or something similar. but that would then run a completion for cljs.c and find cljs.core. i gave up on it 🙂#2018-01-0518:28richiardiandreaah#2018-01-0518:29richiardiandreaI am trying to include compliment for clojure types...potentially this opens put for custom completers...at this point an elisp completion common lib for clojure might a good thing#2018-01-0522:05gfrederickswhat would be the ideal way for users of this tool to get the same effect from inside emacs? https://github.com/gfredericks/how-to-ns I can arbitrarily rearchitect it to support this, but I don't like the idea of having a separate implementation in elisp#2018-01-0522:20vemv@gfredericks personally I use a how-to-ns fork within a file watcher. this file watcher applies how-to-ns and a couple other lein formatters on any individual file change. this is decomplected from lein; which is why I had to fork#2018-01-0522:20gfredericksI'd be happy to untangle it from lein#2018-01-0522:21vemv(emacs integration can be cool, but in the end you're just shaving 1-2 seconds over file-watcher approach)#2018-01-0522:21gfredericksdoes emacs automatically revert your buffer when a file changes?#2018-01-0522:22vemvyes#2018-01-0522:22dpsuttonit's a setting#2018-01-0522:22vemvonly problem is that revert is poll-based, a few seconds slower than in other editors#2018-01-0522:22gfredericksso you train yourself to not touch the file for a few seconds after an ns change?#2018-01-0522:23vemvrace conditions aren't a risk#2018-01-0522:23vemvif I saved again, my copy would 'win'#2018-01-0522:23vemvthat that copy would be reformatted again#2018-01-0522:23vemvno scenario where my changes are eaten#2018-01-0522:24gfredericksoh, so it only reverts if there aren't local changes
#2018-01-0522:24gfredericksI need to figure out how to set this up#2018-01-0522:25vemvbtw I just realised that you are the author of how-to-ns 🙂#2018-01-0522:25vemvso yeah our file-watcher uses how-to-ns and the newlinetoo#2018-01-0522:25vemv+ cljfmt#2018-01-0522:25vemvall of those had to be forked...#2018-01-0522:26gfredericksnewlinetoo == that other thing I made?#2018-01-0522:26vemv*newline one too#2018-01-0522:26gfredericksis cljfmt also too wrapped up in lein, or was that for another reason?#2018-01-0522:28vemvI found I could disentangle all these quickly, since core functionality was in separate non-leiny ns's#2018-01-0605:20qqq
(progn ;; * lispy 
  (add-hook 'clojure-mode (lambda () (lispy-mode 1))) 
  (add-hook 'clojurescript-mode (lambda () (lispy-mode 1))) 
  (add-hook 'clojurec-mode (lambda () (lispy-mode 1))) 
  (add-hook 'lispy-mode-hook #'lispyville-mode))
is this buggy? lispy does not seem to be running when I enter clojurec-mode
#2018-01-0607:11dpsuttonyou need to hook up to clojure-mode-hook i thought. you just have mode there#2018-01-0609:14bozhidarAlso - you don’t need to do this for modes derived from clojure-mode.#2018-01-0609:15bozhidarAnd you can simplify this to just (add-hook 'clojure-mode-hook 'lispy-mode)#2018-01-0610:36qqqis it 'lispy-mode or #'lispy-mode ?#2018-01-0610:37qqqhmm, plain 'lispy-mode worked#2018-01-0610:37qqqweird, copy-pasted init.el has:
(progn ;; * lispy 
  (add-hook 'lisp-mode-hook 'lispy-mode) 
  (add-hook 'emacs-lisp-mode-hook 'lispy-mode) 
  (add-hook 'clojure-mode-hook 'lispy-mode) 
  (add-hook 'lispy-mode-hook #'lispyville-mode))
#2018-01-0610:37qqqso for whatever reason, lispyville-mode iks a #'#2018-01-0623:14gfredericksis there an official way to set the opts for the embedded version of puget?#2018-01-0703:38mikebSorry for the long messages, but I wanted to give some context for some trouble I'm having some trouble getting clojure+emacs setup and packages to install from melpa, specifically clojure-mode. The OS is macos sierra on an older macbook pro. I first tried installing http://emacsformacosx.com (25.3 & 25.2) but it would crash immediately when attempting to M-x package-list-packages, or anything package related. I then moved over to a brew install method on http://clojure-doc.org/articles/tutorials/emacs.html#installing-emacs using the command "brew install emacs --with-cocoa" and also tried with --gnu-utils as a stack overflow post mentioned there might be ssl issues with refreshing packages. My ~/.emacs.d/init.el is empty and I've put in the config listed at http://clojure-doc.org/articles/tutorials/emacs.html#configuring-emacs and also the config listed at https://melpa.org/#/getting-started. I've tried both the SSL and non-ssl repository urls. I have also confirmed that the init.el is actually being loaded by the emacs started by putting some other settings below that do take effect when the editor is started. After each of these different configurations were entered I restarted and did a "M-x package-refresh-contents" Still no luck and each time I attempt to install clojure mode either in the config file or with "M-x package-install RET clojure-mode RET" I get a "[No match]" and can't find clojure-mode when attempting to list the available packages with "M-x page-list-packages". I must be missing something easy, does anyone have any advice for what to try next? Or perhaps there are some issues with emacs on OSX causing this? Thanks and any help would be much appreciated.#2018-01-0703:57qqqI'm using plain gnu emacs 25.1 and have had no problems.#2018-01-0703:58qqqCan you reduce your failure case from wall of text down to one particular problem?#2018-01-0703:58qqqIt should either be something of the form: * I can't install package XYZ OR * I can instal XYZ, but when I try to do FOO, BAR happens * or something like that -- one particular poblem to resolve at a time.#2018-01-0704:01mikebYes, unable to install clojure-mode.#2018-01-0704:01mikeball the description was my attempts to do this single task.#2018-01-0704:10vemvsimply for debugging purposes, you can tentatively install a 'starter kit' (like prelude or spacemacs) and see if the installer works#2018-01-0704:10vemvif they don't, something is wrong with your mac#2018-01-0704:13mikebJust installed aquamacs and clojure-mode was found an installed without issue. My feeling is that there is something very broken on macos sierra with plain emacs (brew and emacsforosx) and connecting to melpa.#2018-01-0704:14vemvyou can try my suggestion for confirming 100% your hypothesis#2018-01-0704:14vemvyou can also install https://github.com/railwaycat/homebrew-emacsmacport , I use that one#2018-01-0704:15vemvdifferent from default brew distro#2018-01-0704:15vemvyou can also take inspiration from the 14 first lines https://github.com/vemv/.emacs.d/blob/master/lib/non-submodules/vemv.init.el#2018-01-0704:16vemva couple of nuances are needed for installing packages from elisp code, as reflected here ^#2018-01-0704:19mikebYeah one of the many configs attempted was the same as those 14 lines and still failed to pull package list from melpa and thus wouldn't install.#2018-01-0704:20vemvI think changing http <-> https fixed a similar issue I was having. note the 3 urls in my code, some are http, others https#2018-01-0704:21vemvbut yeah it could be Sierra#2018-01-0704:41mikebspacemacs worked! I wanted to avoid it but it did work.#2018-01-0704:45mikebThanks.#2018-01-0712:22stardivinerHope someone can review my code https://github.com/stardiviner/ob-clojure-literate/compare/feature/org-babel-initiate-session (I'm not good at elisp, I just modify some code based on existing code)#2018-01-0715:57nenadalmHi. Does anybody know how to setup Emacs so that I can start 2 repls within same project? I am using https://github.com/macchiato-framework/macchiato-template/blob/master/resources/leiningen/new/macchiato/project.clj#L33 There are 2 clojurescript builds (one for browser, another for server). Which one is active is determined by profile (`:broser-dev` or :dev). Each has it's own figwheel config. Here is my clojure config: https://gist.github.com/nenadalm/dd400aaf3d78d4cb59cc3c6c65eefba3#file-emacs-L90. I managed to setup clojurescript for other projects using cider-jack-in-clojurescript, but I suppose I would have specify lein profile somehow when running it?#2018-01-0722:46vemvKeep an eye on these CIDER ongoing developments: #2069, #1976#2018-01-0806:44nenadalmthanks. I'll look into it.#2018-01-0716:16nenadalmjust to clarify: it works for me on backend (src/server), but when I run cider-jack-in-clojurescript again, it tells me that port is used already (as it won't know that I want to take the figwhell config from different profile).#2018-01-0803:04tianshucider-jack-in-clojurescript will first do cider-jack-in, then create a new repl buffer for clojurescript.#2018-01-0803:05tianshuso you will have two repl in the end, one for clojure and one for clojurescript.#2018-01-0803:24dpsuttoni think he needs to jack in twice is the problem, both times with clojurescript#2018-01-0803:25dpsutton@nenadalm try something like
(defun my-jack-in-server ()
  (interactive)
  (let ((cider-lein-global-options "with-profile server-profile"))
    (cider-jack-in-clojurescript)))
#2018-01-0806:38nenadalm@dpsutton thanks. It doesn't work but it seems to be step in right direction. I've tried running the function after cider-jack-in-clojurescript but got some error:
1. Unhandled java.io.FileNotFoundException
   Could not locate figwheel_sidecar/repl_api__init.class or
   figwheel_sidecar/repl_api.clj on classpath. Please check that
   namespaces with dashes use underscores in the Clojure file name.
I will try to look at it more in the evening.
#2018-01-0903:43qqqI know about set-window-dedicated-p. It's not what . Iwant: I want a situation where a frame is attached to a wincow and does NOT displ.ay any other windows#2018-01-0903:44qqqEven with set-window-dedicated-p, I get the situation taht the frame may decide to split and display two windows. I don't want that. I want this frame to display this one window -- and never display anything else.#2018-01-0903:45qqqbasically I want a command that says: this frame has this current layout with these windows/buffers; NEVER change at all; force all new windows/buffers to appears elsewhere#2018-01-0907:16qqqhttps://www.gnu.org/software/emacs/manual/html_node/eintr/what_002dline.html is this for real? in emacs, getting "what line am I currently on" requires scanning through the entire buffer ?#2018-01-0913:39vemvanyone able to open N files at the same time with helm?#2018-01-0913:39vemve.g. mark a few with C-SPC, try the "open file" action#2018-01-0913:39vemvit just opens one file. seems a usual pitfall#2018-01-0913:47vemv-- the 'persistent action' seems to do basically that. although it'd be more uniform if I could use a plain action#2018-01-0920:31gfredericksI'm trying to debug an issue where shutdown hooks are not run when I do cider-restart; I'm having trouble even finding the code that kills the server. any tips?#2018-01-0922:31bozhidarAre you looking for this or something else?#2018-01-0922:31bozhidar
(defun cider--close-connection-buffer (conn-buffer)
  "Close CONN-BUFFER, removing it from variable `cider-connections'.
Also close associated REPL and server buffers."
  (let ((buffer (get-buffer conn-buffer))
        (nrepl-messages-buffer (and nrepl-log-messages
                                    (nrepl-messages-buffer conn-buffer))))
    (setq cider-connections
          (delq buffer cider-connections))
    (when (buffer-live-p buffer)
      (with-current-buffer buffer
        (when spinner-current (spinner-stop))
        (when nrepl-tunnel-buffer
          (cider--close-buffer nrepl-tunnel-buffer)))
      ;; If this is the only (or last) REPL connected to its server, the
      ;; kill-process hook will kill the server.
      (cider--close-buffer buffer)
      (when nrepl-messages-buffer
        (kill-buffer nrepl-messages-buffer)))))
#2018-01-0922:32bozhidarWhich shutdown hooks are you referring to?#2018-01-0923:05gfredericksif I do cider-jack-in followed by cider-restart, my assumption is that the jvm running the nrepl server gets shutdown#2018-01-0923:06gfredericksis the process managed by emacs, and so kill-buffer ends up killing the process?#2018-01-0923:06gfredericksI can contrast this effect with what happens when I do lein trampoline repl :headless (probably also lein repl would be equivalent) followed by C-c, in which case the shutdown hooks do run#2018-01-1015:27piotr-yuxuanHi there! I’d like to be able to reformat (empty? [ ]) to (empty? []) (remove unnecessary spaces). I may be blind but I haven’t found yet the proper command to use in Emacs. Is it possible?#2018-01-1015:34chrisdoes cider-format-buffer do what you want?#2018-01-1015:40piotr-yuxuanNeither cider-format-buffer nor cider-format-region do what I described. I’ve just got a mostly empty emacs init.el with bare minimum for Clojure (paredit, cider, expand-region) so I guess it doesn’t come from a setting problem, does it?#2018-01-1015:46piotr-yuxuanfill-region has almost the expected behaviour#2018-01-1015:47mgrbytecider-format-region and cider-format-buffer work for me fwiw#2018-01-1015:47chrisfor me, cider-format-* removes the spaces between the [ ], is that not what you're seeing?#2018-01-1015:52piotr-yuxuanHa! yes indeed, cider-format-* removes the spaces between the [ ]. I didn’t notice it 😕, sorry for that. But the space useless spaces between empty? and [ are still present.#2018-01-1020:33bozhidar@piotr2b Guess you should report this as a cljfmt bug, as this is what CIDER users internally for this command.#2018-01-1020:35bozhidarI such situations I usually just use M-\ and M-SPC.#2018-01-1021:38gfredericksI've dug into the shutdown hooks issue some more and figured out some interesting stuff - the elisp documentation for kill-buffer (which I think is how cider is killing the jvm) states that it issues SIGHUP to any dependent processes - I've confirmed from many directions that a jvm runs shutdown hooks on SIGHUP -- they run if you signal the jvm directly, they run if you signal the lein jvm that spawned it, they run if you signal the bash process that created the lein vm that created the real vm - I've even tried running kill-buffer from the cider nrepl buffer, and even that runs the shutdown hooks - but when I run cider-quit from the cider repl buffer, they get skipped#2018-01-1022:04dpsutton
if (! (EQ (symbol, Qsignal) || EQ (symbol, Qexit)))
	    pset_status (p, list2 (Qsignal, make_number (SIGKILL)));
#2018-01-1022:04dpsuttonlooks like emacs way down in the way cider closes sends SIGKILL#2018-01-1022:05dpsuttonline 1073 in process.c. called from cider-interaction in cider--close-buffer#2018-01-1022:05dpsutton@gfredericks ^#2018-01-1022:06gfredericksso it's not kill-buffer then?#2018-01-1022:06dpsutton(when proc (delete-process proc))#2018-01-1022:06gfredericksah#2018-01-1022:06dpsuttonit deletes the process first. which ironically doesn't clean up after itself?#2018-01-1022:07dpsuttonC-h C-f cider--close-buffer and you'll be where i'm looking#2018-01-1022:08gfredericksgot it#2018-01-1022:08gfredericksany guesses on whether this is by design or could be improved?#2018-01-1022:09dpsuttonno idea. my guess is that this delete process and then kill the buffer felt more responsible but it seems to do it improperly#2018-01-1022:10dpsuttonand the commit from @malabarba is just > Don't try to close a dead connection#2018-01-1022:10gfrederickswhat's the standard practice in this situation? send a weaker signal and wait a few seconds and then kill it forcibly?#2018-01-1022:10dpsuttoni'm not strong in the posix. i have no idea#2018-01-1022:11dpsuttoni feel like noise smith or someone might know in general#2018-01-1022:11dpsuttonor #clojure i mean#2018-01-1022:12gfredericks@noisesmith hi#2018-01-1022:20noisesmiththis reminds me of issues that come up when running a child jvm under windows (probably not the same issue though)#2018-01-1022:21noisesmithI’ll back burner this and let you know if I remember something important, but honestly I backed away from emacs because it introduces too many interesting problems and almost useful utilities - it was constantly nerd sniping me and I’ve had more free time since I stopped using it#2018-01-1022:36gfredericksyou just trolled 700 people at once#2018-01-1022:42noisesmithit seems my tact is running on a 5 minute delay#2018-01-1022:46richiardiandreabut a and almost useful utilities - slipped in there, which is definitely true 😉#2018-01-1022:47richiardiandreayou probably wanted to say "myriad of useful utilities"#2018-01-1100:05richiardiandreawell, all of a sudden my C-c C-c works as prefix instead of accepting buffers (like in a commit message buffer for instance)...so there might be some truth there#2018-01-1110:00vemvtfw your .emacs.d repo has 40 (self-raised) issues#2018-01-1110:02vemvprobably I'll keep tweaking my emacs as long as I keep doing clojure. I think one can embrace permanent incompleteness, which shouldn't be a foreign concept to us software developers 🙂#2018-01-1116:40richiardiandreaMine? Mine is an Emacs Live fork ;)#2018-01-1206:26vemvjust in case, I had meant "one's"#2018-01-1219:52gfredericks@dpsutton I don't understand why, but based on my experiments the kill-process line you pointed to is not the one that kills the nrepl server process. I believe it's this one: https://github.com/clojure-emacs/cider/blob/3e9ed12e8cfbad04d7618e649322765dc9bff5d6/nrepl-client.el#L625#2018-01-1219:52gfredericksmonkeypatching that function to be a NOOP seems to fix my problem#2018-01-1304:28qqqdoes emacs have something more powerful than save-excursion ?#2018-01-1304:28qqqI want to save the entire buffer, do some work, get a string out of it, then restore the buffer#2018-01-1304:32dpsutton@qqq check out the with-temp-buffer and replace-buffer-contents. the latter can take a buffer and use the text from it#2018-01-1304:33dpsuttonso just make a new temp buffer, use the contents from the buffer you came from and then the buffer goes away when the form is done#2018-01-1305:09qqq@dpsutton creating temporary buffers is simultaneously: 1. so weird from the clojure perpsective of pure functions and 2. so reasoanble given how things work in emacs#2018-01-1310:48bozhidarIt’s a text editor after all. Allegedly. 😄#2018-01-1417:23vemvGiven the following Clojure code:
(defn foo []
  (let [...]
  ;; <---- Cursor is here, column 3



)
#2018-01-1417:24vemv(blank lines are intended, as example)#2018-01-1417:24vemv...if I press <down>, cursor would go from column 3 to column 0. I hate that, since current indentation level is at column 3. i.e I'm editing a let; I don't expect to be removed from that level#2018-01-1417:24vemvso I have to press <tab> right after pressing <down>#2018-01-1417:26vemvso I tried hacked a next-line replacement that executes indent-for-tab-command right after native next-line.#2018-01-1417:26vemvworks, but:#2018-01-1417:26vemv- decreases performance#2018-01-1417:27vemv- modifies the buffer (by inserting whitespace), so the buffer will become 'unsaved' easily#2018-01-1417:27vemvwondering if anyone has felt the same pain / addressed it more robustly?#2018-01-1417:29MacrozI don't generally have those empty lines there, but normally I just keep on typing whatever I'm doing and once in a while press C-tab to indent whole buffer. I don't bother with individual line problems#2018-01-1417:31vemvI don't think we're talking about the same thing. I'm not talking about removing white lines. I'm talking about cursor column being moved to 0, even though its current 'semantic' level is nonzero#2018-01-1417:33Macrozyes, I just told you that I have no such problem because I do not care about the indentation of incomplete code#2018-01-1417:33Macrozor where the cursor is either#2018-01-1417:34Macrozwhat is it that you are trying to achieve with this?#2018-01-1417:35vemvah gotchu, you just type misaligned code, given that it'll be reformatted. it's an approach 🙂 I wouldn't like that myself though#2018-01-1417:35Macrozmind you, I don't use paredit which would enforce correctness#2018-01-1417:35MacrozI used to have tab bound to indenting the whole buffer all the time but that was rather slow with big files#2018-01-1417:36vemvtrying to achieve: simply coding in a way that is aligned at almost-all times, and that doesn't require me to constantly hit <tab>#2018-01-1417:36Macrozhow do you end up with those blank lines in the first place?#2018-01-1417:37Macrozenter indents the next line correctly, it is only the cursor movement down that moves to a blank line that moves the cursor to the last possible position#2018-01-1417:38vemvI don't leave that many, but 1 or 2 on certain cases. for example dense fns benefit from blank lines for delimiting logical chunks#2018-01-1417:39vemvor maybe I do insert many lines, knowing that I'm about to code a bunch of stuff#2018-01-1417:39MacrozI do that too but since emacs remembers the cursor position you can just keep scrolling up or down and it returns to the correct position after the blank line#2018-01-1417:42MacrozI never insert blank lines after#2018-01-1418:13gonewest818You can press return which is usually configured to create a properly indented new line. And in my setup if I were to press ) at the place you’ve indicated, it would close the let and eliminate all the unnecessary blank lines. I never bothered to check, but I would guess paredit is taking care of that for me. #2018-01-1418:42vemv return does that, but when you 'come back' with up/`down`, trailing whitespace will have disappeared#2018-01-1418:43vemvnote that I want, at the same time, to respect the convention of not leaving trailing whitespace (not that I like that convention; but gotta respect it)#2018-01-1418:45vemvsurely there's a tension between both goals. I reckon that what I want is a 'virtual whitespace grid', by which having the cursor at column N does not necessarily mean that there are N space characters in that line#2018-01-1418:45vemviirc, IntelliJ can do that#2018-01-1418:49dpsuttonmy understanding is that this is a limitation of emacs. it does not work on a grid system but on a list of characters that forms the buffer.#2018-01-1418:50dpsuttonso you can't be at column 5 unless there are 4 characters preceding you#2018-01-1418:50vemvsounds likely, thanks for the input!#2018-01-1420:15bozhidarYeah, that’s about right. You can’t be visiting a buffer location that doesn’t really exist.#2018-01-1421:27benedekunless you are in picture mode 😉#2018-01-1421:28benedekthe freedom is amazing in picture mode#2018-01-1503:41vemvtried out picture mode! cool stuff#2018-01-1503:41vemvonly bad part being that it alters the buffer, so it will become 'unsaved' if you click around#2018-01-1504:16qqqI wonder how many years Cs got set back because no one got a real structure editor working#2018-01-1512:48benedekI guess it adds whitespace under the hood.. I may be wrong have not checked#2018-01-1607:37ajshow do you all typically search for usage of a variable or any other text across all your project files? i used to just keep all my files in a flat directory so i could grep at the command line. as projects grow this is not practical, putting stuff into source directories makes more sense, but it breaks this habit#2018-01-1607:49jakobI use this to search for text in project. https://github.com/Wilfred/ag.el . it's very quick#2018-01-1607:58bozhidarI typically use the project search features of Projectile https://github.com/bbatsov/projectile#2018-01-1607:58bozhidarIt supports grep, ag and pt.#2018-01-1607:58ajsi was never able to really “get” into projectile for some reason#2018-01-1607:58ajsit seemed rather heavy but perhaps i will give it another try#2018-01-1607:59bozhidarHeavy it want sense? It just introduces a concept of a project defined by some project marker file and lots of operations you can do with that that project.#2018-01-1607:59bozhidarFor me things like finding files in project, jumping between code and test and switching projects are invaluable.#2018-01-1607:59ajsso if my project is already in a git repo, projectile will just automatically search within just the fils of that repo with no other setup (other than installing projectile) >?#2018-01-1608:00bozhidarBut, of course, I wrote this, so I guess I needed something like it.#2018-01-1608:00bozhidarYes, exactly.#2018-01-1608:00ajsok i’ll try it again#2018-01-1608:03qqq+1 for projectile, it's one of my favorite libraries#2018-01-1608:04qqqI'm using hydra, and I have an entire "hydra" dedicated to projectile related commands "browing project, finding files by name, grepping-aging through all in projectile, search/replace in project"#2018-01-1608:17ajstrying projectile, what is difference between C-c p f and C-c p g ? what does "at point" refer to when looking for a file?#2018-01-1608:24vemvwhat's a good way of asking "am I in clojure mode?" in elisp?#2018-01-1608:24vemvI searched for code that returns a list of major modes, but it seemed quite abysmal#2018-01-1608:26ajsi find it interesting that projectile-grep works even if projectile-mode is disabled#2018-01-1608:29ajsam finding it quite useful despite these curiousities#2018-01-1608:33benedekM-x describe-mode or something like that I guess#2018-01-1608:34benedekafaik you can be in only one major mode and many minor modes#2018-01-1608:47vemv> afaik you can be in only one major mode and many minor modes actually had forgotten about this 🙂 thanks for the hint#2018-01-1608:47vemvmajor-mode is what I was looking for#2018-01-1609:22ajscan anyone recommend a replacement for neo-tree? it's pretty good but a bit buggy, the "up a dir" feature doesn't work for me for some reason. I like having a tree of the project appear on the side with a keybinding#2018-01-1613:06vemvI use project-explorer with some additional setup and helper functions I'd say it basically works OOTB, but getting to a fully satisfactory state got me some pain (which I haven't extracted as a lib unfortunately)#2018-01-1614:25bozhidar@ajs I just use dired. It’s basic, but it gets the job done.#2018-01-1614:25bozhidar> i find it interesting that projectile-grep works even if projectile-mode is disabled#2018-01-1614:26bozhidarprojectile-mode is just a container for the default keybindings, no Emacs command needs some mode to be enabled for it to be invoked.#2018-01-1614:26bozhidar> what’s a good way of asking “am I in clojure mode?” in elisp?#2018-01-1614:27bozhidar@vemv (derived-mode-p 'clojure-mode) is the best way to check.#2018-01-1614:28bozhidarUsing major-mode and eq won’t work for derived modes, which generally are consistent with the parent mode.#2018-01-1614:28bozhidar> trying projectile, what is difference between C-c p f and C-c p g ? what does “at point” refer to when looking for a file?#2018-01-1614:28bozhidar@ajs It’s the text your cursor is on. Just standard Emacs terminology.#2018-01-1614:30vemvThanks for the pointer! I was using a weaker check, something like (string-contains? (str major-mode) "clojure")#2018-01-1614:40bozhidarYou’re welcome.#2018-01-1614:40bozhidarFor the thing at point - the command has a better description that the manual.#2018-01-1614:40bozhidar
If point is on a filename, Projectile first tries to search for that
file in project:

- If it finds just a file, it switches to that file instantly.  This works even
if the filename is incomplete, but there's only a single file in the current project
that matches the filename at point.  For example, if there's only a single file named
\"projectile/projectile.el\" but the current filename is \"projectile/proj\" (incomplete),
`projectile-find-file-dwim' still switches to \"projectile/projectile.el\" immediately
 because this is the only filename that matches.

- If it finds a list of files, the list is displayed for selecting.  A list of
files is displayed when a filename appears more than one in the project or the
filename at point is a prefix of more than two files in a project.  For example,
if `projectile-find-file-dwim' is executed on a filepath like \"projectile/\", it lists
the content of that directory.  If it is executed on a partial filename like
 \"projectile/a\", a list of files with character 'a' in that directory is presented.
#2018-01-1614:40bozhidar(that’s for C-c p g)#2018-01-1615:52tianshuI try to use squiggly-clojure, it works for some errors (:def-in-def, ), but not work for :wrong-arity, something I missed?#2018-01-1701:05qqqI'm expecting
(add-hook 'lispy-mode-hook
	  (lambda ()
	    (setq-local outline-regexp 
			(concat "^\\s-*("
				(regexp-opt '("progn" "def" "defun" "defn" "do"))
				".*"

				)))) 
(progn
  (progn
    (progn
      (defun foo (x y)
	(+ x y)))))

to match the {progn and (defun lines for "outline headers", but it's not matching them
#2018-01-1701:05qqqC-h v outline-regexp shows:
outline-regexp is a variable defined in ‘outline.el’.
Its value is "^\\s-*(\\(?:d\\(?:ef\\(?:u?n\\)?\\|o\\)\\|progn\\)"
#2018-01-1707:38qqqanyone else running into an issue where "lispy--indent-region" is incorrectly indenting regions that have been collapsed in outline mode ?#2018-01-1716:28qqqI'm thinking about switching from helm to ivy + counsel + swiper -- anyone made this transition / have feed back ?#2018-01-1717:00bozhidar@qqq I did something similar - switched from ido to the ivy stack and I’m loving it.#2018-01-1717:00bozhidarIt’s very consistent and very fast.#2018-01-1717:01bozhidarNo need to install a ton of packages get consistent interface everywhere.#2018-01-1717:30bostonaholicthe ics stack is really nice#2018-01-1717:30bostonaholicI’ve switched to using that from helm but haven’t gotten my fingers to work quite right, yet#2018-01-1718:03qqq@bozhidar @bostonaholic: are either of your init.el public? I'm just looking for stuff to steal#2018-01-1718:03bozhidarYeah, mine is.#2018-01-1718:04qqqhttps://github.com/bbatsov/emacs.d/blob/master/init.el#2018-01-1718:04bozhidarhttps://github.com/bbatsov/emacs.d#2018-01-1718:04bozhidarand my more generic config https://github.com/bbatsov/prelude#2018-01-1718:08qqqdo you use avy-goto-word/char in practice? I tried it for a few weeks and found I like vim keys more for jumping around#2018-01-1718:11tanzoniteblack@qqq I use avy-goto-word-1 constantly#2018-01-1719:15bozhidarSame here.#2018-01-1719:16bozhidarI almost never navigate within the visual part of buffer in a different manner.#2018-01-1802:26qqqso let me get this straight, your preferred way of navigation is: 1. look at word you want to jump to 2. hit hot key to activate avy-goto-word-1 3. press first letter of word 4. look on screen, looking for the likttle "red overlay letters' to pop up 5. hit the right combo for the overlay char 6. cursor moves there ?#2018-01-1804:08qqqI'm trying to ditch helm. However, I can't find a replacement for: https://github.com/alphapapa/helm-org-rifle basically, I want to hit some hotkey, then narrow through all ORG-MODE-HEADERS#2018-01-1805:47qqqI have a piece of code that looks like:
(general-define-key :keymaps 'evil-normal-state-map
			   "h" (lambda () (interactive) (evil-previous-open-paren 1) (evil-insert 0))
			   "l" (lambda () (interactive) (evil-next-close-paren 1) (evil-append 0))
			   "j" 'lispy-outline-next
			   "k" 'lispy-outline-prev
			   ";" (lambda () (interactive)
				 (evil-next-line 1) (evil-previous-line 1) (evil-first-non-blank)
				 (org-cycle) (indent-sexp)) 
			   "\\" '(lambda () (interactive) (recenter-top-bottom))
			   "q" 'hh-q/body "w" 'hh-w/body "e" 'hh-e/body "t" 'hh-t/body
			   "a" 'hh-a/body "s" 'hh-s/body "f" 'hh-f/body "g" 'hh-g/body 
			   "z" 'hh-z/body "x" 'hh-x/body "v" 'hh-v/body "c" 'hh-c/body "b" 'hh-b/body
			   "H" 'hh-H/body)
this is great, EXCEPT that lispyville overwrites my definitions of "c", installing lispyville-change overwriting my hh-c/body I'm not sure how the order of keymaps work in emacs for minor mode, but how do I ensure mine has a higher precedence than lispyville-change ?
#2018-01-1805:57dpsuttonJust define your key binding in the lispy mode map#2018-01-1806:09qqqhere's my current understanding, please tell me what I'm doing wrong:#2018-01-1806:09qqqI have no added:
(general-define-key :keymaps 'lispyville-normal-state-map
			   "q" 'hh-q/body "w" 'hh-w/body "e" 'hh-e/body "t" 'hh-t/body
			   "a" 'hh-a/body "s" 'hh-s/body "f" 'hh-f/body "g" 'hh-g/body 
			   "z" 'hh-z/body "x" 'hh-x/body "v" 'hh-v/body "c" 'hh-c/body "b" 'hh-b/body
			   "H" 'hh-H/body)
#2018-01-1806:10qqqthis is after C-h v minor-mode-map-alist and seeing lispyville up there defining lispyville-change#2018-01-1806:10qqqin particular, lispyville defines this, which I'm trying to overwrite:
(lispyville-mode keymap
		  (emacs-state keymap "Auxiliary keymap for Emacs state"
			       (23 . lispyville-delete-backward-word))
		  (insert-state keymap "Auxiliary keymap for Insert state"
				(23 . lispyville-delete-backward-word))
		  (visual-state keymap "Auxiliary keymap for Visual state"
				(88 . lispyville-delete-char-or-splice-backwards)
				(120 . lispyville-delete-char-or-splice)
				(67 . lispyville-change-line)
				(68 . lispyville-delete-line)
				(89 . lispyville-yank-line)
				(99 . lispyville-change)
				(100 . lispyville-delete)
				(121 . lispyville-yank))
		  (normal-state keymap "Auxiliary keymap for Normal state"
				(88 . lispyville-delete-char-or-splice-backwards)
				(120 . lispyville-delete-char-or-splice)
				(67 . lispyville-change-line)
				(68 . lispyville-delete-line)
				(89 . lispyville-yank-line)
				(99 . lispyville-change)
				(100 . lispyville-delete)
				(121 . lispyville-yank)))

#2018-01-1806:12qqqgot it working, what I needed was:
(general-define-key :keymaps 'lispyville-mode-map
			   :states '(normal)
			   "q" 'hh-q/body "w" 'hh-w/body "e" 'hh-e/body "t" 'hh-t/body
			   "a" 'hh-a/body "s" 'hh-s/body "f" 'hh-f/body "g" 'hh-g/body 
			   "z" 'hh-z/body "x" 'hh-x/body "v" 'hh-v/body "c" 'hh-c/body "b" 'hh-b/body
			   "H" 'hh-H/body)
#2018-01-1806:49bozhidar@qqq Yeah, you’re right about how I use avy.#2018-01-1807:27qqqhow do I configure the # of lines that counsel-imenu shows by default ?#2018-01-1807:42qqqivy-height#2018-01-1911:17qqqdoes emacs have a key for 'jump to last point' ?#2018-01-1911:41mgrbytelast point = end of buffer?#2018-01-1912:39qqqno, sorry, not (point-max)#2018-01-1912:39qqqsometimes due to avy/evil/lispy interactions, I press a set of keys, and my cursor jumps seomwhere random#2018-01-1912:39qqqI really want a "back key" which jumps my cursor back to where it was 1 second ago#2018-01-1913:30bozhidarhttps://www.gnu.org/software/emacs/manual/html_node/emacs/Mark-Ring.html#2018-01-1913:31bozhidarMany commands that cause the cursor to jump around rely on the mark-ring to make it easy for users to go back to where they were.#2018-01-1913:33qqqso C-space is set-mark-command#2018-01-1913:33qqqis C-u C-space (set-mark-command 0) ?#2018-01-1919:25dadairI have a large mono repo containing several different internal project directories (but the mono repo is the project according to Projectile). I generated TAGS for the monorepo, and now completion is cumbersome (often takes order of seconds, on input I don’t want completed). I tried just removing the TAGS file (manually through a rm), but Emacs (spacemacs) endlessly “detects changes” to TAGS and asks me to re-read, even though the file isn’t there. Is there a clean/clear way of removing TAGS and not having Emacs (projectile?) complain?#2018-01-1920:59richiardiandrea@dadair Projectile detects "sub-projects" if you create a .projectile file in the sub folders#2018-01-1922:45qqqmy current emacs is perfectly fine with [}#2018-01-1922:45qqqis there some mode that will display this in bright red or something to indicate to me that this is an error ?#2018-01-1922:46richiardiandreaI am not sure but maybe rainbow-delimiters does that#2018-01-1922:46bostonaholicparedit makes that very difficult to even be a thing#2018-01-1922:47qqqoh absolutely, this doesn't happen on a regular basis#2018-01-1922:47qqqbut when I do fuck up and it happens, I don't know how ot fix it#2018-01-1922:47qqqbecause there's almost no suport, so I end up binary searching the sexps#2018-01-1922:47richiardiandreaI use paredit and rainbow-delimiters together, when I break things I see red, I am just not sure who is doing that#2018-01-1922:48qqqI'm now using lispy + lispyville + rainbow-delimiters, so I will be able to tell you soon#2018-01-1922:48richiardiandreayeah so I used what-face and it says rainbow-delimiters-unmatched-face#2018-01-1922:52qqqeither I'm becoming colorbind or I'm not getting rainbows despite it saying "rainbow-delimiters-mode enabled"#2018-01-1922:57qqqokay, I got rainbow delimiters working, but it's not showing bright red anywhere#2018-01-1922:59richiardiandrea@qqq can you go on the extra paren and M-x what-face#2018-01-1922:59richiardiandreamaybe you have some other mode on#2018-01-1923:07qqqokay, when I create a 'purposely bad' example, rainbow delimiter picks it up#2018-01-1923:07qqqunfortunatley, it thinks my code (which cider eval last sexp is complaininga buot, is fine#2018-01-1923:08qqqI must be sending it an unbalanced sexp somehow#2018-01-1923:08richiardiandreaoh...yeah...#2018-01-1923:11qqqfound it!#2018-01-1923:11qqqconsider the typo:
#([::prevOf %2k])
#2018-01-1923:11qqqit's perfectly balanced, but if I eval it in cider, I get "unmatched delimiter )"#2018-01-2007:52vemvwhat's a recommended way to jump at 'word' level within Clojure buffers? e.g. in hello-my-friend, if cursor if at h, I may want to jump to m and then to f currently I only have a way to jump across whole tokens, i.e. from h to d#2018-01-2018:32richiardiandreasubword mode iirc works very well for this with standard forward word#2018-01-2019:21vemvgood pointer, you made me realise that plain forward-word/`backward-word` don't deal with FooBarBaz (only with foo-bar-baz) unless subword-mode is enabled#2018-01-2007:55qqqevil-forward-word#2018-01-2007:55qqqor 'avy' for jumping word to anywhere in screen#2018-01-2008:19vemvavy seems rather nuclear for what I want 🙂#2018-01-2008:20vemvevil-f-w may be a choice, although I don't use evil. could bloat my dependencies#2018-01-2008:36vemvbackward-word / forward-word seem good enough, hadn't bothered searching in good old M-x (especially with the smex improvement)#2018-01-2009:53vemvtrying to accomplish what the screenshot here shows http://emacsredux.com/blog/2013/05/31/highlight-lines-that-exceed-a-certain-length-limit/#2018-01-2009:53vemvbut I get little dots $s, etc, don't want those#2018-01-2009:53vemvI looked at various configs, including prelude. still not clear how to disable them#2018-01-2009:54bozhidar(setq whitespace-style '(face lines-tail))#2018-01-2009:54vemvexactly what I had tried 😞#2018-01-2009:55bozhidarDid you evaluate this?#2018-01-2009:56bozhidarI read the docs now and I’m pretty certain this is correct.#2018-01-2009:56vemvyes, eval'd#2018-01-2009:56bozhidar(plus I wrote this blog post and that’s my config) 😄#2018-01-2009:57vemvyes 🙂 made sure to reproduce the prelude config#2018-01-2009:57vemv says about face: > Enable all visualizations which use special faces. This element has a special meaning: if it is absent from the list, none of the other visualizations take effect except space-mark, tab-mark, and newline-mark. the "except" calls my attention. it's as if they were mandatory#2018-01-2009:58bozhidarYou should start with face and then just list what you want visualized.#2018-01-2009:59vemvdebugged the issue#2018-01-2009:59vemvthe setq doesn't have an immediate effect#2018-01-2009:59vemvfor it to be applied, I have to M-x whitespace-mode twice#2018-01-2010:00vemvthanks for the hints!#2018-01-2123:39vemvwishlist (might implement myself as well): given a defn with & {:keys [foo bar baz]} signature, and an invocation to that defn that I'm just typing now, generate a "stub" with those keywords arguments written for me example: (hello) -> <magic command/shortcut> -> (hello :foo :bar :baz ) (note the double spaces. so I know I must fill in between)#2018-01-2123:39vemvdunno if such a thing exists already#2018-01-2207:05bozhidarIt doesn’t.#2018-01-2207:05bozhidarSomeone suggested such functionality a while ago, but it was incomplete at the time.#2018-01-2207:13bozhidarThe idea wasn’t bad, but it wasn’t implemented in terms of middleware https://github.com/clojure-emacs/cider/pull/2119#2018-01-2208:42vemvnice! will try to pick up that work and middlewareize it.#2018-01-2207:13bozhidar@vemv ^^#2018-01-2208:43benedekwe don't have exactly this in cljr but we do have some functionality around generating stubs. may give ux hints. check out wiki pages for extract fn, promote fn and fn from example#2018-01-2307:26stardivinerMaybe you can try counsel-org-goto. It just only work in single Org-mode file.#2018-01-2312:57vemvwondering if magit (which I haven’t adopted/tried as my needs are relatively simple) or something else can provide this: view current buffer as per branch xxx. e.g. I’m in branch yyy, want to temporarily view the buffer as I switched to the branch to xxx like https://github.com/pidu/git-timemachine but travelling in a different dimension 🙂#2018-01-2315:12andrea.crottiwell I just do M-! git checkout other-branch file @vemv#2018-01-2315:13andrea.crottiand then I discard the changes with magit when I'm done#2018-01-2315:13andrea.crottithere is also magit-checkout-file though#2018-01-2315:13andrea.crottieven if it's probably the same#2018-01-2315:13andrea.crottijust more auto completion#2018-01-2315:59vemv> well I just do M-! git checkout other-branch file does that change the repo’s branch (which I don’t want)?#2018-01-2315:59vemvcan try magit-checkout-file, thanks! @andrea.crotti#2018-01-2316:07richiardiandreaI have a strange failure in my inf-clojure tests ..the (thing-at-point 'symbol) call returns differently in the tests and in the actual code buffer with the mode applied on? Is there anything modifying the behavior of it at runtime?#2018-01-2316:10richiardiandreaOk I think I found https://emacs.stackexchange.com/questions/37111/make-thing-at-point-treat-dot-as-a-symbol-constituent-character#2018-01-2316:11richiardiandreaI am enabling the mode in my test buffer but probably it is not enough#2018-01-2412:42qqqthis is baffling me to no ends:
(font-lock-add-keywords m  '(("progn" . outline-1))
does NOT work, but
(font-lock-add-keywords m '(("progn" . 'outline-1))
works note the extra ' in the second one ... but I don't get why we need double ' ' since the entire sexp is already inside a '
#2018-01-2418:27felipebarrosI believe things are evaluated from the inside out, so even if the container list is quoted so it is not evaluated in its context, it may contain sexps that need evaluation.#2018-01-2715:28qqqhttps://www.emacswiki.org/emacs/ShowWhitespaceMode <-- is this the ideal way to resolve "make all trailing whitespace visible"#2018-01-2715:53mpenetYou can just use whitespace-mode for this. That + a hook to delete trailing whitespace on save is quite nice#2018-01-2715:55qqqauto delete scares me a bit due to bad intedraction with outline heading collapse mode#2018-01-2715:55mpenetI personally do this + add highlighting of content after 80 cols#2018-01-2807:35qqqWhat's a good emacs theme where the bg is completely black?
#2018-01-2807:36qqqMany of the *-dark themes have a dark gray, but not pure black bg.#2018-01-2807:41felipebarros@qqq try cyberpunk-theme, which is the official theme of emacs-live#2018-01-2816:33kitallisdoes anyone know how to do to multi-sexp raise-sexp?#2018-01-2816:33qqqI think lispy has a "multi cursor" setup#2018-01-2816:33kitallisoh, with paredit, I mean#2018-01-2816:34qqqfunny, as I've been thinking this exact problem past few days#2018-01-2816:34kitallisregular select + raise-sexp does not work – it does weird things#2018-01-2816:34qqqhttps://www.reddit.com/r/emacs/comments/1z64mv/lispyel_with_multiple_cursors_screencast/ <-- switch to lispy? 🙂#2018-01-2816:35qqqor maybe https://github.com/magnars/multiple-cursors.el is what you want#2018-01-2816:35kitallisno, I don’t think this a multi-cursor problem technically#2018-01-2816:35kitallisthough I can see how it would solve it#2018-01-2816:35kitallisI don’t want any of the ViMsy stuff in lispy#2018-01-2816:36kitallisIs there a way to disable all of that?#2018-01-2816:36qqqit only happens when you rcursor is in front of ( or right after a )#2018-01-2816:36qqqotherwise, you won't trigger anything#2018-01-2816:36kitallishrm#2018-01-2816:36kitallislet me try it#2018-01-2816:36kitallisotherwise it appears to be paredit-compatible everything else#2018-01-2816:36qqqI used to use paredit, switched to lispy, and now love it#2018-01-2816:37qqqthere's one thing to be care of, ()[]{} is a bit weird#2018-01-2816:37kitallisin what way?#2018-01-2816:37qqqyou probably want (general-define-key :keymaps 'lispy-mode-map "[" 'lispy-brackets) somewhere#2018-01-2816:38qqqotherwise, [ may insert {} or something else instead#2018-01-2816:38kitalliswhat?#2018-01-2816:39qqqI'm a terrible salesman, maybe I should have waited until you tried lispy before mentioning this, lol.#2018-01-2816:57kitallis@qqq what’s the lispy alternative to M-left / M-right#2018-01-2816:57kitallisbasically move inside a sexp#2018-01-2817:02kitallisoh, nvm that command is in bindings.el#2018-01-2817:02kitallislispy seems to be jacking it#2018-01-2817:04kitalliswith (lispy-outline-demote)#2018-01-2817:09qqqsorry, was afk#2018-01-2817:09qqqhttp://oremacs.com/lispy/ <-- full docs of all keys / commands#2018-01-2817:09qqq@kitallis: ^#2018-01-2817:38qqqTIL it's possible to customize face directly from describe-face 🙂 🙂 🙂#2018-01-2908:55vemvhi folks, anyone has specific tips for using cider/clj-refactor with mount? I had to wrestle quite a lot with an existing project before getting it to work flawlessly#2018-01-2908:56vemveven then, if I (init) too fast (typical user.clj function), I will get errors like:#2018-01-2908:56vemvuser-error: Some namespaces are in a bad state: error "No namespace: x.y found" in x.y#2018-01-2908:57vemvx.y being a ns that is generally correct#2018-01-2908:58vemvso, my main concern is about race conditions. maybe I can teach mount lifecycle functions to wait till CIDER compilation is done? (if that makes sense. don't have a full picture of this project)#2018-01-2909:11benedekyou could be bitten by https://github.com/clojure-emacs/refactor-nrepl/issues/134#2018-01-2909:12benedekyou can mitigate this by not allowing cljr to build ASTs at start up#2018-01-2909:13benedekso it pops up a question when you invoke a feature which does need it -- bit annoying but might be the right thing for your project#2018-01-2909:25vemvgood call @benedek! indeed there's a call to refresh in the project code#2018-01-2909:26vemvis the need for refresh avoidable while still having the refactor-nrepl goodness? it would be frustrating if I had to choose one thing over the other#2018-01-2909:28vemv> not allowing cljr to build ASTs at start up#2018-01-2909:29vemvor conversely, I could build the ASTs in a controlled manner? as part of the Mount lifecycle functions?#2018-01-2909:38benedekso there is a problem when the AST building is being done and you refresh meanwhile#2018-01-2909:38vemvyes, that is my impression#2018-01-2909:39vemvb/c it doesn't happen if I (init) after 30s. only if I do it asap#2018-01-2909:39benedekyou can either do the refresh latter or config off the eager AST building at start-up#2018-01-2909:39benedeknot mount specific btw same error can happen with system etc too unfortunately#2018-01-2909:40vemvwon't I lose accuracy/etc if I do the config-off?#2018-01-2909:40benedeklet me get some config options for you#2018-01-2909:41benedekcljr will ask you when it needs ASTs if it can build them#2018-01-2909:41benedekyou loose a efficiency I guess#2018-01-2909:43vemvgotchu, thanks!#2018-01-2909:44vemvhopefully this could be automated as mentioned: reply 'yes' iff system is loaded#2018-01-2909:45benedekso you want cljr-WARN-ON-EVAL (no caps sorry) to be 'T if you want to stop AST building at start up#2018-01-2909:45benedekor#2018-01-2909:46benedekyou cab set cljr--debug-mode to 't so cljr tells you when AST building is finished#2018-01-2909:46benedekso you can deter refreshing till then#2018-01-2909:48vemv:thumbsup: appreciated!#2018-01-2909:50benedekhope this helps. #2018-01-2909:55tianshuI'm trying to do some insertion and deletion in a post-command-hook function. after that, the undo-list is likely mess up. I want all the change made in post-command-hook and this-command, can be undo with one undo. have no idea how to do this. thanks for any help.#2018-01-2911:04tianshuok, the function which hook at post-command-hook will run again when undo.😂#2018-02-0117:47gganleyI don’t know if anyone here is familiar with the internals of CIDER but is it possible to get details of project.clj?#2018-02-0117:49chrishttps://github.com/expez/edn.el#2018-02-0117:49chrisproject.clj is edn, you can just read it#2018-02-0117:50chrisor this one, which is more recent https://github.com/clojure-emacs/parseclj#2018-02-0117:50chrisand it looks slightly more official#2018-02-0117:51dpsuttoncider doesn't mess with project.clj except to modify the lein command to include its middleware (as far as i know). project.clj is really a lein thing and just knows enough to crank up a lein repl#2018-02-0117:56gganleyWhat I’m thinking of doing is not editing the file but getting some information from the file to inform the behavior of CIDER#2018-02-0117:59gganleyI’m trying to see what the project.clj is targeting and suggest to the user the possibility of using that as a REPL backend instead of Rhino#2018-02-0118:02qqq@gganley: there's actually #cider , and the main dev, @bozhidar , hangs out there#2018-02-0118:02gganleyThe worst part is bug told me about the cider channel but didn’t go, I’m dumb#2018-02-0118:02gganleythank you#2018-02-0120:34richiardiandreaHi folks, how can I avoid the "var risky" question when I am doing something like the following in .dir-locals.el?
((nil . ((projectile-test-suffix-function . #'projectile-lumo-test-suffix)))
#2018-02-0121:42benedekyou can declare it safe i think#2018-02-0121:42benedekthis may help? https://www.gnu.org/software/emacs/manual/html_node/emacs/Safe-File-Variables.html#2018-02-0203:28bozhidarIndeed.#2018-02-0206:27richiardiandreaI have done that and wanted to contribute it back but it keeps asking. I am using the functionp predicate...I will read the link. Thanks @benedek and @bozhidar #2018-02-0208:44bozhidarYou’re welcome!#2018-02-0215:49vemvwhat's the state of shells in Emacs? still limited as it has been traditionally? (e.g. the pager emitted from various shell commands won't properly work)#2018-02-0215:50vemvI've seen some improvements in Emacs 25 (you can clear!), not sure we're 'there' yet though#2018-02-0216:17benedekI am using eshell at work because I have to (working on a restricred win machine, better than vanilla cygwin)#2018-02-0216:17benedekit is ok I am still getting used to it I guess. redirecting output into buffers is nice#2018-02-0216:20vemvis anything broken in your eshell?#2018-02-0217:13gonewest818I use eshell as well. If you’re having issues with pager behavior then read the docs on eshell-visual-commands, eshell-visual-options and eshell-visual-subcommands.#2018-02-0217:17gonewest818Clearing is possible with eshell/clear (which just scrolls any history content off the top of the screen) and eshell/clear-scrollback(which empties the buffer for real).#2018-02-0217:24gonewest818You can use elisp in eshell, too. e.g. like this
~ $ (eshell/clear-scrollback)
or
~ $ echo $(mapcar 'car package-pinned-packages) | cut -d " " -f 1
which-key
#2018-02-0217:36benedekno obvious breakages#2018-02-0217:48vemvnice, thanks for sharing!#2018-02-0217:48vemvI've always used (sh), but willing to give another spin to eshell#2018-02-0218:06richiardiandreaOther q: in comint.el I see define-key map "\er" what is that 😃 ?#2018-02-0219:39gonewest818I saw that syntax recently and had to look it up: “In addition, the <TAB>, <RET>, <ESC>, and <DEL> events are represented by “\t”, “\r”, “\e”, and “\d” respectively” https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Sequences.html#2018-02-0219:46chris(which means M-r)#2018-02-0220:50richiardiandrea@gonewest818 thanks I could find that awesome#2018-02-0220:51richiardiandreaToo bad I have paredit-raise-sexp on that..#2018-02-0414:05vemvI guess the mode-line cannot span more than one line right? I see \n doesn't work#2018-02-0513:57qqq(org-global-cycle 5) <-- how can I run this every time I open / enter a file ?#2018-02-0516:38kingcodeIs there a straightforward/pattern way to execute an action which replaces the current buffer with new content, in another window instead?#2018-02-0516:47cmack@qqq are you trying to set the default visibility? https://orgmode.org/manual/Initial-visibility.html#Initial-visibility might help, esp. the org-startup-folded variable#2018-02-0516:48cmack@kingcode many times the code jumping functionality is mapped to M-. and then the return functionality mapped to M-,#2018-02-0516:51kingcode@cmack Thank you!…That worked, exept for M-. because it is overridden for evil-mode, but I can use another combo for the forward search…#2018-02-0516:52cmackI just looked at my bindings (which are mostly default for cider) and it looks like the method you are looking for is cider-pop-back#2018-02-0516:56cmackregarding 2): if you do C-h a cider-find-var you can see the documentation that tells how to do different window. It appears C-u - M-. or C-u C-u M-. should work#2018-02-0516:59kingcode@cmack Thank you!#2018-02-0606:49qqqIn elisp, is there a simple way to alias do as progn ?#2018-02-0606:59qqqin particular, I want to rewrite the following in elisp:
(defmacro do [& args]
  `(progn 
#2018-02-0608:16hkjels@qqq https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/macroexp.el#L320#2018-02-0616:12qqqin Emads, what is the fastest way o find all lines that match a particular regex? I'm looking for all lines that start with
;; *
;; **
;; ***
;; ****
to generate a TOC of sorts. All solutions on SO basically show using find-next-regexp repeatedly until end of buffer. Is there a better solution ?
#2018-02-0616:14caiono idea, but you can look at occurs source to search for insights: https://github.com/emacs-mirror/emacs/blob/master/lisp/replace.el#L1394#2018-02-0616:22bostonaholic@qqq if you’re doing this in org-mode, there is already a way to generate TOC https://orgmode.org/manual/Table-of-contents.html#2018-02-0616:22qqqWhat does the matches in the let form of
(defun re-seq (regexp string)
  "Get a list of all regexp matches in a string"
  (save-match-data
    (let ((pos 0)
          matches)
      (while (string-match regexp string pos)
        (push (match-string 0 string) matches)
        (setq pos (match-end 0)))
      matches)))
mean ?
#2018-02-0616:23qqq@bostonaholic: I'm working on something custom where I pipe it to ivy#2018-02-0616:24dpsuttonit's a nil variable binding#2018-02-0616:24dpsuttonemacs lisp allows for a binding pair, or just a symbol which means it is bound to nil#2018-02-0616:24bostonaholicthe matches is short for (matches nil)#2018-02-0616:25bostonaholicyeah, what @dpsutton said#2018-02-0616:25qqq@dpsutton, @bostonaholic: thanks!#2018-02-0616:26bostonaholicyou can also test it out yourself by evaluating
(let ((pos 0)
      matches)
  matches)
#2018-02-0616:26bostonaholicthat expression returns nil#2018-02-0616:59qqqclojure has a builtin of a hashmap; does emacs have anything similar for storing 'structs' ?#2018-02-0617:00qqqby hashmap I'm referring to a {} where the keys are keywords#2018-02-0617:02chrisemacs has a hash-table#2018-02-0617:02chrishttps://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-Hash.html#Creating-Hash#2018-02-0617:02chrisor if you're on an ancient version you can use alists instead#2018-02-0617:16dpsuttondepending on size alist can be faster and easier. hashmaps have some overhead and can be overkill for simple things#2018-02-0617:48qqq
'((1 2 3) (4 5 6) (7 8 9))
==> (3 6 9) how do I write a ELISP function that does that? I've tried (map #'caddr lst) already, but it doesn't work as map wants 3 arguments
#2018-02-0617:50qqqah, it's mapcar, not map#2018-02-0617:53chrisif you happen to have dash.el (which you probably do, lots of libraries use it) you can just use the functions you expect map, filter, reduce and their friends prefixed with a dash and they will work roughly like the functions you expect#2018-02-0617:53chris-map in dash.el directly wraps mapcar, for example#2018-02-0617:54chrisfyi#2018-02-0618:54qqq
(defun heading-keep? (s)
      (not (string-match "[ *=]*" s)))

    (heading-keep? "=====")
    (heading-keep? "* =====")
    (heading-keep? "hello world")
I expect the response to be false false true, but I get nil nil nil basicaly, I want to keep all headings, except those made of the chars space, star, equal-sign
#2018-02-0620:18caio
(defun heading-keep? (s)
  (not (string-match "^[ *=]+$" s)))
#2018-02-0620:18caioyour version is matching the space between hello and world#2018-02-0620:21caiobtw, + instead of * will make a difference for empty strings. using * will return t and with + will return nil. idk what your requirements are in this case#2018-02-0620:22caiohttps://xkcd.com/1171/#2018-02-0620:25qqq@caio: right, thanks for the ^$ -- forgot about the substring matching#2018-02-0620:25qqq
(defmacro do (&rest exps)
 `(progn ,@exps) )
^-- what is wrong with this macro? I'm trying to make do an alias to progn (loses less space to nested indentations)
#2018-02-0620:32qqqoh, emacs has a builtin do macro, lol#2018-02-0620:55tanzoniteblackit does have a do, but I don't think it does the same as progn / Clojure do(if memory serves, it's more like do-while)#2018-02-0620:56tanzoniteblackbut because it does already have that macro, re-defining it with a different meaning will cause breakage with any packages that use the original macro#2018-02-0620:56tanzoniteblackWhat's wrong with just using progn?#2018-02-0621:54qqqThere's nothing wrong with progn; I just was not aware do was a builtin, and wanted to use it.#2018-02-0621:55tanzoniteblackfair enough, I have done many things in emacs "just because" 🙂#2018-02-0717:57qqq
(defun len-no-prop (s)
                       (length (substring-no-properties s)))
#2018-02-0717:57qqqthis almost works, except not on empty strings#2018-02-0717:57qqqwhat is the idikomatic way to get the no-properties length of a strting?#2018-02-0718:38gonewest818If the string is taken from a buffer I think you can get it without properties.#2018-02-0718:40gonewest818buffer-substring-no-properties#2018-02-0718:41gonewest818Are you trying to determine screen position based on string length? There might be more direct ways to do that too.#2018-02-0718:47qqqI'm doing some hacky outline/indentation, where the indentation level is dependent on the # of whitespaces before the first non-whitespace character#2018-02-0718:47qqqlol, maybe I should just count number of ' ' instead 🙂#2018-02-0718:50gonewest818Maybe origami or one of the other folding modes has code you can draw from?#2018-02-0718:51gonewest818I know they didn’t do exactly what you wanted but there could be utility libraries in there.#2018-02-0718:53qqqactually, the bug was elsewhere and I blamed it on string-no-properties#2018-02-0718:53qqqthe problem is: when I use string-match, I have to pass the underlying string to match-strinkg NUM#2018-02-0718:54qqqotherwise, it gets weird results (which are they passed to substring-no-properties)#2018-02-0718:54qqqthe real bug was the incorrect way I was callikng match-string#2018-02-0718:56gonewest818I just found
(how-many REGEXP &optional RSTART REND INTERACTIVE)

Print and return number of matches for REGEXP following point.
#2018-02-0718:59qqqfound bug, resolved it!#2018-02-0719:00qqqI feel like 95% of my elisp time is spent debugging, and 95% of my debugging time is spent staring at the wrong line number#2018-02-0719:00qqqso if I could just stare at the right line, i'd 10x my elisp productivity#2018-02-0719:24Andrewas the russian proverb says, "why bomb always drops at epicenter"#2018-02-0721:20dpsuttondoes this look obviously wrong to anyone? having issues getting some ignored files for greping
((nil .  ((cider-lein-global-options . "with-profile dev")
          (grep-find-ignored-directories . ("SCCS" "RCS" "CVS" "MCVS" ".src" ".svn" ".git"
                                            ".hg" ".bzr" "_MTN" "_darcs" "{arch}" "jib/target"
                                            "jib/dev-resources" "jib/resources" "jib-gae"
                                            "labcorp-client" "mdtoolbox-client" "cordova" "cutter")))))
in my dir-locals.el
#2018-02-0722:07richiardiandreaUhm, It looks ok#2018-02-0722:07dpsuttoni know. it's bizarre that i can't affect the ignore file list of the ag searcher#2018-02-0722:08richiardiandreaDo you use projectile?#2018-02-0722:09richiardiandreaI also would check using ielm that var value for your buffer#2018-02-0800:19qqqfor those coming from a scheme / clojure background, dash.el is tye library that intuitively makes sense right ?#2018-02-0800:19qqqso far, I've found emacs to be full of surprises and dash to be completely intuitive#2018-02-0802:28bozhidar@qqq Emacs Lisp has a long history and it’s focus has never really been FP. dash.el was one attempt to bring some of the lessons learned from Clojure, and it was quite the success.#2018-02-0802:28bozhidarEventually Emacs added upstream seq.el and map.el which are amazing libraries imo, plus things like thread-first, thread-last, when-let, etc.#2018-02-0802:29bozhidarAt this point dash.el is irrelevant, but it was instrumental in pushing Emacs Lisp forward.#2018-02-0802:34qqq@bozhidar: Will you consider writing a "elisp for clojurists" guide some day? I suspect many of us can learn a lot from you.#2018-02-0807:06benedekthis is a fabulous idea#2018-02-0807:08benedekyou should start this on github @qqq and be the maintener ;)#2018-02-0802:51bostonaholicwhy not just clojure.el 😜#2018-02-0802:51bostonaholicI may have just nerd sniped myself in working on that this weekend#2018-02-0803:00qqq@bostonaholic: where is clojure.el ? Google is giving me all types of clojure-mode results#2018-02-0803:00bostonaholicI don’t know if it exists. I was just suggesting that it should exist#2018-02-0803:00bostonaholicsince you mentioned “elisp for clojurists”#2018-02-0803:01bostonaholicwhy not just write an elisp lib that brings clojure to elisp#2018-02-0803:01qqqI'm not doing it because I'm a lazy unmotivated jerk.#2018-02-0803:01qqqYou should build clojure.el though, I'm sure many would appreciate it!#2018-02-0803:02qqqI've always wanted an editor/ide scriptable in Clojure.#2018-02-0803:02qqqI'd even pay for that.#2018-02-0803:02bostonaholicthat’s why I said I probably nerd sniped myself. Which is a way of saying “I think there should be this thing. Shit. Now I want to build said thing.”#2018-02-0803:02bostonaholicI accept BTC and BCH 😜#2018-02-0803:02qqqSure -- show a working prototype! 🙂#2018-02-0803:03qqqI was unfamiliar with the term "nerd sniped" -- take a look at https://github.com/mogenslund/liquid -- it's the most promising I've seen so far.#2018-02-0803:03qqqIt has console, java/awt, and cljs/dom/web browswer front end. It's 100% scriptale in clojure.#2018-02-0803:03qqqThe dev is brilliant and very responsible on #liquid#2018-02-0803:05qqq@bostonaholic: in paritcular, I think "build editor/IDE on clojure" is better in the long run than "build a clojure-like lib on top of emacs lisp"#2018-02-0807:09benedekthere is deuce as well for the curious, aka emacs in clojure#2018-02-0813:46bozhidar> “build editor/IDE on clojure” is better in the long run than#2018-02-0813:47bozhidarThat assumes that Clojure is all you care about, but I personally have interest in many areas and prefer using universal tools instead of specialized.#2018-02-0815:12qqq@bozhidar: that is absolutely true. I currently use two languages: clj/cljs/cljc + ELisp I'm trying to reduce it down to one: clj/cljs/cljc#2018-02-0815:12qqqAfter getting rid of emacs, next step is to get rid of the shell, and do all scripting in the repl too.#2018-02-0815:13qqqThe other thing is: as long as we want general edito rsupport, we're going to use something like the "sliing buffer", where we store "text before cursor" "text after cursor" whereas I really really want a structural editor#2018-02-0815:22Ryan Radomski@qqq Do you see a benefit of only one language?#2018-02-0815:30qqq@radomski: Why do you assume multi-language = good ?#2018-02-0815:30Ryan RadomskiNo assumptions, just a question#2018-02-0815:31qqqSo here's the thing, if you build an editor that supports multiple langauges, the focus is "w3e want to build thsi generic interface, --- and if we can't do this in python/ruby/.... maybe we shoulnd't do it for Clojure."#2018-02-0815:31qqqWhereas, if, starting out, one says "fuck it, all we care about is Clojure", there can be very deep repl/jvm integration.#2018-02-0815:32qqqAnd I'm not saying we ban other programming languages -- they can continue to use vim / emacs / textmate / atom / ...., I'm just saying we should build an editor/ide taht focuses solely on Clojure + JVM integration, andnot give a damn about any other language.#2018-02-0815:33Ryan RadomskiI agree, Everything in every language > everything in clojure > some things in every language.#2018-02-0815:34Ryan RadomskiHowever the shell is nice too, things like sed are pretty handy to have lying around#2018-02-0815:34qqqI'm not convinced "|" in shell is better than (-> ...) in cloljure.#2018-02-0815:35qqqAlso, in shell, you can really only pipe streams of text. With (-> ...) you can pipe streams of STRUCTURED DATA 🙂#2018-02-0815:38Ryan RadomskiThe two are able to coexist. Sed can manipulate some sttructured text and return it with only string replacements then clojure can read the string and do stuctural manipulation. I don't personally do it, but I find it hard to say it would be impossible to be useful#2018-02-0815:39qqqIf I had a clojure shell, I don't see any reason I'd ever use sed / grep / awk instead of Clojure's regexps.#2018-02-0816:00mpenetDid you try closh?#2018-02-0815:47Ryan RadomskiI suppose if you never wanted to do anything new with the hardware, you wouldn't run into a use case where you would need the system#2018-02-0816:53qqq===== I am not sure if this is an Emacs issue or an Evil issue. Suppose I do a regex search on a pattern of the form "^..." then I do (goto-char (match-beginning 0)) is this supposed to : 1. put me on first char of matching line OR 2. put me on last char of previous line? Because I am expecting (1), but getting (2) -- and I don't know if this is an emacs issue or an evil issue.#2018-02-0817:15dpsutton
(defun my-thing ()
      (interactive)
      (re-search-forward "^(declare")
      (goto-char (match-beginning 0)))
works just fine for me. puts it on the line
#2018-02-0817:16dpsuttoni'm not an evil user.#2018-02-0819:28qqqIs there an emacs command for "list all bitmap fonts" available? I purposely want to avoid TrueType due to aliasing / anti aliasing issues.#2018-02-1017:00gganleyIf there is prog-mode is there something akin to prose-mode? I’m tired of assigning visual-line-mode to a bunch of modes#2018-02-1105:51bozhidarProbably text-mode?#2018-02-1112:53opsbJust started using spacemacs with evil mode, for some reason when I'm in a clj file hitting c clears the line and enters insert mode. With other layers it behaves as expected so I can use ciw etc. Anyone know what's going on?#2018-02-1112:54opsbnvm, restart cleared it...#2018-02-1112:56opsbah, it seems the problem starts when I do a cider-jack-in#2018-02-1113:03bozhidar@oliver089 That’s odd. Can you check what c gets bound to then?#2018-02-1113:04opsbit looks like it just switches to holy mode when I jack in#2018-02-1113:04bozhidarI don’t use evil-mode, but I assume you’re getting some keybinding conflict when cider-mode gets enabled.#2018-02-1113:04bozhidarholy-mode?#2018-02-1113:04bozhidarI don’t even know what this is. 🙂#2018-02-1113:04opsbas in emacs mode 🙂#2018-02-1113:04opsb(not evil)#2018-02-1113:06bozhidarI see - might be some issue with Spacemacs then.#2018-02-1118:21gonewest818When writing elisp tests in buttercup, aren’t “spies” supposed to exist only in the describe block where they are defined? I’m seeing the behavior where spy-on in one block is breaking tests in another.#2018-02-1118:22gonewest818hold on… I’m pinning buttercup to melpa-stable, let me unpin and try again.#2018-02-1118:23dpsuttoni've seen that before. it broke a lot of tests#2018-02-1118:23dpsuttoni think buttercup is abandoed righ tnow#2018-02-1118:28gonewest818Very irritating. Well, the github project shows some recent activity. I guess I’ll file an issue.#2018-02-1118:44richiardiandreaButtercup is on the brink of being replaced by an internal emacs test framework. There should be a PR in buttercup which has more detail#2018-02-1118:45richiardiandreaIn inf-clojure I am using both for the little amount of tests I added#2018-02-1118:45richiardiandreaWaiting for better times 😄 #2018-02-1118:45dpsuttonwhat's the internal framework? ert?#2018-02-1118:45dpsuttonor something new#2018-02-1118:45richiardiandreaSomething new will land, don't remember now the details...let me check#2018-02-1118:46dpsuttonoh cool. any chance @richiardiandrea or @gonewest818 are gonna be in new orleans for clojure SYNC?#2018-02-1118:46richiardiandreaI this is what will end up in emacs: https://github.com/phillord/assess#2018-02-1118:47richiardiandrea@dpsutton this year only one Clojure conf for me and I am thinking it will be the conj 😸 #2018-02-1118:47dpsuttongotcha. just wondering who was gonna be in the crowd#2018-02-1118:48gonewest818@dpsutton I wish, but concentrating on other priorities this winter/spring.#2018-02-1118:48dpsuttoni gotcha. i'm in louisiana only 2 hours away so it didn't make sense not to go for me 🙂#2018-02-1118:48richiardiandreaOh nice :)#2018-02-1118:51gonewest818nice.#2018-02-1118:58gonewest818That said, I don’t see evidence of assess being integrated in Emacs 26 or master.#2018-02-1122:55gonewest818I think I’ve worked around my issue … you can’t use the spy-on directive immediately inside the describe form. You have to set it up either inside a before-each (or probably before-all but I didn’t test that), or inside the it form, and then the scoping seems to be managed correctly.#2018-02-1201:24bozhidar> Buttercup is on the brink of being replaced by an internal emacs test framework. There should be a PR in buttercup which has more detail#2018-02-1201:25bozhidarYeah, I think buttercup is not going anywhere for now, and unlike something that’s shipped with Emacs, it’s much easier to fix and extend buttercup.#2018-02-1201:25bozhidarFrankly I’d rather push buttercup forward than deal with ert and whatever extensions it might have.#2018-02-1201:26bozhidarBtw, assess doesn’t seem to have much activity in terms of development either - something like 1 commit for the past year. -)#2018-02-1215:42gganleyI have a question about emacs (well actually org mode) that has nothing to do with Clojure, should I ask those sorts of questions here or some thing avenue?#2018-02-1215:46jeff.terrell@gganley - I'd say go for it. We discuss non-Clojure-related stuff in #spacemacs fairly often, for example.#2018-02-1215:47gganleyOk, though for the record I am fine being told to keep it Clojure-specific. I am trying to find a way to marry org-mode and OmniFocus. One possible bridge is that OmniFocus natively accepts TaskPaper as input. I was curious if there is a way to export a org-mode file to TaskPaper.#2018-02-1311:35munen@gganley Since TaskPaper seems to use only plain text files and understands only a very simple syntax, you could definitively use a "RegExp replace" or a write a short Macro to convert your org-mode file syntax into TaskPaper.#2018-02-1313:00gfredericks@gganley if you write something yourself, you might find this useful https://github.com/gfredericks/org-editor#2018-02-1313:24jeff.terrell@gganley - I also wonder if TaskPaper might convert to/from any format that pandoc understands. http://pandoc.org/ It already understands org-mode syntax.#2018-02-1313:26gganleyIf I remember from my haskell days pandoc uses attoparsec so “all i need to do” is write a TaskPaper parser and bam, free money#2018-02-1313:39jumarCan I change the default template that is generated for test files? Not sure whose responsibility (cider, projectile, ???) it is but when I create a new test file it will automatically generate a skeleton with matching namespace aliased as sut + clojure.test namespace aliased as t. I'd like to change (at least) the clojure.test part to :refer :all#2018-02-1412:58munen👋 qqq#2018-02-1422:51agthe proper way of say goodbye to someone who left the channel is to use their username as in @qqq and force invite them back 😉#2018-02-1623:27mathpunkI've found CIDER very easy to use. Now I want to have a Lumo repl in emacs. I tried creating a .dir-locals.el file as suggested here https://github.com/clojure-emacs/inf-clojure#repl-type, but running inf-clojure still seems to open a Clojure repl instead. (Judging by the error I get when I evaluate #js [1 2 3]. What should I try to debug this?#2018-02-1701:28richiardiandrea@mathpunk can you post your .dir-locals.el? #2018-02-1701:29richiardiandreaInf-clojure executes the inf-clojure-something-cmd for the repl#2018-02-1701:29richiardiandreaWhere something is the detected project type#2018-02-1701:30richiardiandreaIf you have project.clj it will be inf-clojure-lein-cmd#2018-02-1701:31mathpunk@richiardiandrea I don't remember using such a file, so it only has ((nil . ((inf-clojure-boot-cmd . "lumo -d")))) in it#2018-02-1701:33richiardiandreaThe detection is really easy: https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L544#2018-02-1701:33richiardiandreaOps just a sec#2018-02-1701:34mathpunkoh, i also have no project.clj --- first lumo project, i just have a source file i was running at the command line#2018-02-1701:34richiardiandreaYes so there is a way to override that#2018-02-1701:35richiardiandreaSet inf-clojure-project-type to boot#2018-02-1701:36richiardiandreaBoot assumes you have build.boot of course#2018-02-1701:37richiardiandreaBut the defcustom above overrides stuff#2018-02-1701:37richiardiandreaThere is no way for detecting a lumo project at the moment#2018-02-1701:46richiardiandrea@mathpunk don't forget to revert-buffer in order to reload your .dir-locals.el, it bit me hard 🙂 #2018-02-1701:51mathpunkfor more context: there's a js library i want to use, so i figured I'd try lumo. usually i just lein new stuff. do you think boot is a better option for lumo projects?#2018-02-1702:16richiardiandreaWhat is the library? I am asking because lumo is ClojureScript self-host so not everything is compatible with it#2018-02-1705:49mathpunkOh, I got it working. It's https://github.com/v21/tracery#2018-02-1705:49mathpunkI mean, I got the library working, no problem. I'm just fuzzy on the best way to set up a lumo project#2018-02-1709:58tianshuhow you make it worked? use lumo in leiningen? #2018-02-1718:02mathpunkI still haven't solved my problem, "learn to run a lumo repl in emacs." But, in terms of the library, I just npm installed and used (def library (js/require "name-of-library"), which is pretty cool#2018-02-1718:03mathpunkI think I'm going to make a macchiato project, rather than insist on a command line, so I'm dropping my attempt to figure out the lumo repl for now#2018-02-1718:57richiardiandreaI have planned a blog post on inf-clojure for long time now, at some point I will find the time#2018-02-1702:15stardivinerIs there someone can help me on this question? https://emacs.stackexchange.com/questions/38857/the-formatted-string-passed-to-cider-eval-function-error I've been trapped in this problem for a long time. Can't figure out where is wrong. I asked in Org-mode mailing list, but no any response. And asked on SE, seems low attractive. So I posted it here hope some Emacser can help me this out. And Thanks you in advance. I really need to solve this problem. I use it a lot in my case.#2018-02-1702:34dpsuttonThe only thing I can think of at a cursory glance is to try it in a path that doesn't have spaces in it. I have no idea if that's the issue but it's one I'd try to rule out at the outset#2018-02-2102:47stardivinerAfter the Spring Festival, I take your advice a try. That's weird, without space the problem is gone.#2018-02-2102:47stardivinerDo you know what the space caused this problem?#2018-02-2102:49stardivinerAnd how can I solve this space problem? I need to make this space in path work.#2018-02-1800:34stardivinerI don't think so, but I still tried, not problem on space.#2018-02-1903:47ghadicreated #inf-clojure for discussion of that lib#2018-02-1918:33richiardiandreaso i have just discovered a problem in inf-clojure, i have this code:
(defun inf-clojure--set-repl-type (proc)
  "Set the REPL type if has not already been set.
It requires a REPL PROC for inspecting the correct type."
  (with-current-buffer inf-clojure-buffer
    (if (not inf-clojure-repl-type)
        (setq inf-clojure-repl-type (inf-clojure--detect-repl-type proc))
      inf-clojure-repl-type)))
#2018-02-1918:34richiardiandreainf-clojure-repl-type is intended to be a buffer local#2018-02-1919:45richiardiandreaok I found out the bug, I am always in inf-clojure-buffer
#2018-02-2018:07gganleyUsing clj-refactor is there a way to change a fn (fn [] etc) to #()?#2018-02-2018:07gganleyin cljr parlance, cljr-demote-function#2018-02-2018:33benedekhaha no#2018-02-2018:34benedekI don't think there is#2018-02-2018:34benedekwould be relatively easy to pull off in elisp... I think...#2018-02-2203:30normanThe other direction is much easier, but since you can’t nest #() I imagine that refactor would be quite tricky#2018-02-2716:25mccraigmccraiguh, did MELPA disappear ?
qluupp:➜  ~  % dig  any

; <<>> DiG 9.8.3-P1 <<>>  any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 30507
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;melpa.org.			IN	ANY

;; Query time: 4191 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Feb 27 16:25:15 2018
;; MSG SIZE  rcvd: 27
#2018-02-2716:28mccraigmccraighmm. apparently it's just me#2018-02-2716:39hlolliIs this connected?
Error (use-package): Cannot load fold-this
Error (use-package): Failed to install fold-this: Failed to verify signature: "fold-this-20180224.40.el.sig"
#2018-02-2717:10mccraigmccraigmight be - i traced my problem - google's DNS servers @ 8.8.8.8 (whichever of them i am seeing from here, anyway) are not serving records for https://melpa.org for some reason. switching to 9.9.9.9 fixed it for me#2018-02-2800:35hlollisurprised that this is not allowed in emacs
(let ((cb nil))
  ((or cb 1+) 1))
#2018-02-2800:38dpsuttonNeed to funcall it. It's a lisp-2#2018-02-2800:38hlolli
(let ((cb nil))
  (funcall (or cb '1+) 1))
#2018-02-2800:39hlolliyup, I took funcall for a ugly twin of apply, or some sort of (unquote fun-symbol)#2018-02-2800:41dpsuttonYeah I don't like the look. But when people get used to it they really like it. Because you can bind a variable and a function to the same signature#2018-02-2800:41dpsuttonIt's essentially namespaces for different types of lisp types#2018-02-2800:42hlollithis trips me out a lot in emacs, that functions are not symbols.#2018-02-2800:44hlolliclojure can sometimes trip me out too in cases of a macro/function (like the symbol + and #'+) 🙂#2018-03-0118:08gganleyI’m writting some stuff for cider and ran into something new. they want folks to use decalre-function for byte-compilation reasons (I think) but do I have to declare in this fashion for mode-map’s?#2018-03-0120:25sonnytocan anybody answer this https://groups.google.com/forum/#!topic/cider-emacs/NLFv0In4SQs ? how do I connect to clojure 1.8 socket repl from cider? seems cider can only connect to nrepl#2018-03-0208:06valtteri@sonnyto https://github.com/clojure-emacs/cider/blob/master/doc/faq.md#will-cider-eventually-support-the-clojure-18-socket-repl#2018-03-0210:43fbielejecAnyone tried using .dir-local.el with a load function, to set indent rules for a project? Like for example:
((clojure-mode 
  (eval . (load "~/indents.el"))))
and then in indents.el:
;; list of macros and indentation rules
(define-clojure-indent
  (defroutes 'defun)
  (GET 2)
  (POST 2)
  (PUT 2)
  (DELETE 2)
  (HEAD 2)
  (ANY 2)
  (OPTIONS 2)
  (PATCH 2)
  (rfn 2)
  (let-routes 1)
  (context 2)
  (wait-for 'defun))
#2018-03-0212:46hlolli@fbielejec you're missing a dot and a list
((clojure-mode .  ((eval . (load-file "~/indents.el")))))
or just nil for all files
((nil . ((eval . (load-file "~/indents.el")))))
I also thing you mean to use load-file, cleaner would be adding (provides 'my-clojure-indents) or smth at the end of indents.el and add the file to load-path, and require it.
#2018-03-0212:48fbielejecisn't dotted pair and a list equivalent here?#2018-03-0212:50hlollidon't know#2018-03-0212:53fbielejecI was also thinking about loading the indents.el from a remote server, a gist or github repository.#2018-03-0212:54fbielejecThen the indents would be picked up by anyone modifying the project without any other action.#2018-03-0213:02hlolliyou could make your own emacs package reposotory and set up auto update function to look for new uploads each time emacs starts. Have not idea if that's difficult, came to my mind similar idea after learning about the lambdaisland repo.#2018-03-0213:04hlollilooks quite easy https://github.com/lambdaisland/elpa/blob/gh-pages/archive-contents#2018-03-0222:58gganleyIs there a way to restrict the scope of M-? / xref-find-references to just one directory?#2018-03-0517:01borkdudeHow do I enable auto-highlight-symbol-mode globally?#2018-03-0517:07dpsutton(global-auto-highlight-symbol-mode t)#2018-03-0517:08borkdudeTried that yeah. Do I have to restart emacs for this to work?#2018-03-0517:08dpsuttoni've run into issues with it not working in some buffers#2018-03-0517:08dpsuttoni think it may have to do with prog mode. i saw someone say CIDER or clojure mode don't descend from prog mode but form generic mode#2018-03-0517:09dpsuttoni'm guessing it knows you don't want that in a text buffer and so it does a check like that#2018-03-0517:09dpsuttonah it checks (memq major-mode ahs-modes)#2018-03-0517:10dpsutton
(defcustom ahs-modes
  '( actionscript-mode
     apache-mode
     bat-generic-mode
     c++-mode
     c-mode
     csharp-mode
     css-mode
     dos-mode
     emacs-lisp-mode
     html-mode
     ini-generic-mode
     java-mode
     javascript-mode
     js-mode
     lisp-interaction-mode
     lua-mode
     latex-mode
     makefile-mode
     makefile-gmake-mode
     markdown-mode
     moccur-edit-mode
     nxml-mode
     nxhtml-mode
     outline-mode
     perl-mode cperl-mode
     php-mode
     python-mode
     rc-generic-mode
     reg-generic-mode
     ruby-mode
     sgml-mode
     sh-mode
     squirrel-mode
     text-mode
     tcl-mode
     visual-basic-mode )
  "Major modes `auto-highlight-symbol-mode' can run on."
  :group 'auto-highlight-symbol
  :type '(repeat symbol))
#2018-03-0517:10dpsuttonadd to list on that the clojure buffer types#2018-03-0517:13borkdudecan I do this using some fancy customize menu in emacs? I haven’t used that part of emacs much#2018-03-0517:13dpsutton
(mapc (lambda (mode)
        (add-to-list 'ahs-modes mode))
      '(clojure-mode clojurescript-mode cider-repl-mode))
#2018-03-0517:13borkdudeah#2018-03-0517:14borkdudeworks!#2018-03-0517:17dpsuttonexcellent!#2018-03-0517:22richiardiandreaOh this is a great mode! I was I living without it!#2018-03-0520:23gganley@dpsutton For the record I mentioned that cider-repl-mode does not derive from prog-mode and that was causing some issues where some of my settings that hooked into prog-mode were not being hooked.#2018-03-0520:23dpsuttonyeah that's what made me suspect that as the initial cause#2018-03-0520:56richiardiandreaI think I open an issue for clojure-mode as well against prog-mode#2018-03-0520:56richiardiandreano clear which one should derive though (both?)#2018-03-0605:05bozhidarclojure-mode should derive (and it derives from prog-mode).#2018-03-0605:50richiardiandreaRight, my issue was about the key map, which I read should be done explicitly - might be wrong, it was some time ago I think: https://github.com/clojure-emacs/clojure-mode/issues/467#2018-03-0605:05bozhidarREPL modes and such usually derive from comint, special or fundamental mode.#2018-03-0621:32dpsuttonthe mailing list is getting a little spicy with RMS wanting to make emacs a word processor and Daniel Colascione wanting to work on the GC.#2018-03-0621:51dpsuttonas a direction RMS desires is for emacs to compete with LibreOffice in service word processing needs#2018-03-0622:00richiardiandreaWat? - think I need an xplanation for this expression - I have to watch it every now and then: https://www.destroyallsoftware.com/talks/wat#2018-03-0622:07dpsuttonsome snippy remarks here and there between Daniel and RMS#2018-03-0622:10chrisgenuine lmao at stallman's email header#2018-03-0622:10chrisI forget about it and each time I see it it's a special little treat#2018-03-0622:12chrisno idea why 'make emacs a word processor' is a focus now though#2018-03-0622:12tanzoniteblackhuh, I guess I'd always thought that org-mode, markdown-mode, and just plain text mode were good enough for a "what you see is what you mean" editor, and never really considered a "what you see is what you get" editor like libreoffice is. Thinking about it, there's nothing wrong with building in WYSIWYG capabilities to emacs, I just never thought it necessary? And definitely not at the expense of other improvements?#2018-03-0622:13chrisif I were going to completely rewrite the rendering engine to improve support for proportional text it would not be to further it as a word processor, it would be to make it render much much faster#2018-03-0622:13chrisorg publishing has always been good to me#2018-03-0622:13dpsuttonyeah it seems way off base to me#2018-03-0622:14tanzoniteblackof course, this is the same group that lead to this decision: https://swsnr.de/posts/bye-bye-emojis-emacs-hates-macos.html so..."way off base" is always relative#2018-03-0622:15chris:face_with_rolling_eyes:#2018-03-0622:16chrisI respect what stallman has done by not sacrificing his principles, but I'd like some pragmatism#2018-03-0622:21dpsuttonyeah i agree. this just seems like a weird thing to take aim at#2018-03-0623:53felipebarrosIt's not only weird, it's plain bizarre. Love him but I guess since he has to use pretty outdated hardware to do his things, is pretty distant from "modern" software and I'm sure hasn't tried his hands at any modern IDE or competing text editors, his priorities may be twisted. Oh, well, it's his editor. Seems like the dream that Emacs will be the goto tool for secretaries hasn't died.#2018-03-0623:55felipebarrosAnd he doesn't use Org by the way, as far as I know. He considers it to be an example of an Emacs package that is too decoupled from the rest of Emacs. So that is maybe another reason.#2018-03-0700:09agthe most shocking thing to me I've ever seen was Stallman saying: "What is Magit?" https://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00583.html#2018-03-0701:10gonewest818I don’t understand the word processing thing. But IMO feature parity across operating systems is not such an outrageous principle. If you ever tried using Atlassian Sourcetree including switching back and forth between Mac and Windows you know what I’m talking about.#2018-03-0704:40gganleyRms is such a funny character to me#2018-03-0816:40codeasonehttps://i.imgur.com/88Jgz.jpg#2018-03-0910:56andrea.crottiis it just me or Helm started to use a different frame when activated?#2018-03-0910:57andrea.crottiaha I found it, this was on Hide Helm Use Frame When More Than Two Windows: Toggle off (nil)#2018-03-1001:28ivanahello! I'm not understand after what, but my spacemacs starts to check bracket inside the ;; comments and do not load files in REPL. can I getting back normal behaviour?#2018-03-1001:30ivanasorry, you have separate channel of spacemacs ) maybe you have one for console spacemacs or spacemacs in light themes? 😁#2018-03-1016:33munenHi @ivana Sorry, I can’t help you with your problem. But the rationale behind the separate channels is not as shady as you’re suspecting^^ Spacemacs is not a ‘theme’. It is a complete Emacs distribution - with all kinds of packages pre-packaged. That alone wouldn’t qualify for a good reason for a separate channel, though. However, Spacemacs is very opionionated and changes a lot of standard behaviour of Emacs. Even the standard shortcuts to access functions and such are completely different. So, some problems might be reproducable on Emacs, some might stem from downstream changes in Spacemacs.#2018-03-1020:46ivanaThanks for explaining. Anyway, the problem was solved 🙂#2018-03-1120:09richiardiandreaI have compiled emacs 27 yesterday as I was trying to solve a problem, I found another 😄 Does anyone know what is the best alternative of linum-mode that works well with something like git-gutter?#2018-03-1120:10richiardiandrealol actually I have just discovered that the problem is git-gutter 😄#2018-03-1120:16dpsutton@richiardiandrea check out the new built in line numbering mode in emacs. https://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00318.html#2018-03-1120:18richiardiandreayeah git gutter is unfortunately broken and not really maintained#2018-03-1120:18richiardiandreathanks I will check that @dpsutton!#2018-03-1123:01richiardiandrea@dpsutton that solved it, also found here: https://github.com/syohex/emacs-git-gutter/issues/143#2018-03-1208:50benedeksee my comment on github @stardiviner#2018-03-1610:12bozhidar@richiardiandrea I’m a big fan of https://github.com/dgutov/diff-hl#2018-03-1610:12bozhidarThe name is kind of bad, but it’s something like git-gutter, that’s actually more versatile#2018-03-1617:24j0ni@bozhidar how do you start it globally without it barfing on the scratch buffer for not having an associated file?#2018-03-1621:09jumarI added (global-diff-hl-mode) to my emacs config#2018-03-1922:23j0niwell, it turned out to be my config elsewhere of course 😄 the entire debacle is documented for posterity here https://github.com/dgutov/diff-hl/issues/104#2018-03-1617:54bozhidarNever noticed such a problem - I just enabled the minor mode and the magit integration.#2018-03-1618:14richiardiandreaCan you stage hunks with a key combination? That is my most beloved feature :)#2018-03-1900:13jhacksSadly, no: https://github.com/dgutov/diff-hl/issues/55 I use magit for that, instead.#2018-03-1719:11AndrewHello. Sorry if slightly off-topic. I was wondering if anyone had success with ein-mode and pdb/ipdb? I'm able to use it all right, but I cannot quit it properly - when I hit C-c C-c or C-c C-d, it says that process is killed, but the jupyter kernel stays busy saying that stdin is active 😞#2018-03-2017:30rymndhngI'm following magit's suggestion for removing this hook to increase perf (because I have a lot of hooks):
(remove-hook 'magit-refs-sections-hook 'magit-insert-tags)
what i'm noticing is that this sets all the hooks to nil, rather than just the single function. Anyone know what's up with that? If i comment this line out, all the hooks are present
#2018-03-2018:02agI just did (remove-hook 'magit-refs-sections-hook 'magit-insert-tags) and it removed just that...#2018-03-2018:02ag¯\(ツ)/¯#2018-03-2018:19rymndhngyeah, it does work fine, forgot to add: it becomes nil when i put that in my config when emacs starts up (I am using spacemacs 😕 )#2018-03-2018:23agdo it in (with-eval-after-load 'magit block#2018-03-2023:04rymndhnghmm i tried that as well, i wonder if there's some other plugin doin weird things :thinking_face: , thanks for your help though. i worked around it by adding the hooks back 😢#2018-03-2103:24bozhidarTransparent Emacs setup for the win https://github.com/bbatsov/emacs.d/blob/master/init.el 😄#2018-03-2103:24bozhidarIf you don’t know what exactly your setup is doing then something is very wrong. That’s why I also avoided doing anything fancy, hard to follow with Prelude.#2018-03-2210:46ajsmy emacs nrepl buffer prints all the bytes from all the messages coming in over websocket; can i turn that off?#2018-03-2211:08bozhidar@ajs Can you elaborate on this?#2018-03-2211:08bozhidarWhat do you call an nrepl buffer?#2018-03-2211:11ajsin emacs cider, there is a buffer for nrepl in addition to the buffer for the repl#2018-03-2211:11ajsi'm using jetty websocket client and all incoming bytes are printing in that nrepl buffer, which is a lot#2018-03-2211:17bozhidarI see. Well, I guess that’s the stdout that got bound to the output of the nREPL process. Not sure what we can do about this. What kind of problems does this create for you? Normally people don’t interact with that buffer at all.#2018-03-2211:20ajswell, logging in general can be rather time consuming. the problem is that a message comes in and normally it would be parsed and the app would proceed to handle another message. But all that logging is I presume responsible for why the parsing for each message is taking much much longer than it should. I've tried timing various things in my app and they are all a few ms which is no problem, yet something is causing messages to take seconds for parsing, and i know from experience that logging is a real time-consuming activity#2018-03-2211:21ajswhen i watch the nrepl buffer, it's just a huge streaming log of bytes for a single message, and if I could disable that, it would be interesting to see if that impacts performance#2018-03-2211:41bozhidarI see. I doubt that logging is happening over the nREPL connection, otherwise the output wouldn’t end up there, but you can file some ticket with steps to reproduce this problem and we can take a look at the problem.#2018-03-2211:41bozhidarAt the very least it’d be interesting to know what’s going on. Btw, generally it’s best to ask such questions in #cider.#2018-03-2211:43ajsi'll continue in #cider#2018-03-2218:51theeternalpulseis there a way to see what action occurs in emacs. Say some alignment is wrong and I want to know what exact function kicked in at that time unrelated to a key stroke?#2018-03-2218:55dpsutton@theeternalpulse you could try with the profiler running with#2018-03-2306:15stardivinerclj-refactor error said "clj-refactor middleware is not installed" when I cider-jack-in outside of Clojure project. Is it possible to used clj-refactor outside of project?#2018-03-2306:16stardivinerI'm sure clj-refactor middleware is installed. It works fine in a project with cider-jack-in.#2018-03-2306:48benedekhm let me check... which version are you using?#2018-03-2406:00stardivinerUsing latest MELPA version : 20180316#2018-03-2406:01stardivinerJava version: openjdk version "1.8.0_162" CIDER version latest in MELPA 20180323.609.#2018-03-2406:13stardivinerWeird, today I test again, cider-jack-in does not go to jack-in outside of project, it warning with Unsupported project type ‘clojure’ Because in my buffer, variable cider-default-repl-command becomes "clojure". but it is not in cider--identify-buildtools-present. Maybe because CIDER upgrade issue.#2018-03-2406:23stardivinerAfter set (setq cider-default-repl-command "lein") I got this warning in buffer *nrepl-server*.
Warning: refactor-nrepl needs to run in the context of a project.
Warning: refactor-nrepl middleware won't be activated.
#2018-03-2306:48benedekalso your java version?#2018-03-2306:49benedekalso what do you mean by middleware installed? it is auto injected mostly these days...#2018-03-2313:04bozhidar@benedek I guess that’s an error message he gets in his REPL buffer.#2018-03-2607:11stardivinerHow to define a funtion in let- binding variables? Like this:
elisp
(let ((bind-vars (lambda (var) ...))) (--> body (bind-vars it) (another-func it))
#2018-03-2617:50gonewest818That will work if you use (funcall bind-vars it) to invoke the function.#2018-03-2617:54gonewest818or look into cl-flet#2018-03-2613:37maleghastHello All 🙂#2018-03-2613:38maleghastSorry, sent before ready...#2018-03-2613:38maleghastOK, so I can't remember how to install / upgrade Cider... Anyone able to help me out here..?#2018-03-2613:39maleghast(yes I know I could Google it, but I am looking for a learning experience if anyone has the time 🙂 )#2018-03-2613:55dpsuttonM-x list-packages. search for CIDER, hit u then x. (u is mark for upgrade) (x is do the stuff i've told you to do)#2018-03-2613:58maleghast@dpsutton - Thanks, that makes a lot of sense!#2018-03-2614:08maleghastUnfortunately, it's not listed in that buffer, and yet I am running CIDER right now... In fact I scrolled back up and there is a warning about it being 0.14 and out of step with the version of nrepl that is running, so I know which version I have now...#2018-03-2614:10mpenetyou prolly need to run package-refresh-contents#2018-03-2614:11maleghast@mpenet - er ok...#2018-03-2614:13maleghast@mpenet Nope, it's not there...#2018-03-2614:13mpenetthe nuclear option otherwise is to nuke .emacs.d/elpa and relaunch emacs#2018-03-2614:13maleghastIs is possible that if I installed it as part of a whole Leiningen Profiles thing ages ago that it might be over-riding things?#2018-03-2614:14mpenetyou also need to have melpa in your package list if that's not the case already#2018-03-2614:17maleghastOK, this is where I make a terrible admission... I am using someone else's Emacs setup (with their permission) that is probably wildly out of date, and while I have become productive with Emacs day-to-day I have not really decoded how to make it my actual slave, I am more a slave to it... 😉#2018-03-2615:29maleghastI have sorted it - thanks! (I moved to Spacemacs (in Holy mode) and have now got latest Cider)#2018-03-2618:45theeternalpulseI have an emacs file opened that also happens to be a package I installed. My "goto definition" command goes to the elpa file definition rather than the one in the project directory.#2018-03-2618:46theeternalpulseIs there a priority setting for the definition search I need to set up?#2018-03-2700:46bozhidar@theeternalpulse Evaluate the file and it go to def will prefer it.#2018-03-2700:46bozhidarNo other way around this.#2018-03-2700:46theeternalpulseOh that makes sense#2018-03-2708:54agigaoHey guys, how can I jump to Clojure source file?#2018-03-2708:56mgrbyteM-. (meta/alt-dot) calls cider-find-var)#2018-03-2708:56mgrbyteassuming you mean jump to source file from a symbol...#2018-03-2709:01jumaror cider-find-ns assuming you want to jump to the specific namespace.#2018-03-2709:08agigaoWell, I mean to get into the source into the library. IntelliJ analog: Super + Click#2018-03-2709:10mgrbyteI've not used IntelliJ, but I'm guess alt-dot is what you want as I described above. AFAIK there's no mouse-click shortcut.#2018-03-2709:10mgrbyte(assuming you're using vanilla emacs not spacemacs)#2018-03-2709:13jumarYes, that's generally the equivalent. In spacemacs evil mode, you can use g d shortcut (go to definition) but it's the same cider-find-var command under the hood. Sometimes it's useful to list all files in a given library which you can do with cider-open-classpath-entry#2018-03-2715:41agigaoWell, it doesn’t seem to work properly. g d goes into the library file from (:require) dir, but not from the alias. for example in case of: mount.core :as m. from mount it gets into the ns, but from m or m/some function.#2018-03-2808:27jumarI'm not following, could you explain it more clearly?#2018-03-2709:08agigaoWell, I mean to get into the source into the library. IntelliJ analog: Super + Click#2018-03-2711:06MarisIs it possible to exclude some folders from ag search path in emacs? I also use projectile but .projectile file didn't help.#2018-03-2711:16Marisag-arguments ("--line-number" "--smart-case" "--nogroup" "--column" "--stats" "--")#2018-03-2711:17Marisperhaps projectile should update this variable, add ignored folders#2018-03-2711:18MarisI will write some plugin that does it, if nothing else helps 🙂#2018-03-2712:23dpsutton@maris.orbidans there are several ways to ignore things in helm-ag. but i couldn't get them to work. you can see them in this function:#2018-03-2712:25dpsuttonthere's agignore, helm-ag-use-grep-ignore-list. but for some reason it wasn't picking up my dir locals so i just kinda baked them in#2018-03-2805:16theeternalpulseHow do I get a library to abide by a different indentation style. It seems aligning arguments is the default seems to be align arguments, but I want a let-like indentation for certain imports.#2018-03-2809:41bozhidarThere sections about indentation in clojure-mode’s readme and CIDER’s manual. It’s best to consult those.#2018-03-2810:41Maris@dpsutton ag can use .gitignore. Out .gitignore was not correct.#2018-03-2814:58theeternalpulseoh, I forgot to mention it's mainly for elisp. For example I'm looking at writing a test for cider and the buttercup describe aligns the arguments.#2018-03-2814:58theeternalpulse@bozhidar I'll take a look at that#2018-03-2909:50bozhidar@theeternalpulse For Emacs Lisp - you can alter the indentation of macros using declare. Sometimes the indentation gets messed up when you haven’t evaluated some external library, before you start writing code using it, and the respective declares are not used.#2018-03-2909:50bozhidarSee https://www.gnu.org/software/emacs/manual/html_node/elisp/Indenting-Macros.html#2018-03-2914:38theeternalpulseI think I got it. I'm just having a problem loading the cask file dependencies in cider. The make test works but I can't require the buttercup library from the .cask folder.#2018-03-2914:46theeternalpulseThough I think I got it,. I have to open the project with cider emacs to get the load paths connected -_-. Oh emacs lisp lol#2018-03-2918:14theeternalpulsealso there is https://github.com/flycheck/flycheck-cask which seems to bring in the appropriate references from the .cask folder that you can use when developing. Going to try this later today#2018-03-2919:51tanzoniteblackat some point recently, rainbow-identifiers stopped working for me in clojure buffers. It continues to work in other buffers that derive from prog-mode, just not anything clojure related. Anyone have any ideas on how to start debugging this? My config: https://github.com/tanzoniteblack/dotemacs/blob/master/init.el#L1211#2018-03-2920:34hlolli@tanzoniteblack don't you have to specify the hook, my config for clojure mode is
(use-package cider
  :ensure t
  :init (add-hook 'cider-mode-hook
                  (lambda ()
                    (paredit-mode)
                    (eldoc-mode t)
                    (rainbow-delimiters-mode)))
  :config (setq cider-repl-history-file "~/.emacs.d/cider-history"
                cider-repl-wrap-history t)
  :bind (:map cider-mode-map
              ("C-c C-b" . cider-eval-buffer)
              ("C-c d"   . cider-print-docstring)))

(use-package clojure-mode
  ;; :init (add-hook 'clojurescript-mode-hook
  ;; (lambda () (inf-clojure-minor-mode)))
  :ensure t
  :init
  (add-hook 'clojure-mode-hook
            (lambda ()
              (paredit-mode)
              (eldoc-mode t)
              (rainbow-delimiters-mode)
              (flycheck-mode 1)))
  :config (define-clojure-indent
            (fdef '(1))
            (do-at '(1 (2)))))
tough I probably should not be firing hooks there but rather (not in my config)
(use-package rainbow-delimiters
  :ensure t
    :mode (("\\.clj'" . rainbow-delimiters-mode)))
#2018-03-2920:36tanzoniteblackwhen I run describe-mode in a clojure buffer, emacs indicates that rainbow-identifiers-mode is running, so the hook seems to be working to turn on the mode. Manually turning the mode off and then on again doesn't appear to have any effect either.#2018-03-2920:37tanzoniteblackok...now that I'm asking about it, it's working again#2018-03-2920:37tanzoniteblackso I'm just going to go give up on my day now, because clearly either me or my computer has gone insane#2018-03-2920:40hlollifeel you#2018-03-3000:22richiardiandrea@tanzoniteblack I have this in my code
;; Workaround 
(eval-after-load 'clojure-mode
  '(unless (keymap-parent clojure-mode-map)
     (set-keymap-parent clojure-mode-map prog-mode-map)))
#2018-03-3000:22richiardiandreadon't know if useful#2018-03-3000:22tanzoniteblackThe prog-mode bit wasn't actually my problem#2018-03-3000:22richiardiandreakk#2018-03-3000:23tanzoniteblackI've had issues in the past with rainbow-identifiers where a mode dynamically updates font faces in a way that clobbers rainbow-identifiers, and that's what I thought was happening here with clojure-mode. But...it just randomly started working again, so who knows#2018-03-3000:23tanzoniteblackbut thanks for the tip#2018-03-3000:25richiardiandreajust read prog-mode there and I thought of throwing it out 😄#2018-03-3004:19bozhidar@tanzoniteblack There were some font-locking changes in clojure-mode recently that might have interfered with rainbown-delimiters mode. We just fixed those. If you’ve been updating frequently from MELPA that might explain your issues.#2018-03-3004:20bozhidarI think I should stop reading all the Emacs conversation here. Often I feel like a dedicated support or something. 😄#2018-03-3004:24tanzoniteblackLol, it's appreciated! I have cider fixed to melpa stable, but I don't think clojure mode is, so that might be it#2018-04-0212:44Josh HorwitzIs anyone using the doom-emacs configuration by chance?#2018-04-0217:11theeternalpulseI started to, I'm used to spacemacs and its key bindings so I am sticking with that. I have on my agenda to slim down my spacemacs.#2018-04-0217:39Josh HorwitzI switched from spacemacs to doom, and I am really loving it. Just looking for some pointers and help to set it up for clojure development#2018-04-0217:57theeternalpulseah, I'd love to try it out longer term, but the key bindings are a bit foreign and have their own style, also setting everything up is fairly easy for me. Love to hear how it goes, I love how snappy it is.#2018-04-0218:44Josh HorwitzI actually went and changed most of the keybindings to be the same as spacemacs, which I was used to#2018-04-0221:35theeternalpulseinteresting, I figured it had a standard since I noticed . seemed to be consistent over most of the command groups wrt what the gist of the group was.#2018-04-0417:50theeternalpulseinteresting post from the maintainer of spacemacs on gitter https://gitter.im/syl20bnr/spacemacs?at=5ac306cce4ff28713aa0133f#2018-04-0506:11bozhidarNothing unexpected. That’s the life of OSS maintainers - a ton of work and very little ROI, apart from the personal meaning you find in your projects.#2018-04-0506:12bozhidarMany of my projects are under-maintained simply because I reached a point where to make progress on all of them I have to do OSS development full-time.#2018-04-0509:24munenYou'll always have me as a fanboy, though^^ Doesn't count for much, but (I know) there's a whole lot of people that are very grateful for your work! Again, it's not much, but if you ever need a place to crash in Switzerland, you're welcome to stay for as long as you like. There's food, a guest-room, mountains and geese in the garden, all ready for you: http://zen-temple.net/zen-temples/lambda-zen-temple/introduction/#2018-04-0514:23benzapAnyone here using parinfer-mode in emacs? I'm curious what everyone is using for the parinfer-mode-toggle key, Is it something you use often?#2018-04-0514:40bozhidar@munen Much appreciated!#2018-04-0515:10Wesley Matson@benzap I use C-' about thrice an hour, depending on the types of changes I'm making.#2018-04-0516:07jeff.terrellTIL about M-: to evaluate elisp expressions. I was using this for back-of-the-envelope arithmetic around AWS Fargate costs, e.g. (+ (* 0.0506 0.25) (* 0.0127 0.5)). Copy the expression, M-:, paste, and see the result. Only problem is that I couldn't just paste the answer after evaluating it. (Disclaimer: using #spacemacs, so I'm not certain this feature is in vanilla emacs, nor am I using emacs-appropriate terminology for copying and pasting.)#2018-04-0516:11theeternalpulseI think that is the emacs standard binding#2018-04-0516:46Maxim Kim@jeff.terrell isnt it better to use scratch buffer for that? With <C-j> and friends.#2018-04-0516:47Maxim KimAnd there the result is printed under expression and you can copy it and do whatever you want#2018-04-0518:01jeff.terrell@habamax - What is C-j bound to for you? I don't have that bound in Spacemacs, even in the scratch buffer.#2018-04-0518:03theeternalpulseprobably something like eval and print?#2018-04-0519:20jeff.terrellCan you do either C-h k C-j or SPC h d k C-j depending on whether you use C-j in insert mode or normal mode? That will describe the keybinding and tell you which function it's bound to.#2018-04-0521:59cgorehttps://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Interaction.html#2018-04-0521:59cgoreIt's by default eval-print-last-sexp#2018-04-0522:00cgoreAlthough my paredit config squishes it.#2018-04-0518:03theeternalpulseI'm a spacemacs user as well, and C-j does something useless for most buffer modes, like create a newline#2018-04-0519:00ag> TIL about M-: to evaluate elisp expressions also, related https://twitter.com/iLemming/status/975889923571003393#2018-04-0519:21jeff.terrellInterestingly, :+ 1 2 doesn't work, but :(+ 1 2) does. Maybe ex-mode is only calling interactive functions when you don't provide parens?#2018-04-0523:41ag@jeff.terrell you can omit parens (in some cases) in eshell, not in eval#2018-04-0600:58jeff.terrellOh, right. Sorry, I misunderstood.#2018-04-0603:43bozhidarYeah, that’s standard.#2018-04-0603:43bozhidarBtw, in CIDER there’s a similar command (and also a matching scratch buffer).#2018-04-0603:45bozhidarC-c M-: and M-x cider-scratch#2018-04-0606:47Maxim Kim@jeff.terrell it is eval-print-last-sexp standard emacs binding <C-j> in lisp-interaction-mode#2018-04-0609:09munenThanks for sharing cider-scratch. I'm using the elisp scratch buffer all the time, but having a scratch buffer in Clojure around will be so much sweeter!#2018-04-0609:33ajsIs there a way to get emacs to consider the starting colon in a :keyword to be the start of word when navigating by words?#2018-04-0609:55Maxim Kim@ajs try superword-mode#2018-04-0609:57Maxim KimBut then you will not stop by dashes as in :keyword-dashed#2018-04-0610:07Maxim KimAnd I guess it is possible to redefine what "word" is in emacs using syntax-tables as described in https://www.emacswiki.org/emacs/EmacsSyntaxTable#2018-04-0610:33Maxim KimTry to evaluate (modify-syntax-entry ?: "w") in *scratch* buffer#2018-04-0610:33Maxim Kimit will add : char to word class#2018-04-0610:35Maxim Kimthen in the same buffer try to backward/forward word in (hello :world) expression -- for me it stops exactly at colon when I do backward-word having cursor on the last paren#2018-04-0610:37Maxim KimNext thing, if the behavior suits you, add modify-syntax-entry to your init.el as add-hook for desired mode (clojure-mode I presume)#2018-04-0611:45ajs@habamax (modify-syntax-entry ?: "w") works, but my attempt to add-hook it to clojure-mode is the following, which doesn't seem to do anything:
(defun use-colon-as-word-start ()
  (modify-syntax-entry ?: "w"))

(add-hook 'clojure-mode 'use-colon-as-word-start)
#2018-04-0611:45ajsI wish my elisp fu was like my clojure fu. i must be doing something invalid here#2018-04-0611:57Maxim Kimtry this:
(defun use-colon-as-word-start ()
  (let ((table (make-syntax-table)))
    (modify-syntax-entry ?: "w" table)
    (set-syntax-table table)))

(add-hook 'clojure-mode-hook 'use-colon-as-word-start)

#2018-04-0612:00ajsA worthy try, but still doesn't do it#2018-04-0612:00Maxim Kimor better:
(defun use-colon-as-word-start ()
  (let ((table (make-syntax-table clojure-mode-syntax-table)))
    (modify-syntax-entry ?: "w" table)
    (set-syntax-table table)))

(add-hook 'clojure-mode-hook 'use-colon-as-word-start)
Here you're modifying existing clojure-mode-syntax-table which is better than barebone default standard-syntax-table
#2018-04-0612:00Maxim KimIt does for me#2018-04-0612:02ajsdo you need to restart emacs? I'm just evaling my init.el, re-opening the clojure file and using M-f and M-b to navigate words.#2018-04-0612:02ajsworks fine in scratch buffer#2018-04-0612:02Maxim KimI have the following in my init.el:
(use-package clojure-mode
  :mode ("\\.\\(clj\\)$" . clojure-mode)
  :config
  (defun use-colon-as-word-start ()
    (let ((table (make-syntax-table clojure-mode-syntax-table)))
      (modify-syntax-entry ?: "w" table)
      (set-syntax-table table)))

  (add-hook 'clojure-mode-hook 'use-colon-as-word-start)

  (use-package cider
    :config
    (setq cider-repl-display-help-banner t)
    (setq cider-repl-use-pretty-printing t)))
#2018-04-0612:04Maxim KimAnd I have just restarted emacs, opened test.clj and it works for me#2018-04-0612:04ajslooks like i am not explicitly referring to clojure mode anywhere in my init.el. must be happening implicitly with (require-package 'cider)#2018-04-0612:04ajsi am adding the new content after the require-package for cider#2018-04-0612:06Maxim KimYou do have clojure-mode as major mode for emacs when you open any clj file, don't you?#2018-04-0612:06ajsyes#2018-04-0612:06Maxim Kimwhat is clojure-mode-hook value then?#2018-04-0612:07Maxim Kimmine is: (use-colon-as-word-start clojure--check-wrong-major-mode)#2018-04-0612:07ajs(er/add-clojure-mode-expansions clojure--check-wrong-major-mode hl-sexp-mode rainbow-delimiters-mode paredit-mode)#2018-04-0612:07ajsthat is the value of clojure-mode-hook when I eval it in the mini buffer#2018-04-0612:07Maxim Kimso it is not hooked#2018-04-0612:08ajsi'm not sure what that means#2018-04-0612:08Maxim KimI mean (add-hook 'clojure-mode-hook 'use-colon-as-word-start) was not evaled#2018-04-0612:08ajsdo i need to explicitly set the hook somewhre?#2018-04-0612:08ajsoh i see]#2018-04-0612:08Maxim Kimyes in your init.el#2018-04-0612:08ajsi added the hook to my init.el and evaled that file as I normally do when i'm playing with my config#2018-04-0612:09ajswait it think i see a syntax error#2018-04-0612:09Maxim Kimyou use clojure-mode#2018-04-0612:09Maxim Kimbut should clojure-mode-hook#2018-04-0612:09Maxim Kimsymbol in add-hook#2018-04-0612:10ajsnote above, a few minutes i showed what I'm putting in my init.el which is (add-hook 'clojure-mode 'use-colon-as-word-start) but it should be clojure-mode-hook#2018-04-0612:10ajsahh i see you noticed that too#2018-04-0612:10ajsit's working now#2018-04-0612:10Maxim Kimexactly#2018-04-0612:10ajsthanks for the help on that#2018-04-0612:10Maxim Kimnp#2018-04-0612:10ajsi spend so many extra keystrokes navigating colons!#2018-04-0622:38theeternalpulseNot sure how many of you use evil mode. But I always thought it was annoying commands like <number> <motion key> didn't by default register with evil jump, so you couldn't <Ctrl>-O/I to locations navigated with it. Well turns out there's a config for that. (evil-define-command digit-argument :keep-visual t :repeat nil :jump t) adding :jump t to any of the commands listed in evil-command-properties var allows them to register with evil-jump#2018-04-0622:40theeternalpulsequite a few of them already have the jump command, but this allows you to add more. I use relative line numbering so I use the the number motion more than I use go to line commands#2018-04-0706:16ajsI used evil for c++ dev and loved it. I never liked how it worked with paredit so I gave it up. In evil mode it's quite possible to delete part of a parenthesis, something that is nearly impossible to do in normal Emacs. The evil editing commands seem to take priority over the paredit rules#2018-04-0706:30theeternalpulsethere's a setting that prevents it, but yeah, using x or deleting regions can cause issues. Though the region deleting I think is handled pretty well for me, even if you select parens or braces or whatever delimiters.#2018-04-0709:02ajsI've learned that God mode in emacs, an emacs-style modal editing mode, is a nice compromise. A lot of the benefits of evil without a heavy layer sitting on top, and still get fewer key chords. #2018-04-0709:03ajsAnd God mode always respects parens #2018-04-1019:25mathpunkSince I've been developing a lot of Clojure, I find emacs gets really, really slow over time, until I restart. I might switch to boot to have only the one JVM instance, but, is there anything else I can do to diagnose what bad habit I might have that's causing this?#2018-04-1019:27dpsutton@mathpunk i've had luck clearing the repl buffers when they get too full. if you're using CIDER, you can hit , on the repl prompt to get a helpful menu which includes a way to clear the buffer#2018-04-1116:49bozhidar@mathpunk https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html#2018-04-1116:50bozhidarIt’s best to capture a report of the slowdown with the profiler and submit to the maintainers of whatever project you’re using for development (I have a feeling I’ll be one of the people receiving that report). 😄#2018-04-1117:29theeternalpulseBe careful if you use spacemacs C-u reverts the buffer (with confirmation of course)#2018-04-1213:39andrea.crottiah brilliant didn't know about the , trick @dpsutton#2018-04-1215:10nhaAm I the only one occasionally capturing a value in the REPL? Did someone make emacs helpers for this? (I am aware of https://github.com/vvvvalvalval/scope-capture btw, not really what I am after) In other words, how do I go from:
(defn test-fn [a b]
  (let [c [a b]]
    ;; <- cursor there
    [(+ a b) c]))
to
(defn test-fn [a b]
  (let [c [a b]]
    (def a a)
    (def b b)
    (def c c)
    [(+ a b) c]))
Using a bit of elisp? I could type for instance “my-emacs-def-insert-cmd” “a” ENTER “b” ENTER “c” ENTER ENTER and have this generated? That would be a welcome addition to my particular workflow. Anyone doing this?
#2018-04-1215:28richiardiandrea@nha I think @dpsutton has something like that and I probably have the same. Not at the keyboard now, will check and write later.#2018-04-1215:28dpsuttonlet me dig it up. you have to run it while stepping through with the debugger#2018-04-1215:29dpsutton
(defun cider-debug-create-local-let (start end)
  "During debugging, grab the locally bound vars and create a let
  binding. Place this let binding in the kill ring for future use."
  (interactive "r")
  (if cider--debug-mode-response
      (nrepl-dbind-response cider--debug-mode-response (locals)
        (let* ((code (buffer-substring-no-properties start end))
               (bindings (apply #'append locals))
               (formatted-bindings (mapconcat 'identity bindings " ")))
          (kill-new (format "(let [%s]\n %s)" formatted-bindings code))
          (message "copied let form to kill ring")))
    (message "No debugging information found.")))
while in the debugger, get to a stack frame that includes the vars you want to capture. then invoke this function. it grabs the local state from the debugger and formats them into a let binding
#2018-04-1215:30dpsuttonoh and do it while highlighting code#2018-04-1215:30dpsuttonwith a region, it will capture that region as the body of the let and the locals in your debugger state as the let bindings above it#2018-04-1215:30dpsutton(kill-new (format "(let [%s]\n %s)" formatted-bindings code)) is the formatting#2018-04-1215:34nhaOh I see. Interesting, I don’t use the debugger though (I probably should, although I am quite sure some of our params are too big for it)#2018-04-1216:11nhaI suspect what I am after is simpler (ie. does not require any of cider’s functionality) - but my elisp is still fairly weak#2018-04-1216:19dpsuttondepends on how smart you want it. you could create an interactive function that would ask for a list of variable names and then insert a bunch of (def [name] [name]) inside a do block#2018-04-1216:23dpsuttontrivial example:
(defun ask-for-variable-names (names)
  (interactive "sEnter the variable names: ")
  (let ((bindings (mapcar (lambda (name)
                            (format "(def %s %s)" name name))
                          (s-split " " names))))
    (kill-new (format "(do %s)"
                      (s-join "\n" bindings)))))
#2018-04-1305:19bozhidar@nha Just out of curiosity - why exactly do you need to do this?#2018-04-1309:59nhaThanks, I tweaked it to do what I wanted:
(defun ask-for-variable-names (names)
    (interactive "sEnter the variable names: ")
    (let ((bindings (mapcar (lambda (name)
                              (format "(def %s %s)" name name))
                            (s-split " " names))))
      (insert-before-markers (string-join bindings "\n"))))
Works perfectly! 😄
#2018-04-1310:02nhaSo I use this when I basically want to capture one or several values in a running program. Usually these are either: - too big to build by hand 😄 - in a running prod system 🤫#2018-04-1310:30bozhidarIsn’t it better to add some conditional logging for those?#2018-04-1311:34nhaWell they are also too big for logging 😅 as in, it freezes my emacs completely. So I personally prefer to use a def and navigate inside it from there. I know someone in our team did pretty print these to a file instead, and opened with a separate editor/diff software.#2018-04-1313:54bozhidarWow!#2018-04-1313:54bozhidarI didn’t expect this. 😄#2018-04-1609:21michalhey, anyone tried to run cider on emacs 26 already? for some reason it does not work for me, here is a stacktrace of what happens on emacs start up:
#2018-04-1609:21michal
Debugger entered--Lisp error: (wrong-type-argument stringp package-desc)
   signal(wrong-type-argument (stringp package-desc))
   epl-package-from-lisp-file("/Users/michal/.emacs.d/elpa/clj-refactor-20180411.43/clj-refactor.el$
   epl-package-from-file("/Users/michal/.emacs.d/elpa/clj-refactor-20180411.43/clj-refactor.el")
   (epl-package-version (epl-package-from-file source))
   (let* ((source (pkg-info-library-source library)) (version (epl-package-version (epl-package-fro$
   pkg-info-library-version(clj-refactor)
   (or orig-version (pkg-info-library-version library))
   (let* ((package (or package (if (stringp library) (intern library) library))) (orig-version (con$
   pkg-info-version-info(clj-refactor)
   cljr--version(t)
   cljr--inject-jack-in-dependencies()
   #f(compiled-function () #<bytecode 0x40ee2151>)()
   eval-after-load(cider #f(compiled-function () #<bytecode 0x40ee2151>))
   byte-code("\300\301\302\"\210\303\304\305\"\210\306\307\310\311#\210\312\211\2032\0\
#2018-04-1609:22michalseems like there is a problem with dependent clj-refactor, isn't it?#2018-04-1609:48michalok, nevermind. found the answer here: https://github.com/clojure-emacs/clj-refactor.el/issues/369 🙂#2018-04-1610:21bozhidarSeems to me something’s wrong with the package metadata.#2018-04-1610:49troglotitHey! Does someone uses Avy https://github.com/abo-abo/avy with Clojure? I’m trying to make avy-goto-word be able to jump to first letter of a keyword, maybe you’ve done it. It works for elisp and ruby, so somewhat strange. btw, I’m using spacemacs#2018-04-1611:30hkjels@troglotit I use Avy and it works just fine. Perhaps you have some configuration that causes issues#2018-04-1613:12bozhidar@troglotit Works fine for me as well.#2018-04-1613:13bozhidarActually I think I always use avy-goto-char.#2018-04-1618:50lilactownhas anyone figured a good way to use screen inside of ansi-term?#2018-04-1618:50lilactownI'm using spacemacs and I can't figure out how to send the commands (e.g. C-a ...) to screen, Emacs just eats them#2018-04-1621:38dpsuttonhttps://twitter.com/mtnygard/status/985994590619684870#2018-04-1703:10agJust never take them off. Keep them on all the time.#2018-04-1623:29jeff.terrell@lilactown - Just a guess, but in general the quoting character in emacs is C-q. So to send a literal C-a to screen in ansi-term, try C-q C-a. Sounds like not a very pleasant experience to me, but ¯\(ツ)/¯#2018-04-1623:31lilactownno luck 😭 thanks though#2018-04-1706:32bozhidar@lilactown Have you seen this http://blog.nguyenvq.com/blog/2009/06/01/run-screen-in-emacs-with-ansi-term-combine-this-with-emacs-ess-remote-r/#2018-04-1815:42eggsyntaxAnyone else run across this one when starting a cljs repl (in my case, via cider-jack-in-clojurescript)?
Exception Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
 A) not providing piggieback as a dependency and/or
 B) not adding piggieback middleware into your nrepl middleware chain.
[...]
Note: Cider will inject this config into your project.clj.
This can cause confusion when your are not using Cider.  figwheel-sidecar.repl/eval32849/fn--32850 (repl.clj:176)
I've been troubleshooting this one for a while now, so at this point I'm using: - a fresh spacemacs install, without my .spacemacs - a fresh luminus project - no ~/.lein/profiles.clj - a rebooted box I initially encountered it on a luminus project that I've been working on for weeks; it was working fine until last night. I do note that a fresh reagent project doesn't show this problem. So I'll probably working my way through the differences between luminus & reagent templates with a fine-toothed comb -- but I thought I'd check here first to see if anyone else had encountered this.
#2018-04-1816:04dpsutton@eggsyntax come to #cider there are some change issues going on right now#2018-04-1918:45sarnahey, I have a weird problem. I'm using spacemacs and when I'm saving a file, it doesn't save sometimes#2018-04-1918:46sarnaI've lost some progress today and I'm pretty sure I exited by doing :wq#2018-04-1918:57jeff.terrellThat sounds lame. Can you figure out how to reproduce the problem consistently?#2018-04-1919:02sarnait's pretty inconsistent, that's why I'm puzzled#2018-04-1919:02sarnaoh, auto-save doesn't work at all#2018-04-1919:02sarna:thinking_face:#2018-04-1919:06sarnasteps to reproduce: modify a file be idle for 30 secs so "auto saving.. done" appears kill emacs the file is unchanged#2018-04-1919:10sarnaokay, so: another file is created, named #foo. and then, when I open emacs, it says for a fraction of a second: "a modified version of foo exists, hit something to recover" how am I supposed to be quick enough to notice the text and hit this key combination 😕#2018-04-1919:10jeff.terrellYeah, auto-saving doesn't occur to the actual file, but to a backup.#2018-04-1919:10jeff.terrellYou can view the *Messages* buffer to see old messages, including that one.#2018-04-1919:14sarnawell, is there a way to auto-save to the actual file?#2018-04-2008:28hkjelsYou should check out super-save#2018-04-2008:29hkjelsOhh, I see someone already mentioned it 🙂#2018-04-1919:24jeff.terrellAlmost certainly, if you're willing to dig into the world of elisp. simple_smile But I don't know a simple way. Personally, I've just gotten good at hitting SPC f s (in Spacemacs).#2018-04-1919:24sarnaalright, thanks anyway 😞#2018-04-1920:19ag@mailmeupinside I remember @bozhidar wrote a package couple of years ago that saves a file when the buffer loses focus#2018-04-1920:20bozhidarYeah, I did.#2018-04-1920:20bozhidarhttps://github.com/bbatsov/super-save#2018-04-1920:23agsee, all the problems that you have either already were solved by @bozhidar or he simply never had time to work on it. Or the problem of yours is imaginary and does not require a solution#2018-04-1920:23sarnathanks @ag @bozhidar!#2018-04-1920:24sarnaor should I post it on #cider#2018-04-1920:25sarnawell wait I can't post images apparently#2018-04-1920:25sarnaand I can't edit that message.. https://cider.readthedocs.io/en/latest/images/tracing.png#2018-04-2005:02artenatoranyone else having issues lately with font highlighting of required vars?#2018-04-2005:04bozhidar@mailmeupinside What message?#2018-04-2011:55sarnanvm, I just got confused by slack :^)#2018-04-2005:04bozhidar@soosool12 What do you mean by this? The dynamic font-locking in CIDER?#2018-04-2005:07artenator@bozhidar hi! yes the dynamic font locking in cider seems to not be working for me as of yesterday#2018-04-2005:07artenatorat least for requires#2018-04-2005:07bozhidarCan I see an example?#2018-04-2005:09bozhidarThose were never font-locked dynamically by CIDER - they were always statically font-locked by clojure-mode.#2018-04-2005:10bozhidarLikely that’s a result of some recent changes we had in clojure-mode to simplify font-locking.#2018-04-2005:11bozhidarhttps://github.com/clojure-emacs/clojure-mode/pull/462#2018-04-2005:11bozhidarPerhaps this is a regression from there. You can file a ticket, as honestly I haven’t tested the results of those changes much - I just agreed with the general sentiment that the previous code wasn’t working properly.#2018-04-2005:14artenatorohhh.. i see. OK thank you for the quick response! I will file a ticket and revert to an older version for now… 🙂#2018-04-2005:14artenatorI have been trying to fix this issue with my CIDER config as well…#2018-04-2005:22dpsuttonWhat's the issue here#2018-04-2005:25artenatorpreviously, i was able to set a default cljs repl. I was given an array of choices (e.g. fighweel, rhino) but now it says mismatch/nil and i’m unable to change the state#2018-04-2005:33dpsuttonYou just down graded right?#2018-04-2005:33dpsuttonI think that was a new variable#2018-04-2005:34dpsuttonDo you know how to navigate to functions in elisp?#2018-04-2005:34dpsuttonI'd post the code but I'm on mobile in bed#2018-04-2005:35artenatorAhhh no i’ve never navigated functions in elisp. I will try it out though! If I get stuck, maybe i’ll direct message you another time if that’s ok 🙂#2018-04-2005:36dpsuttonFor sure#2018-04-2005:36dpsuttonAre you in emacs or spacacs#2018-04-2005:36artenatoremacs#2018-04-2005:36dpsuttonAwesome. Hit C-c C-f#2018-04-2005:37dpsuttonAnd type cider Jack in and it should take you to that function#2018-04-2005:37dpsuttonAt the bottom there should be a line like (when cljs-too (cider sibling repl ...)) Or something similar#2018-04-2005:38dpsuttonYou'll want to navigate to that function with meta period when point (the cursor) is on top of that symbol#2018-04-2005:39dpsuttonAnd let me know if anything above is not clear#2018-04-2005:43artenatorHmm. i’m getting C-c C-f is undefined I need to be in the elisp file when doing this right? I’m not sure where to find it since I installed with melpa#2018-04-2005:44dpsuttonAh yes. I'm chording from memory. C-h C-f#2018-04-2005:44dpsuttonThe help menu :)#2018-04-2005:50artenatorahhh! found it!#2018-04-2005:51artenatorWhat’s next?#2018-04-2005:52dpsuttonDo you see that form at the end that starts the cljs repl? (when cljs-too ...#2018-04-2005:52artenatoryes#2018-04-2005:52dpsuttonThat function which is called does at the work. Navigate to it#2018-04-2005:52dpsuttonYou can navigate to it if you put your cursor on it and hit meta period#2018-04-2005:53dpsuttonMeta comma will pop you back out from this. Very handy nav tool#2018-04-2005:54artenatorawesome! found it! meta-period didn’t work here unfortunately… but it works fine in my clojure projects. in cider.el i get TAGS does not exist#2018-04-2005:54artenatorbut i was able to get to the function definition#2018-04-2005:55dpsuttonAh you're on emacs 24 then I guess#2018-04-2005:55artenatoryes i am 😞#2018-04-2005:55dpsuttonOk. Well now you're looking for something that looks like cljs repl type#2018-04-2005:56dpsuttonIt's gonna figure out what kind of repl to crank up and do that. So root around in here for the variable name and then go customize that one as it needs#2018-04-2005:56dpsuttonIt might have lein in the name as this was before they were unified#2018-04-2005:58artenatorahh i see. cool! I had no idea you could navigate the package code like this 😎 I really appreciate the help!#2018-04-2006:00dpsuttonEmacs is crazy awesome like that#2018-04-2006:00dpsuttonSelf documenting editor#2018-04-2006:01dpsuttonIf you update to 25 your nav will get easier. And then you can just trace things around and see what's up and how everything works#2018-04-2006:03artenatorI am afraid of upgrading because I’ve spent so much time making my config work the way I like… haha. Isn’t 26 out now too?#2018-04-2006:04dpsuttonI'm not sure. I don't think there was anything breaking in 24->25. Also CIDER dropped support for 24 I believe. It might still work but it's no longer tested against that#2018-04-2006:52bozhidarGenerally things rarely break between major Emacs versions. You might get some deprecation warnings here and there, but the Emacs team is pretty big on backwards compatibility.#2018-04-2006:52bozhidar> previously, i was able to set a default cljs repl. I was given an array of choices (e.g. fighweel, rhino) but now it says mismatch/nil and i’m unable to change the state#2018-04-2006:53bozhidarYeah, what you describe is something new, available only in 0.17-snapshot, which should become the next stable release pretty soon.#2018-04-2007:25aliceGot a problem some emacs users here might be familiar with. https://i.redditmedia.com/rED7x8F2_A6hiKwjnwiucwAxF2E5x1DEG4xg7zhnrn8.png?w=1024&amp;s=7964cb9f406003edc21d772e12f17ffa Whenever there is an error spacemacs forces new repls to open and it's SUPER ANNOYING#2018-04-2320:01didibusI have this problem. Havnt found the root cause. For me it happens if neotree is opened.#2018-04-2007:25aliceHas anyone else seen this?#2018-04-2014:15mpinggreetings fellows, is there any fuzzy matcher for emacs that searches in file contents?#2018-04-2015:01shakdwipeea@mping have you tried rgrep ?#2018-04-2015:10mping@shakdwipeea nope#2018-04-2015:13mpingI’d like a more interactive thing, like this: https://github.com/seenaburns/fzf.el/#2018-04-2015:14mping(that one is almost what I want)#2018-04-2015:15cmackYes. I use helm-ag to do this but have it modified to use ripgrep for the searching#2018-04-2214:26ajsat Dutch Clojure Days conference yesterday, heard some good things from attendees about parinfer, but none of them were using emacs. I see there is an implementation for emacs, what are opinions about it?#2018-04-2414:50Wesley MatsonI use parinfer, though I've started experimenting with its option to include the paredit hotkeys. It was much easier to start with parinfer than it would have been to learn paredit, clojure, and emacs all at the same time.#2018-04-2220:04benzap@ajs I started using it about two weeks ago. I don't know if it made me more productive, but my code got a bit cleaner. I suppose I produce a lot less errors#2018-04-2220:05benzapI think my config might be a bit botched though. While in indent-mode, I feel like pressing tab should automatically move the current line in between s-exp forms, but mine doesn't seem to work. Too many things going on with the tab key in my config.#2018-04-2305:15bozhidarI played with it once, but I didn’t feel more productive. I’m very used to paredit I guess, and I like explicitly doing stuff.#2018-04-2305:15bozhidarBtw, for Emacs there are also - smartparens-strict-mode and lispy. Both are cool projects.#2018-04-2305:17bozhidarAnd, of course, https://github.com/promethial/paxedit#2018-04-2305:17bozhidarSeems we’re crazy about editing parens effectively in Emacs. 😄#2018-04-2313:29Maris<root level="INFO"> <!-- <appender-ref ref="stdout" /> --> <appender-ref ref="file"/> </root>#2018-04-2313:30MarisIs it possible to turn off STDOUT redirection to Emacs CIDER buffer? I have to disable appender to stop it spamming my REPL#2018-04-2314:50bozhidarIt’s possible, but it’s hard for most people to do it. (you need to modify the middleware stack and (or) the command that unconditionally triggers this middleware).#2018-04-2314:50bozhidarIt’s already on my todo to change this, as a couple of people have complained about this as well. I’ll make this configurable.#2018-04-2315:49Marisok 👍#2018-04-2414:13eggsyntaxI had been leveraging cider-cljs-lein-repl to trigger multiple figwheel builds, since it involved specifying the code to run. The switch to cider-default-cljs-repl seems like a good choice, but is anyone aware of a good alternate strategy to trigger multiple figwheel builds? cider-default-cljs-repl has a custom option, but there's not a way to specify in advance the code to run; it always uses read-from-minibuffer to ask the user. A strategy using CIDER or Figwheel or something else entirely would be awesome.#2018-04-2415:22bozhidar@eggsyntax There is also a command to register new repl types to solve your problem.#2018-04-2415:22bozhidarI’m not very familiar with figwheel and its concept of builds, so I can’t provide concrete ideas what can be done to improve your problem with figwheel.#2018-04-2415:23eggsyntaxAha! I saw that, but it didn't occur to me that it could be applied to my problem.#2018-04-2415:23eggsyntaxI think that'll totally work; I'll go back & take a look at it 🙂#2018-04-2415:23bozhidarcider-register-cljs-repl-type is meant to be used in config files to extend the default list of repl types permanently.#2018-04-2415:24bozhidarGreat!#2018-04-2415:24eggsyntaxIs it possible to specify it on a per-project basis, eg in dir-locals.el? I'm guessing so, but I've never tried to use dir-locals.el for anything but setting variables. (if you don't know offhand, don't worry about it; I'll go figure it out)#2018-04-2415:27bozhidarYeah, it’s possible. You can also just override the list of know repls on a per project basis. Whatever works best for you.#2018-04-2415:27eggsyntaxOh, good point. Cool, thanks @bozhidar!#2018-04-2416:07eraserhdHey, I'm a Vimmer, but have a question about how emacs works. I know emacs has buffers that are "subsets" or "focused parts" of other buffers. What is this called?#2018-04-2416:11gonewest818Based on that description you might be referring to narrowing.#2018-04-2416:11gonewest818https://www.gnu.org/software/emacs/manual/html_node/emacs/Narrowing.html#2018-04-2416:13gonewest818Or you might be referring to multiple windows#2018-04-2416:13gonewest818https://emacs.stackexchange.com/questions/13583/whats-the-difference-between-a-buffer-a-file-a-window-and-a-frame#2018-04-2416:26eraserhdInteresting. I think narrowing is it.#2018-04-2416:28eraserhdYeah, the narrow-to-defun thing is exactly the sort of thing I've seen. Can you have two different panes or windows (ugh, terminology) narrowed to different functions?#2018-04-2416:28eraserhd(from the same file)?#2018-04-2421:32bozhidar@maris.orbidans https://github.com/clojure-emacs/cider/commit/11d34ccd007c9553a9847fe60ec20f654d313d8d#2018-04-2500:17sophiagoanyone here know elisp regex well? i'm trying to hack together some really simple yet idiosyncratic syntax highlighting#2018-04-2503:16bozhidar@sophiago Try us. I don’t think anyone really knows elisps regexes well, but we can probably help you.#2018-04-2503:29sophiagoi learned the trick is mostly just to use two backslashes whenever you'd normally use one 😛#2018-04-2503:29sophiagoand no perl crap#2018-04-2503:30sophiago(which kind of sucks, because i could really use lookahead/lookbehind)#2018-04-2503:35sophiagoi'm almost at what i think is the best i can get with just plain regex. really two issues remaining if you have idea. one is \\[\\w*\\|\\b*\\] will match for [foo whereas i'm trying to get [foo bar. i would think i could just use \\[[\\w*\\|\\b*]*\\] but no dice#2018-04-2503:40sophiagooh, i just solved the other issue on my own. it's really just painstaking is all 😛#2018-04-2503:43dpsuttonTheres an API to help build them so you don't have to union them together#2018-04-2503:44dpsuttonCider compiles it's font locking with these#2018-04-2503:45sophiagodo you mean (rx ...)?#2018-04-2503:45dpsuttonyup#2018-04-2503:46dpsuttonwow. what a doc string on that macro#2018-04-2503:46sophiagoha. yeah, i was stubborn about that but now i'm realizing that last issue doesn't work because i can't use | both to delimit matches and matches inside matches#2018-04-2503:57sophiagough, the closest i can get to matching on a vector is \\[\\w*\\|\\b*\\|\\w*\\]. this seems just a matter of repetition, not recursion, though. i still think it's weird elisp regex syntax throwing me off#2018-04-2504:33richiardiandreaAlso re-builder is very helpful#2018-04-2504:36sophiagoto be fair, i'm momentarily taking a stubborn approach just as a regex refresher. for example, i've read about the pumping lemma a lot and think i only actually understood it today via the example of matching parens#2018-04-2509:39Maris@bozhidar thank you so much !!!!#2018-04-2511:14bozhidarYou’re welcome!#2018-04-2511:15bozhidarAt some point I really want to make this more flexible, but for now it will do.#2018-04-2518:21theeternalpulseHoly crap magit's merge rebase functionality was giving me the biggest heart attack until I realized what it's doing. I reallly need to read the docs lol#2018-04-2519:57bozhidarWe all should! 🙂#2018-04-2520:35richiardiandreaWhat Emacs colore themes do you folks use? I think I need some change#2018-04-2520:37tanzoniteblackhttps://github.com/kuanyui/moe-theme.el is what I've been using for the last few years#2018-04-2520:41richiardiandreaPretty cool thank you!#2018-04-2520:37tanzoniteblackHas support for an amazingly large number of custom font faces from various modes#2018-04-2520:42richiardiandreaI use https://github.com/bbatsov/solarized-emacs from the immense Bozhidar#2018-04-2520:42richiardiandreaBut every now and then I need something new 😄#2018-04-2523:48blueberry@richiardiandrea cyberpunk#2018-04-2523:53artenatorJust upgraded to emacs 26.1 and I’m running into an issue with clj-refactor causing this error.. “Wrong type argument: stringp, package-desc” Anyone else run into this?#2018-04-2600:18artenatorJust in case anyone else runs into this.. i fixed it by replacing (require ’clj-refactor) with (clj-refactor-mode t) in my .emacs config#2018-04-2607:19zetafish@richiardiandrea grandshell#2018-04-2612:26bozhidar@richiardiandrea Zenburn 😉#2018-04-2612:28bozhidarYou should check this site, btw - https://pawelbx.github.io/emacs-theme-gallery/#2018-04-2613:41acron@richiardiandrea Doom themes#2018-04-2614:22vijaykirandoom-one#2018-04-2614:33eggsyntaxOK, I give up on getting non-emacs folks to use ;; for line comments. I'm told that Cursive doesn't have a way to configure that. Anyone found a way to tell emacs not to reindent single-`;` line comments in clj/s?#2018-04-2614:46bozhidar@eggsyntax ; in classic Lisp tradition means inline comment, that’s why Emacs re-indents those. People should be using ;; (or more ;) for line comments.#2018-04-2614:47bozhidarRight now there’s no easy way to change this and the behaviour in Cursive is wrong as far as I’m concerned.#2018-04-2614:48eggsyntaxI know. I agree entirely that Cursive is wrong here (sorry @cfleming). But I work with a number of Cursive users, and I'm tired of nagging them to remember to do it.#2018-04-2614:50bozhidarGot it. Well, it seems to me that ideally this should be fixed in Cursive.#2018-04-2614:51eggsyntaxAgreed.#2018-04-2615:54eggsyntaxWell, I've filed a Cursive issue requesting at least a config option to use ;; for line comments. In the meantime I'll keep poking around for workarounds. My best guess at this point is that I'd have to write my own comment-indent-function. Here's the issue, in case anyone has anything they want to add: https://github.com/cursive-ide/cursive/issues/1983#2018-04-2617:47bozhidarYeah, I think currently we just use the one from lisp-mode. Might be good to move it to clojure-mode, so at least we can make it configurable.#2018-04-2617:47bozhidarIf you want to take a stab at this - I can provide you with some tactical support.#2018-04-2622:38artenatorhas anyone gotten expand-region to work in emacs 26.1?#2018-04-2622:52richiardiandrea@soosool12 I think it works for me on 26.0.91#2018-04-2622:52richiardiandreabut exactly is not working?#2018-04-2622:54artenatorseems to be expanding one delimiter more than it should. i.e. (let [asdf asdf] )#2018-04-2622:54artenatorthat is what it highlights if my cursor is on the first opening square bracket @richiardiandrea#2018-04-2622:55richiardiandrealet me try#2018-04-2622:56richiardiandreait works here#2018-04-2622:56artenatorhmm ok maybe i will consider downgrading. thanks for checking for me!#2018-04-2622:56richiardiandreanp 😉#2018-04-2708:11acronI posted this question on reddit but no luck#2018-04-2708:11acronI've installed emacs on a fresh Ubuntu 17.10 with i3. What's this white/grey border around the window and, more importantly, how do I remove it? https://imgur.com/a/KI8pQC1#2018-04-2708:44gsnewmarkcould it be your i3's active window border? It’s color is configured using client.focused variable (https://i3wm.org/docs/userguide.html#_changing_colors) and presence using the default_border (https://i3wm.org/docs/userguide.html#_default_border_style_for_new_windows). Or is this border only present for the Emacs?#2018-04-2708:12acronThis is GUI Emacs, not Terminal - and that's my preference. Only shows on Emacs so inclined to think it's not a WM thing.#2018-04-2708:18nekHello everyone 👋#2018-04-2708:27cfleming@bozhidar @eggsyntax Honestly, “because lisp” is a pretty bad answer when someone asks why something works the way it does.#2018-04-2710:07acron@munen I have the same setup on another PC and there's no borders 😕#2018-04-2710:07acronI honestly have no clue where this border is coming from#2018-04-2710:08munenWell, not to be tedious or something - but there's a good chance it's not exactly the same setup, right?(;#2018-04-2712:08bozhidar@cfleming Well, you can’t easily discourage historical conventions - different comment headings were meant to have different meanings and this still holds true for many people using Clojure. If you think about it many people in programming are “because X”. 🙂#2018-04-2713:04eggsyntax@cfleming how would you feel about adding the option of using ;; for line comments? That would go a long way toward supporting mixed-IDE teams. (I filed an issue requesting that feature yesterday, BTW -- https://github.com/cursive-ide/cursive/issues/1983 )#2018-04-2719:29cfleming@eggsyntax Sure, I could do that, but Emacs could also equally add an option to not move single ; comments out to 60 chars or whatever, which if I understand correctly is the main problem. The only reason that I can tell for not doing that is historical.#2018-04-2719:56eggsyntax@cfleming granted that Emacs could also change here. I think there's almost no chance that Emacs itself will make this change, since Clojurians are just a sliver of the Emacs community. And clearly @bozhidar dislikes the idea of changing it in CIDER. So I'm appealing to you 🙂 FWIW, if you were to take a poll of Clojurians, I think a large majority of them would either a) say that ;; for line comments is correct, or b) have no opinion either way. I've never heard anyone argue that ; is the more correct option (until now, maybe?). Historical tradition certainly isn't law, but in the absence of good arguments to the contrary, it seems like a reasonable way to go (or at least to have an option for). If there are arguments for ; (other than saving a keypress), I'd love to know about them. Anyhow, I certainly don't think you're under any obligation to change it -- it's just that it would be nice if there were some good way to avoid constant reindentation on mixed Cursive/Emacs teams. If I can squeeze out the time, I may try to at least come up with a workaround for Emacs (I use Cursive sometimes, but I don't know much about how to do Cursive customization of that sort).#2018-04-2720:21cfleming@eggsyntax Sure, I’ll add the option in Cursive - I don’t have strong feelings either way, and I’ve added options for Emacs compatibility previously (like one space list indent). But I’ve literally never felt the need for more than ; in my comments - it seems to add no information at all.#2018-04-2720:22cflemingBut I accept that I’m doomed to emulate Emacs’ weird corners for mixed-editor teams 🙂#2018-04-2720:25eggsyntaxThat's fantastic, @cfleming! Thank you so much for being willing to do that 🙇#2018-04-2722:52bozhidarFWIW - I’m not strongly opposed to making this configurable, I’m just juggling a million projects and a ton of work. Seems to me on the Emacs side my time can be better spent elsewhere.#2018-04-2722:53bozhidarBtw, there’s one advantage of distinct comments - you can afterwards easily search forward for them. (e.g. I often look specially for ;;;).#2018-04-2722:53bozhidarI guess that becomes useful after it becomes a habit, though. 🙂#2018-04-2801:18cfleming> my time can be better spent elsewhere FWIW I also feel the same on the Cursive side 🙂#2018-04-2801:18cflemingBut sure, I can see how it’s painful.#2018-04-2804:14bozhidarhehe#2018-04-2804:14bozhidarTouche! 😄#2018-04-2912:41munenI gave a talk "Play Emacs like an instrument" this week. It's a general talk about all the good things that can be done in Emacs. Maybe someone of you would enjoy it: https://200ok.ch/posts/2018-04-27_Play_Emacs_like_an_Instrument.html#2018-04-2912:59bozhidarNice! > Emacs renaissance came with the advent of Clojure Probably Clojure helped indeed, but I think that Spacemacs contributed more to the “return” of Emacs 🙂#2018-04-2914:02munenNot so sure about that. But of course I'm biased, since Spacemacs doesn't follow the main principle of the talk (simple is better than complex + learning a proven paradigm properly supersedes following the newest hypes). On the other hand I'm not going to argue with the guy whose name came up quite a few times - probably only "Emacs" itself was mentioned more often(;#2018-04-2914:03munenI held the talk at the Clojure Meetup for Zurich (Switzerland), too. So there's the second bias. For that group, it was definitively true since most of them were using Emacs (with Cider!) due to Clojure, but only a minority was using Emacs for non-dev related work.#2018-04-2915:46munenI understand your viewpoint, then, too. Before Clojure, I was using VIM for ~14 years and only vaguely new that Emacs should/would/could be "better". Before my third try with Clojure, though, I didn't really get "LISP" - all I knew was that I should spend more time with it, because it had this magical quality to it which kept drawing me in. That was about 4 years ago when using VIM with Fireplace would be pretty painful. VIM was doing linting/syntax highlighting synchronously - which wasn't a problem until I tried it with Clojure. It meant switching buffers took multiple seconds. When I realized that Emacs had a proper VIM implementation by then (evil), it only took me 30 minutes to move most of my VIM knowledge (minus a couple plugins) to Emacs. And shortly after that I was completely hooked! Since Emacs, in principle, is mainly a Lisp Repl, has hooks and all other functions are advisable, it opened so many doors. The last years were a continuous gain in momentum for me - I moved so many workflows into Emacs. Not because I had to, but because it was more efficient, more fun and future proof (text >> proprietary tools/formats). It's been such a wonderful (literally) experience. Btw, I do like Ruby and Python, too(; And I do like to write Ruby in Emacs, too. With robe-mode and rubocop, it's quite a nice experience, imho. Not as good as Emacs/Cider, of course. Btw, I also demoed both during the talk and gave credit where it is due^^ Are you using a different editor/IDE when writing Ruby? As I understand it from a talk of you and your great OSS contributions, you're spending a lot of your professional career doing Ruby.#2018-04-3002:53bozhidarNo, I use Emacs for pretty much everything except things like Java/Scala. It’s just not as pleasant to work with some of those languages, because the tooling is pretty basic. On the other hand - most Lisps have amazing Emacs support.#2018-04-3005:09munenSame here, then. Thanks for the clarification^^ And good luck that your paid future exposure to Java becomes less and your exposure to the languages you enjoy, increases!#2018-04-3011:11bozhidarI wouldn’t worry much about this - I used to be a Java/Scala dev a while ago, haven’t really done much with either since. 🙂#2018-04-3013:12munenActually, I don't. Haven't done Java or .NET in .. 10 years. It's mostly Clojure, Ruby or JavaScript these days. Or mails, or project planning. All of which are great on Emacs, too(;#2018-04-3017:24bozhidarYou’re living the dream! 😉#2018-05-0116:25theeternalpulseI started my career with JS/C#. Granted I'd prefer to work in Clojure, but honestly I'd prefer to work with C# than Java/Js these days#2018-05-0116:26theeternalpulsethough C# has that pesky expensive IDE that's nowhere near as good as emacs lol 😞#2018-05-0117:30agI heard people using Emacs to write C# and F#... is that a myth?#2018-05-0117:41theeternalpulseLong ago I tried to migrate my then monolithic dev-project at work to sublime text. The biggest problem was building the project which I couldn't really get working#2018-05-0117:42theeternalpulseMuch of my work eventually went to node and I used atom mostly, then I quit and now I use EMACS with js/react#2018-05-0117:42theeternalpulsewhich has issues but mostly around me being too lazy to do a full configuration of the various modes I use#2018-05-0117:43theeternalpulseMeanwhile my clojure setup works great out of the box, with little configuration 🙂#2018-05-0117:43theeternalpulseemacs is just made for lisps#2018-05-0217:41theeternalpulseAnyone use parinfer mode for emacs instead of paredit/smartparens?#2018-05-0218:52andnilsI tried parinfer a couple of times, but it’s not for me.#2018-05-0218:47andnilsWhat’s the ultimate “buffer/window-manager” for emacs? I started with projectile, but I wanted something more graphical - I wanted to see the file layout of the project. “What files are in the same dir as this file?“, and that kind of questions. Then I found project-explorer which is kind of almost what I want. What else is there? What are you using?#2018-05-0218:57nenadalmI am using tabbar (https://www.emacswiki.org/emacs/TabBarMode) and NeoTree (https://www.emacswiki.org/emacs/NeoTree)#2018-05-0218:49andnilsOK…I just read what I wrote… 🙂 “buffer/window-manager” is probably NOT the word I’m looking for. Maybe “Project-files-handler-thingy”#2018-05-0219:00dpsuttonyou can check out projectile by the maintainer of CIDER#2018-05-0219:05munenI'm using projectile with dired and and very happy with it(;#2018-05-0219:06dpsuttoni'm in the same boat. dired and projectile#2018-05-0220:17bostonaholic@andnils there is https://github.com/jaypei/emacs-neotree#2018-05-0220:20theeternalpulseprojectile still operates within the background buffer type interface, so it's not really graphical, neotree is definitely the one you want. I find also purpose mode (if you can get it well configured) good as you can make your own custom layout and not be worried of certain buffers from being pushed out of view.#2018-05-0220:21andnilsthx all!#2018-05-0222:01agI've tried neotree/treemacs many times, and could make myself not to hate them. I use direx#2018-05-0222:23bozhidarI rarely browse files these days, projectile is what I need 99% of the time. dired covers all my other use-cases.#2018-05-0222:24bozhidarAnd, of course, you can combine them - projectile has a command to show you all dirs in a project and open the selected dir with dired.#2018-05-0300:32theeternalpulsesince I use spacemacs I often get the projectile/file search, and resume last search/resume helm key bindings confused#2018-05-0417:59Drew VerleeAnyone know what the state of the art is around “emacs/spacemacs literate programming clojure cider”. I know thats just a word cloud but i’m trying to piece things together and its not clear what project, blog, etc…. i should be looking at.#2018-05-0418:06dpsuttonI think @stardiviner is working on that#2018-05-0418:21agOne of the things I learned from using Emacs, is that if you want "state of the art" you'd have to create it yourself. Art is subjective#2018-05-0418:22dpsuttonhttps://github.com/stardiviner/ob-clojure-literate#2018-05-0418:23dpsuttoni don't know anything about it. I've just seen the author working on issues on CIDER issues and in #cider#2018-05-0420:02Drew Verlee@ag Well than, i’m looking for “good enough” lol.#2018-05-0618:49theeternalpulseMaking your own organized emacs config just re-enforces how awesome elisp/lisp/lisps are.#2018-05-0620:30bozhidar:thumbsup:#2018-05-0620:30bozhidarTotally!#2018-05-0718:59noogayeah, I finally ditched emacs-live and made one myself and it was very refershing#2018-05-0719:29richiardiandreaI am still keeping emacs-live on my side, I haven't felt compelled to ditch it, but I have to say my fork is way ahead and I have a pretty big custom package#2018-05-0719:32tanzoniteblack@richiardiandrea I kept emacs-live for quite awhile, before finally deciding that my customizations were getting so different that it was getting kind of ridiculous#2018-05-0719:32tanzoniteblackbut definitely if you're not at that point, there's no reason to ditch it#2018-05-0719:34richiardiandreakeeping my comment here so that I do not interfere with the release 😄 Borg is a good alternative I am looking into https://github.com/emacscollective/emacs.g#2018-05-0719:33bozhidarWell, we did it! Enjoy CIDER Andalucía! https://github.com/clojure-emacs/cider/releases/tag/v0.17.0#2018-05-0719:41richiardiandreaupdated! https://github.com/arichiardi/emacs-live/commits/master 😄#2018-05-0722:22theeternalpulseinteresting, does it always glow like that lol. I'm kind of basing my config from spacemacs, as it has quite a lot of features, it's easy to have the config open and find out what I need and just add it to the config.#2018-05-0806:53hkjelsWas wondering of that to, but I think it’s just some post-production#2018-05-0807:26theeternalpulsedoes anyone use evil-mode and 'fd' to escape? do you use :ws to save after? I've been using spacemacs for so long but found I could find something more optimal that "fd spc f s" to escape then save.#2018-05-0809:32joelkuiperjust swapped evil-paredit for evil-cleverparens (with paredit), and it’s great (my messy dotfiles https://github.com/joelkuiper/dotfiles/blob/master/emacs)#2018-05-0810:03hkjelsInteresting. What’s the benefit your seeing?#2018-05-0810:05joelkuiperhitting dd no longer gives an error, but does something sensible while keeping the parens balanced#2018-05-0810:06joelkuiperevil-paredit simply errors out if you are about to unbalance the parens, but cleverparens seems to guess my intention most of the time which is nice#2018-05-0810:24hkjelsNice. I’ll give it a go#2018-05-0814:51theeternalpulsewhat about lispy, I hear it is pretty great, i'm still setting it up in my emacs.d but have seen comments of how much better it is than paredit. I've also used parinfer with some luck.#2018-05-0814:59joelkuiperhaven’t really looked into them, paredit and vim bindings are in muscle memory … so I see no reason to break old habits 😛#2018-05-0820:47mattlyI’m coming back to emacs from a stint in Atom, and revisiting my configs… what do y’all use for linting clojure?#2018-05-0821:31theeternalpulsedo you mean for form structure or highlighting other errrors?#2018-05-0821:32theeternalpulseabove this thread are some suggestions on good lisp structure libraries I've used paredit and parinfer with success, though there are other options.#2018-05-0821:41mattlymostly other errors, it’s been a long time since I’ve had a true syntax error#2018-05-0906:50bozhidarflycheck-joker and squiggly-clojure are popular options#2018-05-0904:56soulflyerIs there an easy way to stop emacs from re-centering the cursor when using cider-repl-backward-input? It doesn't always do it, just often enough to be seriously distracting 😕#2018-05-0912:08hlolliI've never questioned this eldoc behaviour until now, I believe I've never seen eldoc behave otherwise. So it's like this, imagine the pipe is the cursor:
(set |)
____
set: (SYMBOL NEWVAL)
____
I delete one char and the minibuffer is empty
(set|)
____
____
I move right
(set)|
____
____
I move back left and I get the eldoc info back
(set|)
____
set: (SYMBOL NEWVAL)
____
So I tend to be constantly moveing around with the arrows to retrigger the eldoc. Is there a config/workaround to have the eldoc not disappear on the doing backspace?
#2018-05-0915:11andrea.crottiMm maybe there is a way but it seems normal behavior to me#2018-05-0915:12andrea.crottiHow does it know you are not done writing the function name if there is no space? @hlolli #2018-05-0919:18hlolli@andrea.crotti it knows the function name, you can see that for two reasons, one that by moveing the cursor from right to left without adding a space, will show the eldoc in the minibuffer (this is probably due to syntax-table mechanism), another reason is that I can add any amount of spaces
(set                 |)
____
set: (SYMBOL NEWVAL)
____
then I click backspace and the eldoc is gone
(set                |)
____
____
I have a theory that this is eldoc trying to be efficient, because when clicking space you're much likely to be next to a symbol that eldoc can find, vs clicking backspace you can be deleting a symbol, and the odds are much lower that it renders result. But I'd like to send eldoc to work anyway, my computer is fast enough and I think this optimization is not neccecary.
#2018-05-0919:27hlolliah bingo, found the reason for this this is paredit-backward-delete that's causing this, this doen't happen if paredit mode is disabled. I think I'll just open a ticket 😛#2018-05-0919:41hlollisent the maintainer of paredit just direct email, since there's no source-tree for the project. Fingers crossed.#2018-05-1007:08bozhidarThe repo of the project is here http://mumble.net/~campbell/git/paredit.git/ btw#2018-05-1007:09bozhidarBut yeah - I get what you mean 🙂#2018-05-1013:51hlolliI guess the ticketing system to this repo is his email. He sounded positive about the report, it's not solved yet. Seems bit mysterious what's causing this
(defun test-backward-delete-char (&optional arg)
  (interactive "P")
  (let ((delete-active-region nil))
    (backward-delete-char-untabify +1)))
binding this function to a key will produce this backspace effect, but calling backward-delete-char-untabify with a key or M-x will not make the eldoc go away. As if the function must be called backward-delete-char-untabify or eldoc disappears. Useing call-interactively also doesnt make a difference or funcall.
#2018-05-1016:19theeternalpulseCan someone do me a favor and try to package-install spinner if they don't already have it?#2018-05-1017:55hlolli@theeternalpulse https://melpa.org/#/?q=spinner ?#2018-05-1017:57theeternalpulseYeah, It's odd, I can definitely install it from some locations, but not on my home laptop computer#2018-05-1017:57hlolliah it's here on elpa https://elpa.gnu.org/packages/spinner.html didn't know that something could be on elpa but not melpa.#2018-05-1017:57theeternalpulsemainly through cider, it fails with a signature check#2018-05-1018:13theeternalpulseI'll try switching to stable instead of https://melpa.org, seemed to fix a different cider installation problem on another laptop#2018-05-1019:41hlolliwhat was the mode again that give you suggestions about available major mode for a given file when you don't have any major mode spcified. Say like .cmake and then emacs would say: hay would you like this mode x for cmake?#2018-05-1021:40bozhidarPrelude does something like this, not sure if there’s a mode/package for this.#2018-05-1021:41bozhidarI planned to extract this from Prelude but I never got to doing so.#2018-05-1114:54andrea.crottianyone else having issues with tables generated by org-mode recently?#2018-05-1114:55andrea.crottithere was a bug https://emacs.stackexchange.com/questions/37828/org-mode-doesnt-align-column-bars-properly but I am on 9.1.13 now#2018-05-1114:56andrea.crottithe tables generated when running a org-babel command are still messed up though#2018-05-1121:28theeternalpulseI've noticed, at least in spacemacs, if you focus out of the mini-buffer and somehow end up in another buffer but the mini-buffer is still present, it seems to mess with some of the bindings, mainly with evil#2018-05-1121:28theeternalpulsedoes the mini-buffer steal key focus when it's open despite what buffer you're in?#2018-05-1121:28theeternalpulseit still allows typing into the buffer but some keys do weird things, like delete multiple lines, or do some random pasting
#2018-05-1208:20kommen@theeternalpulse we have noticed that too, I wanted to file a bug report it, but haven’t come around yet#2018-05-1311:31hlolliIs there any built-in emacs frunction to get the boundries of a whole s-expression the cursor is in. Trying to trace down the keybinding "<C-M x>" in cider and emacs-mode, can't seem to find which function is responsible for selecting the sexp for evaluation.#2018-05-1311:38hlolliright in front of my eyes
(save-excursion
  (end-of-defun)
  (beginning-of-defun)
  (setq beg (point))
  (setq form (read (current-buffer)))
  (setq end (point)))
beg and end mark the boundries.
#2018-05-1319:07bozhidarThere are no built-in functions. You can take a look at cider-sexp-at-point and cider-last-sexp.#2018-05-1319:07bozhidarThose should eventually end up in clojure-mode, but as it stands - they live only in CIDER>#2018-05-1321:37vemvHi there! CIDER q. I'd like to (prn *e) whenever I hit an error in the repl. I am aware that cider-show-error-buffer exists, but for now I have it set to nil (it still can be handy to visit *cider-error* which fortunately is always created. But I don't like popups) How can one establish such behavior? This was my attempt, did nothing: (Thread/setDefaultUncaughtExceptionHandler (reify Thread$UncaughtExceptionHandler (uncaughtException [_ thread e] (prn e))))#2018-05-1417:23vemv^ Achieved it with: (advice-add 'cider-new-error-buffer :after (lambda (&rest _) (cider-interactive-eval "(prn *e)")))#2018-05-1417:28vemvFunnily, this printed *e is clickable, i.e. I can click a line and I'll jump to it. Awesome I don't get the same behavior when evaluating *e manually#2018-05-1421:25bozhidarHmm, can’t imagine how this is happening. File a ticket, so we’d look into this. Likely some extra processing happens with interactive eval.#2018-05-1421:43vemvthe issue being that entering *e into the repl isn't clickable right?#2018-05-1421:28blanceis there anything in emacs that can do arity check for clojure code? i heard cursive can do it, but couldn't find anything for emacs:disappointed:#2018-05-1421:32tanzoniteblack@blance https://github.com/jonase/eastwood eastwood can do this, which you can set up with https://github.com/clojure-emacs/squiggly-clojure#2018-05-1421:33tanzoniteblackI've had...hit or miss luck with eastwood / squiggly-clojure though, as a warning#2018-05-1421:33tanzoniteblackmight work for you depending on your project#2018-05-1421:36blanceThanks! eastwood looks like very powerful. i'll give it a try to see if it can work nicely with emacs#2018-05-1507:35bozhidarImplementing something like an arity check with CIDER shouldn’t be complex as well, as the information about the supported arities is already present from eldoc.#2018-05-1517:20ghadiHi y'all, I'm dumb at emacs. How do I control indentation when I hit return after an s/fdef ?#2018-05-1517:24dpsuttoncheck the indentation stuff from clojure-mode https://github.com/clojure-emacs/clojure-mode#indentation-of-macro-forms#2018-05-1517:27dpsutton@ghadi what are you trying to do? hitting newline will run some formatting on your last line so if you're trying to prevent that there are other ways#2018-05-1517:32ghadiI am trying to provide my team with common config snippets for Emacs and Vim#2018-05-1517:33theeternalpulseI've started to use evil-cleverparens#2018-05-1517:33dpsuttonok then i would check out the link to clojure-mode above#2018-05-1517:34ghadithanks!#2018-05-1517:41mpenetBinding RET to newline-and-indent is also a good idea imo#2018-05-1517:42mpenetMaybe cider does that out of the box, not sure#2018-05-1517:41theeternalpulseI have a question, I'm not sure if this is related to the layer I'm using or emacs in general, but I have a react layer, and I notice when I make some changes to the file markup in certain places it unhighlights and throws off tabbing until I manually load the layer again#2018-05-1518:45agthere's #spacemacs channel, probably better to ask Spacemacs related questions there#2018-05-1518:49agI don't use React layer but if can guess it's probably emmet trying to reindent things. This is what it says in the readme > By default, inserted markup will be indented with indent-region, according to the buffer's mode. To disable this, do:
(add-hook 'emmet-mode-hook (lambda () (setq emmet-indent-after-insert nil)))
#2018-05-1517:43dpsuttoni think the newline function does this be default: >
If `electric-indent-mode' is enabled, this indents the final new line
that it adds, and reindents the preceding line.  To just insert
a newline, use \\[electric-indent-just-newline].
#2018-05-1517:44dpsutton(combined with electric-indent-mode#2018-05-1608:34solfThere's a (I think built-in) function in emacs for having two windows side by side show a single buffer with synchronized scroll, effectively making as if the screen was double the height#2018-05-1608:34solfBut I can't remember the name of the feature, and can't find the right keywords to google it, anyone knows what I'm talking about?#2018-05-1609:31bozhidarIt was follow-mode or something like this.#2018-05-2110:15solfThat's it! Thanks#2018-05-1609:32bozhidarhttps://www.youtube.com/watch?v=OPFvM63CTTM#2018-05-1615:24richiardiandreaOh that's cool#2018-05-1622:07piotr-yuxuanGood evening here! I’d like to get some help with org-mode, do you know where I could ask for? I’ve put as much as possible in this gist: https://gist.github.com/piotr-yuxuan/6ea1ba250c6e8ecf68b10cf1bf8fd80a#2018-05-1702:26ag@piotr2b Thank you for taking time to explain your problem. It seems you simply haven't set org-agenda-files variable.#2018-05-1709:09piotr-yuxuan@ag Thanks a lot! Indeed I missed it. You saved me from wasting my time and further frustration, thanks again! 🙂 I’m wondering whether this could be added somewhere in org doc to save future people like me ^^#2018-05-1716:03agyou're welcome. I'm sure that thing is in the docs#2018-05-1716:12agbe aware it's not the best to set that var pointing to directory with all your org files. Org is so awesome - once you start using it you won't even notice how much stuff you accumulate in those. And org-agenda will try to open all org files. Probably the best is to point it to a file with a list of org-files#2018-05-1719:45dabrazheHi. I'm setting up emacs with boot. The Boot guide fails at In Emacs do M-x customize-variable cider-boot-parameters and set it to cider repl -s wait. Repl does not start either: The lein executable (specified by ‘cider-lein-command’) isn’t on your exec-path#2018-05-1721:21agit looks like Emacs can't find boot executable. Emacs in OSX works kinda funky. You should use exec-path-from-shell. If you're using Spacemacs simply add osx layer#2018-05-1719:46dabrazheany ideas ?#2018-05-1719:51cmack1. On macOS? 2. Does lein work when you try from the terminal?#2018-05-1719:53dabrazhehi @cmack 1 yes, on mac os 2 no, i am not using lein at all on my system, only boot with Atom integration#2018-05-1720:01cmack@dennisa hmm. so you customize the variable and then how did you get the lein error?#2018-05-1720:03cmackalso, does M-x cider-jack-in work?#2018-05-1720:19dabrazhe@cmack I cannot customise it actually, it cannot find it: [No match]#2018-05-1720:20cmackthat’s probably because cider isn’t fully loaded… are you able to run M-x cider-jack-in?#2018-05-1720:40caiois there a way to enable project-only filter by default for stacktrace buffer in cider?#2018-05-1721:18dpsuttonp. that should be "sticky" i thought#2018-05-1721:20dpsuttonit is not. i'm looking#2018-05-1721:21dpsuttoncider-stacktrace-default-filters i think is what you want#2018-05-1721:22dpsuttoni think its (setq cider-stacktrace-default-filters '(project))#2018-05-1805:06bozhidar@dennisa Which folder do you start CIDER in? You say you’re working with Boot, but you’ve posted an error for lein not being present.#2018-05-1808:31dabrazhe@cmack cider-jack-in fails with error above, about the lein not found. @bozhidar it runs on the folder with build.boot . It appears that Boot is not configured at all in emacs...#2018-05-1810:41troglotitHey! How to set clojure-mode variable once? I’m appending item to list, so I don’t want to append on every hook#2018-05-1810:52bozhidar> @cmack cider-jack-in fails with error above, about the lein not found. @bozhidar it runs on the folder with build.boot . It appears that Boot is not configured at all in emacs...#2018-05-1810:53bozhidarThere’s nothing to configure really - CIDER detects the project type and runs the appropriate command to start an nREPL server. If multiple project files are detected you should get asked about the project type to use. That’s why I’m really puzzled by your problem.#2018-05-1810:54bozhidarYou can see the troubleshooting section of the manual and debug cider-jack-in. Then you’ll easily see what goes wrong with the project type detection.#2018-05-1810:54bozhidar> Hey! How to set clojure-mode variable once? I’m appending item to list, so I don’t want to append on every hook#2018-05-1810:54bozhidar@troglotit Can you give us an idea about what you’re trying to do?#2018-05-1810:55troglotitsomething like this (add-to-list 'clojure-align-binding-forms "r/with-let") but only once and when variable is ready#2018-05-1813:13dabrazhe@bozhidar Perhaps I need to specify the project i'm working in somehow? Or designate it to open the right build.boot? In Atom I have to open the project folder and repls starts using build.boot. How will emacs know about any build tool when I work on the .clj file deep in the scr hierarchy?#2018-05-1814:09bozhidar> How will emacs know about any build tool when I work on the .clj file deep in the scr hierarchy?#2018-05-1814:09bozhidarIt will find the project root automatically by going up the directory tree from the file you’ve opened.#2018-05-1814:09bozhidar@troglotit You’re looking for eval-after-load.#2018-05-1814:12troglotitshould I use it like (eval-after-load "clojure" my-fun)?#2018-05-1814:24bozhidarhttps://github.com/bbatsov/prelude/blob/master/modules/prelude-clojure.el#L38#2018-05-1819:59caio@dpsutton it doesn't work with project 😕 apparently the active filters are different and don't work in the default-filters var#2018-05-1820:00caiofrom the docs: Error buffer stacktraces may be filtered by default. Valid filter types include java, clj, repl, tooling, and dup. Setting this to nil will show all stacktrace frames.#2018-05-1820:00caiohttps://cider.readthedocs.io/en/latest/navigating_stacktraces/#2018-05-1820:02caioanother doubt I have for a while now and never figured out how to fix it: how do I make cider understand reader macros from libraries? it's a pain every time I want to format an edn buffer that has a reader macro we use here#2018-05-1820:02dpsuttonThat documentation is probably out of date. But project is different because it's a "positive" filter#2018-05-1820:02caioyep. I tried doing what you said before and it didn't work. it's the same as nil#2018-05-1820:04caioI know I can probably add a hook to the stacktrace-mode and call the same fn that p does, but I was looking for a cleaner alternative 😞#2018-05-1820:20dpsuttonIf you file an issue I can work on it. Might be tricky to work out an intuitive interaction#2018-05-1821:00caiodone: https://github.com/cider/cider/issues/4#2018-05-1821:00caiowow, wtf. I opened on a random repo#2018-05-1821:00caiohahahaha#2018-05-1821:02caionow on the right repo: https://github.com/clojure-emacs/cider/issues/2294#2018-05-1906:24vemvis there a command for "pulling" a sexpr from the next line, bringing it to the current line, without changing any nesting?#2018-05-1906:24vemvbefore:#2018-05-1906:24vemv
(defn home-page
  [request]
#2018-05-1906:25vemvafter:#2018-05-1906:25vemv(defn home-page [request]#2018-05-1906:25vemv...guess it can be implemented easily, just wondering if there's a readily available function#2018-05-1906:54munen@vemv Not exactly what you're asking, but I'm using it for your use-case: If you use evil, then you can pull any line (not just sexps) from the line below with a J.#2018-05-1906:57vemvyeah not quite, but good to know! :thumbsup:#2018-05-1907:00soulflyer@vemv I use live-delete-whitespace-except-one which comes from emacs-live#2018-05-1907:01vemvthanks, will be taking a look!#2018-05-1907:04soulflyer
(defun live-delete-whitespace-except-one ()
  (interactive)
  (just-one-space -1))
#2018-05-1907:05soulflyerjust-one-space is part of standard emacs I think, so should be easy to implement#2018-05-1907:05vemvTried out, fantastic! 🍻#2018-05-1915:00richiardiandreaUse this too ;)#2018-05-2122:13piotr-yuxuangreat!#2018-05-1913:40bozhidar@vemv I used crux-top-join-line (https://github.com/bbatsov/crux)#2018-05-2012:06nielsWhat are your favorite emacs themes for working in direct sunlight? Looking for something to fix glare#2018-05-2210:40joelkuiperbeen using https://github.com/11111000000/tao-theme-emacs (yang) for that, but Leuven is also nice#2018-05-2014:55hlolliwhen my colleauges come to look on my screen I put on the built in whiteboard#2018-05-2015:55munenI usually work with wombat, but on a beamer or when working in sunlight, I switch to solarized-light.#2018-05-2101:48theeternalpulseI'm using magit and started doing another project based off a starter kit repo, and now I want to migrate that to another repo altogether. Is there an easy command to spawn off another folder structure pointing to another repo easily with magit?#2018-05-2110:34munen@theeternalpulse You mean changing the remote? Sure! https://magit.vc/manual/magit/Remotes.html#2018-05-2110:37theeternalpulseI guess that's the most straightforward way.#2018-05-2203:05stardivinerI have some tips for Org-mode ob-clojure generate plot in relative path (because Clojure is based on JVM which can't change working directory) Here is my post https://stardiviner.github.io/Blog/Clojure%20Plotting%20to%20Org%20inline%20image%20in%20ob-clojure.html If someone has better tips, welcome communicate with me, leave comments or on Slack here. Thanks.#2018-05-2204:44soulflyerI'm getting a 404 from that link#2018-05-2205:37stardivinerSorry, I found the URL is full of %20 space. I changed my URL setting to use dash "-" Here is my new link. https://stardiviner.github.io/Blog/Clojure-Plotting-to-Org-inline-image-in-ob-clojure.html#2018-05-2205:39stardiviner@U0E3H1J5Q ^^^#2018-05-2210:05piotr-yuxuannice!#2018-05-2210:21MarisDoes clj-refactor work with cider 0.17.0 ? Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor#2018-05-2210:34bozhidar@maris.orbidans Only the master of clj-refactor/refactor-nrepl works with 0.17+#2018-05-2210:34Marisok, I see#2018-05-2301:53theeternalpulseI want to try my hand at developing my own package, is there a good way to isolate my development of the package from emacs, so they don't spill into my current emacs session?#2018-05-2302:46dpsuttonyou could run it with just -Q or you could use your own init just for it using https://github.com/plexus/chemacs#2018-05-2302:52theeternalpulsehmm, well I want my original config I just want it so whatever i eval in a buffer can only be called within that buffer.#2018-05-2302:57theeternalpulsei guess something like a sandbox mode for a file.#2018-05-2303:03dpsuttonThat sounds like a separate process then. Emacs lacks namespaces much less sand boxes#2018-05-2303:06theeternalpulseI figured, a new instance should be fine#2018-05-2608:37vemvAnyone has an opposite command for cider-find-var? Or generic jump functionality#2018-05-2608:37vemvI would call it unjump#2018-05-2608:38vemvBasically: imagine you cider-find-var N times in a row, jumping from location to location / from file to file#2018-05-2608:38vemvwhich is typical when diving into an unknown codebase#2018-05-2608:39vemvNow I want to do the opposite, go in the reverse directions location- and file-wise, one by one#2018-05-2608:40vemv-- (if not I'll develop/post my solution here)#2018-05-2611:45munen@vemv Wouldn't that be the standard binding M-,?#2018-05-2613:39vemvYes, that one is (xref-pop-marker-stack), just checked it out. Works perfectly, thanks!#2018-05-2806:42munenYou're welcome!#2018-05-2611:45munenM-. usually jumps to a definition in Emacs, M-, goes through the stack and jumps back.#2018-05-2612:01kommen@vemv if you happen to use evil-mode, I think you’re looking for evil-jump-backward#2018-05-2815:35bozhidarEmacs 26.1 was just released https://www.gnu.org/software/emacs/news/NEWS.26.1 !!! emacs partywombat party-corgi#2018-05-2823:29Carlos RojasGreat! Are you already gonna start using it for daily work?#2018-05-2815:43vemv> Emacs can now be run as a GUI application from the command line on macOS. Interesting! I can do that right now of course (`open path/to/Emacs.app`) but iirc there was some drawback... Like properly receiving arguments > ns-transparent-titlebar maybe the sole reason why I was using railwaycat/homebrew-emacsmacport, gotta try it out#2018-05-2820:08theeternalpulsehow do I create a hook for copying/killing/items added to the kill ring. I don't see hooks for functions like "kill-region"#2018-05-2820:09theeternalpulseI'm looking into advice (defadvice/add-function) but haven't had luck getting it working, complains the kill-region function is void#2018-05-2821:35mitchelkuijpersI'm doing some elisp I am trying to use the built in url lib but it's pretty bad to use. It just locks up my emacs. Any suggestions which is a good http library for emacs?#2018-05-2909:58andnilshttps://github.com/tkf/emacs-request#2018-05-2910:58mitchelkuijpersThank you will try this one out#2018-05-3010:57nhawhat is the setting to configure the amount of spaces used when indenting? (I saw https://github.com/clojure-emacs/clojure-mode#indentation-options - using (setq clojure-indent-style ':align-arguments)). Right now it indents like that for me:
(a
  (b))
I would like to get one space:
(a
 (b))
#2018-05-3011:54troglotitHey! How to execute :g/my-string/d for whole project in spacemacs? Solved it using \n find and replace#2018-05-3017:01jeff.terrellBTW, there's a #spacemacs channel too.#2018-05-3012:11bozhidar@nha Currently that’s not configurable. At least I don’t remember it being configurable.#2018-05-3016:58nhaok np. I must have something setup differently than my cowerkers#2018-05-3016:59nha(I am the only one using spacemacs though)#2018-05-3018:26theeternalpulseIs there a way to get autocomplete (inline possibly) for the evil-ex minibuffer?#2018-05-3022:27j0ni@nha I think you want :always-align rather than :align-arguments#2018-05-3022:28j0nithat's the default style for all lisps in emacs I think, which all other editors/IDEs don't do - I think think that's why the :align-arguments alternative was introduced#2018-05-3102:12bozhidarHmm, I think I finally remembering. 😄 Originally we had some setting to indent everything the same way, and I guess we renamed this at some point.#2018-05-3102:14bozhidar
`:always-align' - Follow the same rules as `lisp-mode'.  All
    args are vertically aligned with the first arg in case (A),
    and vertically aligned with the function name in case (B).
    For instance:
        (reduce merge
                some-coll)
        (reduce
         merge
         some-coll)

    `:always-indent' - All args are indented like a macro body.
        (reduce merge
          some-coll)
        (reduce
          merge
          some-coll)

    `:align-arguments' - Case (A) is indented like `lisp', and
    case (B) is indented like a macro body.
        (reduce merge
                some-coll)
        (reduce
          merge
          some-coll)"
#2018-05-3102:14bozhidarI now remember discussing this with @malabarba and our slight oversight of using keywords instead of symbols for the config values.#2018-05-3102:15bozhidarThe original config value was clojure-defun-style-default-indent - it made clojure-mode indent everything like defuns (`:always-ident`).#2018-05-3113:04j0niI seem to recall this kicking off the "debate" 😛 https://github.com/clojure-emacs/clojure-mode/issues/235#2018-05-3113:30eggsyntaxUnrelated: for quite a while, I've ben using @timothypratley’s method ( https://timothypratley.blogspot.com/2014/08/clojure-friendly-word-definitions-in.html ) for having emacs treat hyphenated words as single words (for purposes of eg forward-word). At some point in the past year, that stopped working reliably for me -- typically navigation by word will treat the first hyphen in a word as equivalent to a space, and the rest as part of the word. Has anyone else run across this issue? If so, have you been able to figure it out? I've made a number of attempts to track it down, so far without any success. describe-syntax does show hyphen as a word char, as it should.#2018-05-3113:33jeff.terrellWeird. I haven't tried that method and haven't seen any behavior that sounds similar. I have been using SPC t c to toggle camel case motion quite a bit, though, and it's pretty convenient for camel cased names. (I've been doing Javascript instead of Clojure lately. 😱)#2018-05-3113:34eggsyntaxI'm sorry 😉#2018-05-3113:36eggsyntaxAside from the fact that it isn't working for me at the moment, it's a really nice improvement to have emacs treat hyphenated words as a single word; I recommend it. Note that if you decide to try it, you actually want to apply it to clojure-mode-syntax-table as described in the 1st comment on that blog post.#2018-05-3113:48jeff.terrellWhen I'm doing clojure, I sometimes like the separate-words functionality. I can still jump over the whole word with e.g. W and B (i.e. whitespace-delimited word motions). I guess * could be an argument for considering the whole thing as a single word, but IIRC clojure-mode was smart enough to deal with * with whole-word semantics even if w and b used separate-word semantics.#2018-05-3113:49eggsyntaxYeah, I keep a couple of other bindings for navigation by subwords, but I like the default to be treating "words" by Clojure's standards.#2018-05-3113:51jeff.terrell(I just realized this was #emacs not #spacemacs. My comments assumed spacemacs, for anybody who might have been confused. simple_smile)#2018-05-3113:53eggsyntaxI could always rebind w to forward-WORD (ie W), but then that behaves incorrectly (relative to my preferences) with something like foo-bar]) baz#2018-05-3115:56borkdudeIs it possible to go back to your previous window layout, once you do C-x 1?#2018-05-3115:57borkdudefound it: https://emacs.stackexchange.com/questions/2710/switching-between-window-layouts#2018-05-3115:58richiardiandrea@borkdude I use winner-undo for that exact purpose#2018-05-3115:58richiardiandreaYou can do-undo window layouts#2018-05-3116:00eggsyntax@borkdude also you can just do toggle-maximize-buffer (at least in spacemacs), & then doing it again flips you back to the layout you had before.#2018-05-3116:11borkdudecool, I use Prelude so winner was already installed#2018-05-3116:12dpsuttonI wrote a window manager that allows you to push and pop onto a stack of window configurations. Called resize-window#2018-05-3116:13dpsuttonhttps://github.com/dpsutton/resize-window#2018-05-3118:17munen@borkdude Winner actually is bundled in Emacs, already^^#2018-05-3118:22borkdudecool#2018-05-3118:24borkdudedo you use “C-x 5 o” a lot? I use Cmd-` to switch windows in a lot of apps, maybe I should configure emacs like that#2018-05-3118:35borkdudeI think this should work:
(define-key global-map (kbd “s-`“) ’other-frame)
#2018-05-3118:35borkdudebut it doesn't#2018-05-3119:20munenPersonally, I never use C-x 5 o, because I run a tiling window manager, so jumping between frames it not something that I do within Emacs. I do use multiple open buffers within one frame a lot, though. And winner-mode within that. Btw, there's a shortcut for winner-undo. Here's my config for it: https://github.com/munen/emacs.d/#winner-mode#2018-05-3119:21munenRegarding your shortcut: I'm not aware that just a character as a prefix is a viable shortcut.#2018-06-0113:53kliphI think that's the <Super> key: https://www.gnu.org/software/emacs/manual/html_node/emacs/Modifier-Keys.html#2018-06-0115:51munenThat sounds about right. I was wrong about my assumption, then. Thanks for that info, @U0BANPG68!#2018-06-0115:51munenIt's an oversight on my part since I only have keybindings on Alt and Ctrl for Emacs. Super is for the WM. But it makes sense to have it available for Emacs combos, of course!#2018-06-0115:51munenThanks for clarifying^^#2018-06-0115:58kliphNo problem, happy to clear that up for you 😄#2018-05-3119:22munenHere are the keybinding conventions for Emacs: https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html#2018-05-3119:22munen"Sequences consisting of C-c and a letter (either upper or lower case) are reserved for users"#2018-06-0205:14theeternalpulseWith strictparens how do I keep it from preventing me from entering and deleting pairs found in strings. I try to insert one paren in a string and it auto-closes like outside of a string, and deleting it deletes the matching one, I can't easily edit text fields that have paren, I always have to turn off the mode and retype before turning the mode back on#2018-06-0417:57agI believe you can type C-v and whatever char/keybinding used next would be inserted "literally" with ignorance of whatever modes are there#2018-06-0417:59agI'm using Spacemacs it's what it's bound to. on your system in may be bound to some other key. Check describe-function for quoted-insert#2018-06-0512:40Bravihi everyone. there’s a strange bug happening in spacemacs and I was wondering if it’s happening in emacs as well. unfortunately I am a vim user and I’ve never used emacs and if someone could try and see if O <F3> fo <F4> <F4> yields fofoo, that’d be very helpful please#2018-06-0512:40Bravioh @jeff.terrell u’re here as well#2018-06-0512:40Bravi😄#2018-06-0512:41jeff.terrellYep! I've confirmed this behavior in Spacemacs and I'm also curious if this is reproducible on vanilla Emacs.#2018-06-0512:42jeff.terrellNote that O above is how to insert a blank line above the cursor in evil-mode, so some translation may be necessary if you're not an evil user. I'm not sure how necessary that piece really is; perhaps a simple <F3> fo <F4> <F4> would exhibit the problem as well.#2018-06-0512:42jeff.terrell(And to be clear, the problem is that the macro playback has an extra o in it.)#2018-06-0512:45p4v4nNo extra 'o' for me in vanilla emacs. Working as expected.#2018-06-0512:45jeff.terrellInteresting. Thanks for checking. /cc @U7ESY38HJ#2018-06-0512:46Bravinow I’m wondering perhaps it’s some sort of mode that’s affecting this#2018-06-0512:46jeff.terrellI did it in org-mode, FWIW.#2018-06-0512:47jeff.terrellI can reproduce in text-mode in a scratch buffer but I can't reproduce if I do M-x fundamental-mode first.#2018-06-0512:43BraviI definitely remember there was a different combo as well, I’ll try to find it now. I know exactly what I was trying to refactor and I’ll follow the steps 😄#2018-06-0512:43Bravibut I’m guessing whatever is causing that one, is the same for others too#2018-06-0514:53theeternalpulseIs there a hook for yanking/killing#2018-06-0515:52theeternalpulseclosest I've found is doing add-advice but that is not buffer local, and don't want it to spill into other modes than my own.#2018-06-0517:18tanzoniteblackI don't believe there's a hook, but you could probably use defadvice ( https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html ) to accomplish something, depending on what you're trying to do#2018-06-0517:18tanzoniteblackI rarely ever try to advise functions, so can't be too much help#2018-06-0517:51theeternalpulseI did the add-advice but it doesn't seem to be local to the buffer that I call it in, so it would bleed into other buffers#2018-06-0517:51theeternalpulsealso add-advice didnt' forward the arguments#2018-06-0613:33theeternalpulseIs there a pretty navigable emacs lisp reference out there, the official one is just so unsearchable outside of using a search engine. I'm looking for something on the level of clojuredocs/conj.io#2018-06-0613:37minimalThis guide is pretty good and has a bunch of reference links at the bottom https://github.com/chrisdone/elisp-guide#2018-06-0614:02theeternalpulsethanks#2018-06-0615:12soulflyerJust noticed that something is kindly filling in missing :require entries for me in my clojurescript project. Not sure if its one's I have already specified in other files or maybe some standard :as abbreviations. I typed rf/<something> and [re-frame.core :as rf] magically appeared in my ns. I'm not complaining, just curious what does this....#2018-06-0615:27theeternalpulsehttps://github.com/clojure-emacs/refactor-nrepl ?#2018-06-0615:28theeternalpulseI never used it and it doesn't do anyhing without me manually hitting commands, so I'm not sure if maybe some hooks are set up in your config (if it is a custom emacs distro that is)#2018-06-0615:43soulflyercould be. My setup is based on emacs-live which came with quite an extensive clojure setup...#2018-06-0615:45eggsyntaxThat's from clj-refactor, I believe. https://github.com/clojure-emacs/clj-refactor.el#2018-06-0615:46eggsyntaxOh, right, and refactor-nrepl is just a layer over clj-refactor I guess.#2018-06-0616:02soulflyerah-ha, yes. cljr-magic-requires, part of clj-refactor. Looks like that is what is creating the namespace in the first place as well.#2018-06-0701:44bozhidar@eggsyntax Yep. clj-refactor.el is the Emacs side of the package, refactor-nrepl are the nREPL middlewares it uses for the heavy lifting.#2018-06-0701:44bozhidarSame relationship as between CIDER and cider-nrepl.#2018-06-0707:59benedekmagic requires mostly working by looking at aliases used in other namespaces but you can also configure a list predefined alias names with this var: cljr-magic-require-names#2018-06-0708:00benedekyou can switch off the feature by setting cljr-magic-requires to nil. if you set the same to :prompt it will ask you for confirmation before inserting#2018-06-0710:49valtteriWhat is the function I should lookup if I wanted to shift positions of elements in collection? Example: (point is at | ) [|1 2 3] and I want to ‘push’ 1 one position forward [2 1 3]. I’m using Prelude.#2018-06-0710:55valtteriI’m pretty sure there’s something builtin or in one of the packages that comes with Prelude but my google-fu is failing me. 🙂#2018-06-0712:48benedekYou could put the cursor between 1 and 2 and C-M t#2018-06-0712:49benedekThis is just swapping words#2018-06-0712:49benedekNot sure that is really what you want#2018-06-0716:50valtteriThis works for me, thanks a lot!#2018-06-0721:04benedekNw#2018-06-0721:05benedekThis works with sexps too. So you can swap two on the same level. Maybe handy#2018-06-0816:17theeternalpulseIs there something like purpose only more configurable on the fly. Let's say I have a have the repl in one window and I want to say, "only this specific buffer shall occupy this window" without defining a window name and type. Right now it dedicates it but under whatever purpose has deemed that buffer to be, which means other ones that are similar can also occupy that window.#2018-06-0816:44jfntn@theeternalpulse that’s what the built-in set-window-dedicated-p does#2018-06-0817:37theeternalpulseah, I now see there's a spacemacs function that uses that behind the covers, it's not interactive so I found the one spacemacs uses instead. thanks for pointing me in the direction
;; from 
(defun spacemacs/toggle-current-window-dedication ()
  "Toggle dedication state of a window."
 (interactive)
 (let* ((window    (selected-window))
        (dedicated (window-dedicated-p window)))
   (set-window-dedicated-p window (not dedicated))
   (message "Window %sdedicated to %s"
            (if dedicated "no longer " "")
            (buffer-name))))
#2018-06-1119:08borkdudeMy Emacs.app (MacOS) keeps crashing after I open a XSLT file. Where can I see a logfile of what happened?#2018-06-1119:11dpsuttonm-x report-emacs-bug#2018-06-1119:11dpsuttonoh nevermind. i read see as send#2018-06-1119:12borkdudeit’s not with every xslt, just a specific one :-s#2018-06-1119:14dpsuttonthat sounds annoying. i've never had to debug the c code. i remember seeing eli explain how to attach gdb to a crash report but i can't find it on the mailing list right now#2018-06-1119:15borkdudeScrew it, I’m just going to use a different editor for this one file 😛#2018-06-1119:18dpsuttonyeah. i've had to use other stuff for large xml and other files. sublime and vim can just effortlessly handle a few large files that emacs really hates. god help you if there are no line breaks#2018-06-1122:41cmack@borkdude You could probably try setting the debug-on-error to t to see if that helps https://www.gnu.org/software/emacs/manual/html_node/elisp/Error-Debugging.html#2018-06-1122:43cmackAccording to https://www.gnu.org/software/emacs/manual/html_node/emacs/Crashing.html a crash log is created on Linux or Windows… I don’t know what the equivalent of .xsession-errors on Mac would be, if that’s the OS you’re on#2018-06-1207:22borkdudeAfter having edited the xslt file I can now open it again with emacs#2018-06-1219:27jfntnhttps://github.com/agzam/mw-thesaurus.el this is so useful, thanks @ag!#2018-06-1219:35agoh I thought it's kinda lame. You're welcome#2018-06-1219:40dpsuttoncrazy you put your api key in it#2018-06-1219:41dpsuttonalthough i guess if people abuse it you shut it down and get another one and don't share?#2018-06-1219:48jfntnI’ve been trying to get an offline thesaurus setup in emacs forever but kinda gave up, this is really useful and the org-mode buffer is a good idea for that kind of content#2018-06-1219:50agjfntn... I have a recommendation for offline thesaurus. let me get back to my laptop, I'll share some thoughts#2018-06-1220:14ag@U0CJ8PTE1 for offline you can use sdcv. It's a command line tool, there's also emacs package called sdcv-mode. - first install sdcv (cmd tool) - then download dictionaries: you can use this simple bash script to install basic 3 that I use, explore the link in that script if you need more dicts:
DICTS="
            
            "

     mkdir -p ~/Downloads/dictionary/extracted
     cd ~/Downloads/dictionary

     for dic in $DICTS; do
         curl -o ~/Downloads/dictionary/dict.tar.bz2 $dic
         tar -xvf ./dict.tar.bz2 -C ./extracted --strip-components=1
         cp ~/Downloads/dictionary/extracted/* ~/.stardict/dic/
         rm -rf ./extracted
     done

     rm -rf ~/Donwloads/dictionary
 
- after making sure that sdcv works fine in command line, you can set up Emacs package. Here's an example how I use it in my custom Spacemacs layer. https://github.com/agzam/dot-spacemacs/blob/master/layers/ag-lang-tools/packages.el#L30
#2018-06-1220:16agHope this helps.#2018-06-1220:18jfntnI’ll check it out, thanks!#2018-06-1220:29ag> crazy you put your api key in it @U11BV7MTK yah probably at some point it will reach the limit of requests (I'm not sure if they have any) per api key.#2018-06-1221:20dpsuttonAnd I bet the demand for emacs thesaurus is self limiting as well :)#2018-06-1301:14vemvSay I (ido-read-directory-name ()), and am presented with a choice. How to open that choice directly, instead of having to press RET RET? (one RET for the choice, another for the .)#2018-06-1314:20solf@vemv C-j#2018-06-1314:24solfActually, pressing RET once does it for me#2018-06-1314:26vemvand how do you do it if the directory contains more directories? (genuinely curious - we might have different configurations)#2018-06-1314:27solfAh I see what you mean. Then C-j is probably what you're looking for#2018-06-1314:27solfLet's say you're in $HOME and want to go to $HOME/folderA, who itself has other directories#2018-06-1314:27solfYou open ido, then type folderA, then do C-j#2018-06-1314:28solfor you open ido, type 'fol', use TAB to autocomplete to 'folderA', then do C-j#2018-06-1314:29solfbasically RET or C-m tells ido to continue doing his autocomplete thingy (in this case showing you the subdirectories), C-j instead is a "use what I typed" command, you could type 'folderB' (which doesn't exist), do C-j and ido will use it anyway#2018-06-1314:31vemvThat's pretty close to what I'm seeking! But instead of TAB I'd rather take the first already-selected option i.e.: I want a new shortcut (like S-RET) to mean "with this half-typed input, choose the first option, and open it directly instead of showing me its subdirectoties"#2018-06-1314:50solfI'm not sure how to do it. I figured
(defun ido-complete-and-select-text ()
  (interactive)
  (ido-complete)
  (ido-select-text)
  )
was enough, since those are the commands called by TAB and C-j, but for some reason it doesn't work
#2018-06-1314:54vemvin any case TAB can sometimes ask you for a choice (`possible completions are: ...`), so it's not equivalent to picking the first displayed option#2018-06-1314:55vemvsometimes (call-interactively 'ido-complete) does the trick for when stuff doesn't work#2018-06-1314:25solfC-j is for another use-case, where you don't want to use ido autocomplete but just submit whatever you typed in the minibuffer#2018-06-1314:50andrea.crottihello fellow Emacsers, should I be able to do M-n/ M-p in Clojure when completing with company-mode?#2018-06-1314:51andrea.crottibecause I was never able to do but now a colleague mentioned she can do it in the REPL but not in the actual .clj buffer#2018-06-1315:01kliphHi @U0524T275 Try C-h k followed by M-n or M-p in each of those buffers to see which functions are run#2018-06-1315:02kliphYou may need to have the company-mode selection open to see which function is run in that particular state#2018-06-1315:03andrea.crottiyeah doesn't let me do that once I'm in company mode expansion time already#2018-06-1316:11mpenetIt can do it, but requires some elisp hackery I think#2018-06-1316:12mpenetI have those lines in my conf: https://github.com/mpenet/emax/blob/master/elisp/modes.el prolly cause of that#2018-06-1314:51andrea.crottiso I wonder if it should just work and I have something enabled that breaks it#2018-06-1405:56bozhidarI don’t quite understand the question.#2018-06-1500:01lilactownis there a way for me to hint to Clojure(Script)-mode (and pref also IntelliJ) the indentation of the body of a macro?#2018-06-1500:06agcheck documentation for put-clojure-indent#2018-06-1500:03lilactowne.g. I have a macro that takes in a defrecord-like body:
(defcomponent
  (constructor [this]
    this))
but right now it auto-indents it like a list:
(defcomponent
  (constructor [this]
               this))
#2018-06-1511:21joost-diepenmaatAssuming you’re using CIDER with clojure-mode, take a look at https://cider.readthedocs.io/en/latest/indent_spec/#2018-06-1720:00theeternalpulseIs there a package out there to see a map of the current clojure file, so it lists functions and defs to navigate to. Kind of like swoop or something but specifically focused on the top-level defs?#2018-06-1721:11bozhidar@theeternalpulse - imenu.#2018-06-1721:11bozhidarI use it all the time.#2018-06-1721:12theeternalpulseoh sweet#2018-06-1721:12theeternalpulsespacemacs even has some bindingsfor entire projects#2018-06-1806:21jumar@theeternalpulse you mean helm-imenu-in-all-buffers or sth. else? That one is quite useful but I'm not aware of anything that search in all project files (and not just open buffers)#2018-06-1914:26borkdudeInstalled FiraCode. Now when I visit a file from the recentf-dialog, my emacs is stuck 😉#2018-06-1914:28borkdudeor visiting any file for that matter#2018-06-1914:44borkdudeDoes anyone have this working on the newest Emacs.app for MacOS/OSX on MacOS High Sierra?#2018-06-2001:50angelixdYeah… I stopped using FiraCode because it locked up trying to render helm popups.#2018-06-2007:37hkjelsI use FiraCode on High Sierra.. Works well#2018-06-2007:37hkjelshaven’t done anything special to make it work#2018-06-2007:38hkjels(set-frame-font "Fira Code")#2018-06-2017:43richiardiandreaHas anyone seen something like this before:
- ...                                                            2952  57%
   Automatic GC                                                  2936  57%
 - popwin:display-buffer                                           16   0%
  + popwin:display-buffer-1                                        16   0%
- command-execute                                                2158  42%
 - call-interactively                                            2158  42%
  + funcall-interactively                                        1791  34%
  + byte-code                                                     367   7%
- timer-event-handler                                               8   0%
   apply                                                            8   0%
#2018-06-2017:43richiardiandreaI am trying to understand what is causing slowdown when I open a parenthesis in a cider CLJS REPL#2018-06-2020:14bozhidarSeems something is causing a lot of GC for you. Is popwin some extension? The name rings a bell, but I haven’t used this.#2018-06-2021:21richiardiandrea@bozhidar yep it is an extension for laying out popups#2018-06-2021:32richiardiandreadisabled popwin, same thing#2018-06-2021:34richiardiandreait seems to happen before popwin, I wonder if there is a hard core way to understand what is the first thing triggered#2018-06-2112:04jmayaalv@borkdude i have fira running in macos. this is what helped me: https://gist.github.com/jmayaalv/c3ddcbec479d492284b5e90bd24b8f7e#2018-06-2112:05borkdudethanks#2018-06-2112:14borkdude@jmayaalv didn’t work for me, still freezes my (GUI) Emacs#2018-06-2112:19borkdude@hkjels that works, but then it won’t show the ligatures
#2018-06-2112:20hkjelsAhh, OK.. Haven’t really paid attention to those#2018-06-2112:21hkjelsI use it mostly for prettify-symbol functionality#2018-06-2112:30jmayaalv😕#2018-06-2211:06michalhey guys. is there anyone using clj-refactor? it fails on cljr-add-project-dependency and doesn't even show a list of artifacts. instead, it receives an exception from underlaying refactor-nrepl:
cljr--get-error-value: Error in nrepl-refactor: java.util.concurrent.ExecutionException: refactornrepl240SNAPSHOT.com.fasterxml.jackson.core.JsonParseException: Unexpected character (’<’ (code 60)): expected a valid value (number, String, array, object, ’true’, ’false’ or ’null’)
 at [Source: (StringReader); line: 1, column: 2]
 at java.util.concurrent.FutureTask.report (FutureTask.java:122)
#2018-06-2211:42jumar@U0505TFA4 I'm getting the same error. It used to work not long time ago. I use spacemacs with cider:
20180531.823 (installed), 20180509.109 (installed), 20170722.2228 (installed).
#2018-06-2211:44michalthanks for info. I have already created a ticket and just trying to investigate what's going on inside. https://github.com/clojure-emacs/refactor-nrepl/issues/226#2018-06-2211:06michalI'm just curious if it's something on my side only#2018-06-2612:57manas_marthican someone please advise how to fix this#2018-06-2700:16bjaso I was trying to implement the complementary send-buffer, send-region, etc for emacs-lisp-mode using ielm, and I noticed I need to wrap the text in a (progn ...) form. Is there a better way to do this?
(with-current-buffer "*ielm*"
      (insert "(progn ")
      (insert text)
      (insert " )")
      (ielm-send-input))
#2018-06-2722:02blancehow should I use cider's run test with selector functionality? I've read it's doc at https://cider.readthedocs.io/en/latest/running_tests/, and it looks like C-c C-t C-s is the function I need, which ask me for selector to include and selector to exclude. But i'm not exactly sure what to put for those. Say I have a (deftest ^:integration ....) and my project.clj has
{:test-selectors {:default (complement :integration)
                   :integration :integration}}
I want to exclude test marked with ^:integration, so do I leave include prompt empty and put ^:integration in the exclude prompt? I tried that, and also :integration, and integration, non would exclude the tests for me 😞
#2018-06-2810:05jumar@U0AAZPCF8 I'm wondering if you actually found a bug in cider: It seems that the function should use "include" not "includes": * https://github.com/clojure-emacs/cider/blob/master/cider-test.el#L656 * https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/test.clj#L296 * https://github.com/clojure-emacs/orchard/blob/master/src/orchard/query.clj#L47#2018-06-2813:22bozhidar@blance If I recall correctly you were supposed to write integrations. @benedek and @dominicm should know better, as they worked on this.#2018-06-2813:23bozhidar@jumar is liked right that you found a bug, though.#2018-06-2813:24bozhidarYou should file this to the issue tracker and we’ll fix it soon.#2018-06-2813:24jumarI'll do that today#2018-06-2813:25bozhidarActually let me just commit a quick fix right away. The change is trivial anyways.#2018-06-2813:29bozhidarI’ve updated the code, you should just wait for the next MELPA build.#2018-06-2909:30jumar@bozhidar I've just tried the latest build and it's seriously broken 😮. I couldn't run any tests anymore. See https://github.com/clojure-emacs/cider/issues/2357 (the comment)#2018-06-2814:02benedekta @bozhidar :)#2018-06-2814:35bozhidarYou’re welcome!#2018-06-2816:37blanceThanks!#2018-06-2820:51fedregDoes anyone know of a good package (or have a function they can share) to find unused variables or imports in a namespace? My intellij using co-workers have this and I’m jealous. thx#2018-06-2820:58gfredericksthe ideal version of eastwood in my head does this I don't know if the real life version does#2018-06-2821:00cmackfor the imports, it looks like the clean namespace of clj-refactor would work… but I can’t confirm https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-clean-ns#2018-06-2821:02jakemcc@fedreg check out https://github.com/candid82/joker#2018-06-2821:02cmack… but maybe it goes a step too far by removing them#2018-06-2821:03dpsuttoni use emacs to file tickets for my cursive coworkers to refactor and remove imports, remove unused vars. it's worked quite well for me#2018-06-2821:03jakemccI believe that with flycheck will achieve what you want. I use it to find both of those things while editing files#2018-06-2821:04fedregI’ll give these a try. … Thanks all for the suggestions!#2018-06-2821:50agflycheck + joker is really sweet. Make sure glance through differences of joker and clojure. Makes you appreciate how much awesomeness Clojure actually have accumulated over the years#2018-06-2900:58agthis is happening right now btw: https://www.youtube.com/watch?v=H17PtDCxWmE#2018-06-2900:58agEmacs hangouts#2018-07-0200:57theeternalpulseIs there an evil adjust that works with clojure. I've tried remapping evil adadjust evaluation to the same stroke as cider evaluation and it tries to use emacs-lisp evaluation still#2018-07-0221:06tanzoniteblackanyone know how to get projectile to stop asking me to save unsaved buffers when running commands like projectile-test-project or projectile-grep. This gets really annoying with cider buffers (like cider pprint eval, or cider errors) which tend to be open and don't need saved#2018-07-0309:57bozhidar@tanzoniteblack That’s odd. It should not ask for buffers not backed by files.#2018-07-0309:57bozhidarI’ve never seen this happen. You can file a bug report.#2018-07-0411:46joelkuiperis there a way to stop cider from stealing focus from my repl when a stack trace pop ups?#2018-07-0411:46joelkuiperas in, eval, error, now my cursor is in the mini buffer with the stack trace. Which is usually not what I want (maybe I just made a typo that I can quickly correct)#2018-07-0412:11bozhidar@joelkuiper Yes, there’s a defcustom for this, but I don’t remember the name. I’ll look it up.#2018-07-0412:18bozhidarSee http://docs.cider.mx/en/latest/navigating_stacktraces/#2018-07-0412:19bozhidarGuess you need something like (setq cider-show-error-buffer 'except-in-repl) #2018-07-0412:19bozhidarNot exactly the thing you asked for, but good enough.#2018-07-0412:22joelkuiperThanks 👍#2018-07-0421:00urbanslugAnyone get this error when they run M-x inf-clojure-connect on spacemacs
comint-redirect-send-command-to-process: No prompt found or ‘comint-prompt-regexp’ not set properly
#2018-07-0421:00urbanslug?#2018-07-0421:03richiardiandreaI have never seen that#2018-07-0514:10bjaI never use inf-clojure with spacemacs, sorry#2018-07-0517:16richiardiandrea@urbanslug can you open an issue in inf-clojure specifying all your emacs conf versions#2018-07-0606:55urbanslugOK let me do that. spacemacs installs a lot of stuff and I installed inf-clojure on my own though#2018-07-0606:57urbanslugnot on my own but umm spacemacs has dotspacemacs-additional-packages#2018-07-0605:30callumJust tried to modify clojure-aligns to work with let-flow from manifold.deferred with
(add-to-list 'clojure-align-binding-forms "let-flow")
I was surprised to see that this will not work if I'm calling it with a namespace alias e.g. d/let-flow Does anyone know if this is the desired functionality?
#2018-07-0621:58bozhidar@callum I have to check the code. Maybe it’s an oversight of ours, as all the default forms are in the core namespace.#2018-07-0621:58bozhidarYou can file a ticket in clojure-mode, so we won’t forget to look into this.#2018-07-0810:00callumWill do @bozhidar#2018-07-1102:31akjetmaI’m having trouble getting cider to work with a project using deps.edn. This is the message i get:
Are you sure you want to run `cider-jack-in' without a Clojure project? (y or n)
. I have cider 0.17.0 installed, clojure cli tools installed via homebrew, and a project with a deps.edn file at the root. Anybody run into this before?
#2018-07-1102:34dpsuttoni'm not sure when deps support landed in cider. but it sounds like it was after 0.17#2018-07-1102:35dpsuttoni think there's a bug with 0.18 snapshot for cider-nrepl right now though so try upgrading tomorrow?#2018-07-1102:38akjetmaAh, okay, I’ll try that out tomorrow. do the cider docs get ahead of the stable release?#2018-07-1102:38dpsuttoncider docs track master which is 0.18-snapshot right now#2018-07-1102:39dpsuttonwhich is available on melpa#2018-07-1102:39akjetmaalright cool, thank you!#2018-07-1102:39dpsuttonno worries. drop by #cider tomorrow and check to see if that bug is resolved. it prevents startup at the moment unfortunately#2018-07-1102:39akjetmasounds good#2018-07-1103:53psdphi, trying to add a dependency using clj-refactor and got errors...#2018-07-1107:37zetafish@psdp https://github.com/clojure-emacs/refactor-nrepl/issues/226#2018-07-1107:40psdp@zetafish Cool, will keep an eye on it. Thanks!#2018-07-1113:27vemvThe following setup has worked for me for years:#2018-07-1113:27vemv
(setq mac-control-modifier 'super)
(setq mac-option-modifier 'meta)
(setq mac-command-modifier 'control)
#2018-07-1113:29vemvhowever it doesn't in my new mac. When I M-x describe-key and hit my keyboard's control + left combination, I expect describe-key to report <s-left>, but instead Emacs perceives nothing and keeps waiting for a key combination to describe#2018-07-1113:29vemvAnyone familiar with the issue?#2018-07-1113:31vemv(Can reproduce with different builds of Emacs 25. On the old machine always works; in the new one never)#2018-07-1113:44vemvFalse alarm, I just had to go through MacOS Keyboard Preferences -> Disable all the junk default shortcuts which were taking precedence#2018-07-1121:19theeternalpulsehow would I close all non-project related buffers in a current projectile project. I've noticed when navigating a lot of projects and buffers some buffer navingation navigates to non-project buffers#2018-07-1212:14vemv@theeternalpulse Instead of closing them you can keep them out of sight + have a command that switches between buffers of the current project#2018-07-1222:17agI think bury-buffer is what you're looking for#2018-07-1212:15vemvPersonally I show this set of project-buffers in the mode-line, as if they were tabs (in fact they are - they have click handlers!)#2018-07-1212:20vemvhttps://i.imgur.com/JzAHeWg.gif#2018-07-1212:52bozhidar@theeternalpulse See projectile-kill-buffers - you can easily create a similar function for the non-project buffers (basically you subtract the project buffers from all buffers) and you’re done.#2018-07-1212:53bozhidarYou can also file a ticket for an improvement.#2018-07-1304:02psdphi, I am having an issue with CIDER not showing auto completions right after / of a ns, it works fine tho only when I start tying something after /, but I want it to show a list of all available completions of a ns immediately after just / without having to type in any additions. anyone knows how to fix it? thanks for help#2018-07-1306:30callum@psdp I had the same frustration and the following is solving that well enough for me for now
;; use Company when forcing completion with TAB
(global-set-key (kbd "TAB") #'company-indent-or-complete-common)
Keen to hear some full solutions to this problem, though
#2018-07-1306:33psdp@callum thanks for that!#2018-07-1517:00theeternalpulseI've noticed evil-mode macros tend to be slow when doing them in conjunction with a number. so {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "cafbfb8abb"}, :content ("[email protected]")} will do a macro seemingly slower.#2018-07-1519:21_rj_r_I also get that error when trying this in a terminal repl as well... but can't figure out how to open a Cider nrepl without it trying to load the project.clj (i.e., open in the default user namespace)....I've tried looking all this up, and am at a bit of a loss on how to get the nrepl working, along with running http://exercism.io test, and development within emacs and cider 😕 In order to not clutter up the channel, if you can provide assistance, please start a thread here or DM me ... thank you!#2018-07-1520:39dpsutton@ryan.russell011 are you using the brave and true emacs setup?#2018-07-1520:39_rj_r_I am#2018-07-1520:40dpsuttonthat has directions to use cider-nrepl 0.8.2 which is ancient. Remove that dependency from the profiles.clj they tell you to use#2018-07-1520:40dpsuttoncider injects its own dependencies now#2018-07-1520:40_rj_r_to hack around not having a default repl... I opened an empty .clj file.. and jacked into that with cider... then I am using load-file to test things in it for the http://exercism.io exercises#2018-07-1520:40_rj_r_I will do that..#2018-07-1520:41dpsuttoni don't understand what you mean default repl#2018-07-1520:41_rj_r_oh.. just a repl in the user namespace.. that isn't loading a project.clj file#2018-07-1520:42_rj_r_so I'm starting to question using emacs... I've used a ton of other things, and just thought I'd give this a go since the opinion for Clojure development with it seems to be quite high.... Are you a long time emacs user? Is hanging with it for the long term worth the initial time to figure it all out? (just curious)#2018-07-1520:49ag> so I'm starting to question using emacs Ha!... I have had this feeling for as long as I can remember (since I started using Emacs). And every single time I attempt to look for alternatives.... I don't like what I see. There are small bits and pieces that I like in InteliJ, VSCode, Sublime and Atom, but overall - they all miss something. Alas, I am doomed to never to be absolutely happy with my main instrument, yet still to be able to get my job done.#2018-07-1520:51agStick around... I'd guarantee - even 20 years from now, you'll be questioning yourself "why am I still using Emacs?".#2018-07-1520:51_rj_r_I concur... With most projects, VSCode has done me good... IntelliJ for Java things (and Eclipse for the tiny amount I've been in JavaEE), Vim for those simple things (although my Vim config is pretty extensive and I could use it in place of VSCode when VSCode isn't available)... but with Clojure I feel as though they are all missing something... So I figured I'd go the Emacs route... I started with Spacemacs and within about an hour I felt it was trying to do too many things for me and I was frustrated... so I went with vanilla Emacs... and yeah... its been an interesting 2 days trying to figure things out lol.#2018-07-1520:53_rj_r_I should probably just stop trying to have an instant Clojure environment.. go back and remind myself how to set up Emacs properly (I had a pretty decent config for it about 2 years ago)... and then slowly add back in the Clojure dev stuff.. and configure it properly... I think using the Brave and True setup is screwing me at the moment (as was mentioned a few comments ago)#2018-07-1520:57agProbably no custom configuration would be completely satisfactory. Prelude, ergo-emacs, doom, Spacemacs. The last one offers decent defaults but yes, it also adds a lot of stuff. So... be patient. It's not going to be perfect (until you make it perfect for yourself). Don't use any keybinding blindly - always check describe-key and read the docstring of the function it binds to.#2018-07-1521:00agEspecially, since you are a Vimmer - I'd strongly suggest trying out Spacemacs. I have learned way more stuff in a few months using Spacemacs than through all my previous attempts to build my own configs#2018-07-1521:12_rj_r_I didn't care for how it tried to do things for me... and the keybindings for it have apparently changed ... every tutorial I've seen is old enough that the keybindings don't line up 😕#2018-07-1521:17dpsuttonoh sorry i missed the updates. yes i'm a long time user of emacs and sometime contributor to CIDER. I think it is incredibly worth it and I hope it ets easier for you#2018-07-1521:18dpsuttonbrave and true is an excellent intro to clojure but it is an extremely outdated intro into CIDER. current versions are 0.17 and 0.18-SNAPSHOT. It has a repo with 0.8.2 with compiled artifacts. It is a very very bad setup#2018-07-1521:22_rj_r_ah yeah.. that is quite outdated. I'll take the blame, I should've checked versions of things before blindly installing lol. I'll keep at it. I actually just blasted the brave and true emacs configurations... starting from scratch... So quick question, would you recommend rolling my own configs for the most part? or using the built in customize and package-install options that Emacs provides? I assume there are pros and cons to each?#2018-07-1521:23dpsuttonnot your fault. you're trying to follow a guide to learn 🙂#2018-07-1521:23dpsuttonhonestly i really like prelude emacs#2018-07-1521:23dpsuttonsimpe. well thought out and easy#2018-07-1521:24dpsuttonhttps://github.com/bbatsov/prelude same maintainer as CIDER and gets out of your way#2018-07-1521:24dpsuttoni don't fret or spend time on emacs. i just use it#2018-07-1521:26_rj_r_I'll check that out! Thanks!#2018-07-1611:20stardivinerI found Org-mode's ob-clojure.el is not updated to new CIDER API functions. Is there anybody who is familiar with CIDER and good at Elisp can update ob-clojure.el ?#2018-07-1620:06agmaybe submit an issue in project's repo?#2018-07-1815:02runswithd6sThis channel may have a better idea. To be honest, I've always had difficulty getting a good figwheel cljs experience in Emacs. I was hoping this time would be different.#2018-07-1910:26bozhidar@gchewie Seems you have some broken middleware:
[WARNING] No nREPL middleware descriptor in metadata of [#function[clojure.core/comp/fn--5529]], see clojure.tools.middleware/set-descriptor!
#2018-07-1914:02runswithd6sYeah, I've tried a few combinations again last night without success. I think I'm going to try again with a simpler project than fulcro or maybe try a different cljs REPL like shadow. I know someone who has gotten figwheel and CIDER to work, so it's possible... Maybe I'll ping him for a pair-up.#2018-07-1910:27bozhidarYou’ll get exactly the same error without CIDER as well.#2018-07-1910:28bozhidarNot sure where the actually error originates from, though.#2018-07-1910:28bozhidar
Exception in thread "main" java.lang.IllegalArgumentException: Key must be integer, compiling:(/tmp/form-init8008431120095512647.clj:1:73)
#2018-07-1910:52vemvI recently split a monolithic .el file into many smaller ones, but later the order in which I require those files is more are than science 😜 wondering if there are some interesting code analysis tools for elisp (which tell me e.g. which files depends on which -given defuns and their invocations-, whether there are circular deps, etc)#2018-07-1911:19bozhidarHaven’t seen anything except the byte-compiler.#2018-07-2002:09_rj_r_can anyone provide a good resource for setting up org (preferably with use-package) in order to write a config file in org and have it compile to init.el?#2018-07-2210:42munen@UAW40E21F I use org-mode to configure everything in Emacs, including package management. However I use the built-in functionality for the latter. There's quite a bit of documentation going on, too: https://github.com/munen/emacs.d/#2018-07-2214:38_rj_r_oh nice thank you. I decided to go the less fancy route and just include the .el file that org-babel makes... rather than having it overwrite my init.el like I've seen. I have a somewhat workable starting point and can at least get back to coding over configging Emacs lol.#2018-07-2218:14munenThat's what I'm doing. My init.el only has a couple of lines of code. I think that's the idiomatic way.#2018-07-2218:17_rj_r_Org is quite a huge and confusing package lol.#2018-07-2002:10_rj_r_lots of convoluted (and potentially outdated) responses out there on the webs... it is getting confusing#2018-07-2008:58solfMy own setup is horribly convoluted for no good reason. At some point in the past, the latest org version had both a feature I wanted to use and had a broken org-babel-tangle. My solution was to keep using it, but downloading an older org-mode version and putting it in a separate folder in my .emacs.d. To this day every time I open emacs, if I detect my config.el file is older than my http://config.org one, I run a separate instance of emacs with no loaded libraries except that old version of org-mode, use it to compile my config.el, and then resume my main emacs instance initialization.#2018-07-2009:01solf
(let ((emacs-binary (if (eq system-type 'darwin)
			"/Applications/Emacs.app/Contents/MacOS/Emacs"
		      "emacs")))
  (if (file-newer-than-file-p "~/.emacs.d/config.org" "~/.emacs.d/config.el")
      (shell-command-to-string (concat emacs-binary " -q --script ~/.emacs.d/tangle_config.el"))))
#2018-07-2009:04mgrbyte@dromar56 fwiw, I inline my org config in the :config section of a use-package declaration: https://github.com/mgrbyte/emacs.d/blob/master/init.el#L134-L216#2018-07-2009:05mgrbyteit's not perfect, and I'm not an "expert" org-mode user at all. I mainly use it for todo lists.#2018-07-2010:20vemvI have this question (worth answering over there for the sake of persistence) https://news.ycombinator.com/item?id=17573794#2018-07-2010:34MarisI wonder if CIDER can disable ":pedantic? :abort" setting when launching REPL#2018-07-2010:54vemvI had the same exact problem. I override it at ~/.lein/profiles.clj:
{:user {:pedantic? false} ...
Not clean, but it works. I tried to create a specific :emacs-nopedantic profile (as opposed to :user, for not polluting all other projects/repls), but it doesn't work
#2018-07-2011:04Marisgood idea , thank you 👍#2018-07-2010:36Marishttps://cider.readthedocs.io/en/latest/caveats/#injecting-dependencies-and-leiningen-pedantic-abort-mode#2018-07-2010:37MarisI tried to switch off injecting the dependencies#2018-07-2319:42j0nihrm, anyone seeing problems interacting with https://melpa.org? The UI stopped rendering for me, and I'm having trouble installing packages. It's always possible that I somehow sabotaged myself, but I thought I'd check...#2018-07-2319:51tanzoniteblackworking fine for me#2018-07-2320:00j0nihuh#2018-07-2320:00j0nivery odd - https://stable.melpa.org works, but not regular melpa#2018-07-2320:10vemvWhat company backend is the one that CIDER is interacting with?#2018-07-2320:13richiardiandrea@vemv it is hooking into capf if I remember correctly#2018-07-2320:14richiardiandreaactually let me check#2018-07-2320:14richiardiandreait is calling completion-table-dynamic passing custom functions#2018-07-2320:15richiardiandreasee cider-complete-at-point#2018-07-2320:15vemvis that within the company-backends value?#2018-07-2406:32bozhidar@vemv Yes.#2018-07-2406:33bozhidarNo special setup is need for company when using CIDER.#2018-07-2407:25vemvI know, working fine for me but I'm curious about it as I want to customize it. Which of the backends in company-backends is it? I think that'd give me a starting point#2018-07-2407:26bozhidarcapf (completion-at-point-functions)#2018-07-2407:26vemvThank you!#2018-07-2407:27bozhidarhttps://github.com/company-mode/company-mode/blob/master/company-capf.el#2018-07-2407:39vemvIn case it rings a bell, what I'm trying to accomplish is to complete blindly if there's a single candidate which hasn't been compiled by clojure yet (i.e. I introduced blargh, haven't saved yet, now I type bla<TAB>). As opposed to having to hit TAB twice.#2018-07-2408:19plexusIt seems cider-connection-browser disappeared in the latest version, not sure many people were using it but I used it all the time, so I hacked together a replacement.#2018-07-2408:19plexushttps://github.com/plexus/plexmacs/blob/master/sesman-table/sesman-table.el#2018-07-2408:49bozhidar@plexus Join the conversation here - https://github.com/clojure-emacs/cider/issues/2380#2018-07-2408:49bozhidarI was just telling @vspinu that now it’s hard to figure out what connections are mapped to which session.#2018-07-2409:32plexus@bozhidar what's the story with sesman? was this created for/spun off from CIDER, or did it exist already? is anyone else using it?#2018-07-2409:43bozhidar@plexus It was created for CIDER, but with the aim to generic enough to be used with other projects. I know ESS (Emacs Speaks Statistics) is also going to use it. The aim is to adopt this in other similar projects that have to deal with multiple connections/sessions.#2018-07-2409:44bozhidarI was against the idea to have this as something generic and outside of CIDER, but @vspinu was really convinced that sesman has a potential to help simplify many projects (and bring consistency to them), so I agreed in the end.#2018-07-2409:45bozhidarI definitely agree that sesman’s approach is significantly better from how multiple connections were handled in the past, but the project is still very young and pretty rough around the edges (especially in the UI department).#2018-07-2409:47bozhidarYou can read all the story here https://github.com/clojure-emacs/cider/pull/2069#2018-07-2421:46theeternalpulseI know prefixing variables/functions with the package name is common, but is there a way in code to easily reference only variables/functions that belong to a certain package, mainly when using autocomplete? is there a way to do the same with "core" emacs functions and vars?#2018-07-2515:17bjaIs there a way to pin a helm results buffer?#2018-07-2515:19bjaerr, nvm, reading the source code gave me a hint#2018-07-2515:19bjaI need to load up *helm-ag* in my case#2018-07-2516:09richiardiandreaI thought there was a key binding to transform a result to a buffer but I might be wrong#2018-07-2516:32richiardiandreaI gave it a read: > From within a helm-find-files session, you can invoke helm-ff-run-grep with C-s to search a file/directory on highlighted entry in the Helm buffer. With prefix argument C-u, recursively greps a selected directory. > You can also save the result into a Grep buffer using the action Save results in Grep buffer. Note that this Grep buffer is created by Helm, not the default Emacs grep buffer. It has minimal key bindings. In hgrep buffer, press C-h m to view all key bindings#2018-07-2517:21agalso, helm allows to be toggled to full-frame C-c _. It's not exactly what @bja is asking for, but very helpful#2018-07-2517:22bjaooh, that is useful#2018-07-2517:28agbtw... you know about helm-follow? basically if helm-find-files jumping through the list would automatically "preview" that file? But sometimes it sucks, because it could be slow, also it leaves those buffers open. It can be toggled by pressing `C-c C-f. But I can't find a way to persist that between the sessions. I want this thing to be turned off by default.#2018-07-2517:29aganyone knows how?#2018-07-2611:15tianshuIt's there a easy to use flycheck for Clojure?#2018-07-2611:16tianshuI mean no need to do complex setup, just enable and it works. also no need to write specific configuration.#2018-07-2612:44bozhidar@doglooksgood There’s integration with joker (easiest option) and with kibit and eastwood (squiglly-clojure).#2018-07-2612:45bozhidarI guess you’re looking for the joker option.#2018-07-2612:45bozhidarhttps://github.com/candid82/flycheck-joker#2018-07-2612:46bozhidarhttps://github.com/clojure-emacs/squiggly-clojure#2018-07-2717:21j0niwow, joker is written in Go#2018-07-2717:21j0niI mean, fair enough, but oof#2018-07-2717:22j0nianyone else being offered hundreds of package updates by melpa after the new server got spun up?#2018-07-2720:53colliderwriter@j0ni yes, and confirmed by others#2018-07-2720:59j0ni@colliderwriter yeah, I made https://github.com/melpa/melpa/issues/5644 and milkypostman confirmed my suspicion#2018-07-2722:34lilactowni've been toying with an idea for a build tool/task runner and am thinking of using either common lisp or go#2018-07-2805:10nenadalmYou can try compiling Clojure into native binary using GraalVM if startup is your only concern. It's way faster than Clojure on JVM or ClojureScript on NodeJS (https://github.com/nenadalm/hours-counter#graalvm-recommended).#2018-07-2805:21lilactownI did that, but got uneasy about distribution#2018-07-2805:22lilactownI don’t think I’d be able to distribute binaries myself and asking people to install graal to compile it might not be okay either, and doesn’t feel right#2018-07-2805:22lilactownmaybe if the free version had macos native-image support#2018-07-3014:06benedekwhat about the above mentioned cljs on nodejs?#2018-07-3015:54lilactownfor completely arbitrary personal reasons I want it to be a native executable 😉#2018-07-3015:54lilactownfaster startup, no dependencies on runtime versions#2018-07-2722:34lilactownClojure startup is just too painful#2018-07-3015:56vemvAnyone here uses a way to automatically reply n?#2018-07-3015:56vemv#2018-07-3015:57vemv(this popup appears when jumping to a definition, which I do for understanding code/doc. I'm never interested in setting locals)#2018-07-3016:48bozhidarJust use !. That’s what I do.#2018-07-3016:48bozhidarIt’s a pity that’s not marked as safe in Emacs itself.#2018-07-3016:49bozhidarI guess I’ll do this at some point. I keep forgetting about it.#2018-07-3123:34theeternalpulseI'm trying to make my own function that operates on regions and I went to look at something like evil-yank and it has (interactive "<R><x><y>") I try to replicate it in my own program but it doesn't like the interactive code. I can't find a reference to this particular form, any Ideas?#2018-08-0111:21pradyumnahi, how do I update refactor-nrepl to work with [nrepl 0.4.3]. should i add something in profiles.clj?#2018-08-0112:32bozhidar@pradyumna Someone has to update the code in refactor-nrepl to look like this https://github.com/nrepl/piggieback/blob/master/src/cider/piggieback.clj#L19 (replace unconditional requires of tools.nrepl with dynamic ones).#2018-08-0115:10pradyumna@bozhidar Thanks, I'll try it and see if i can do a PR#2018-08-0116:27richiardiandreawhen emacs calls a function from a menu (cider, created with easy-menu-define) - which buffer is the call executed in?#2018-08-0204:22lilactownis there a way to specify a deps.edn alias to load when using cider-jack-in?#2018-08-0206:41bozhidar
(setq cider-clojure-cli-global-options "-A:server:client:dev")
#2018-08-0207:12bozhidar(there are similar config options for every supported build tool, btw)#2018-08-0214:12lilactownthanks for the help @bozhidar!#2018-08-0214:19bozhidarYou’re welcome!#2018-08-0214:25bozhidarThere’s also http://endlessparentheses.com/a-quick-guide-to-directory-local-variables.html for project-specific config.#2018-08-0214:27lilactown🙂 there’s always an answer for my problems with Emacs, if I just look hard enough. thank you!!#2018-08-0214:49richiardiandreaThe only problem I found is when I want to activate a mode (`cider-mode`) from a dir local, it might be that I don't do it correctly though in there with eval#2018-08-0220:54theeternalpulseis there a good "focused" tutorial on making emacs layers. I tend to have to jump around the emacs documentation which while can be useful, is quite the reference book. I've really only seen one good video tutorial but it's missing a lot.#2018-08-0221:03agwhen you say "layers" I feel you're talking about Spacemacs layers, are you using Spacemacs?#2018-08-0221:04agif that the case #spacemacs channel is the best place to ask those kind of questions#2018-08-0221:06agthere's no such thing as Emacs layers. Layers is a Spacemacs specific thing#2018-08-0221:32theeternalpulseSorry custom modes#2018-08-0221:33theeternalpulseHave layers on the brain#2018-08-0221:36agpeople over the years have wrote bunch of tutorials on major and minor modes. e.g. xah lee has one, just google#2018-08-0317:45devnAnyone here have a working org-mode + babel clojure setup?#2018-08-0317:46devnI am trying out ob-clojure-literate from org-mode/contrib, and it works... sort of.
#+begin_src clojure :results value
(+ 1 4)
#+end_src

#+RESULTS:
: nil5
#2018-08-0317:46devnthe nil shouldn't be included there#2018-08-0318:51devn
#+begin_src clojure :results pp
  (let [a 1
        b 2]
    [a b])
#+end_src

#+RESULTS:
: [1 2]
works, but doesn't match the docs. seems like a cider version diff.
#2018-08-0403:19stardiviner@dev-hartmann Hi, which part does not match the doc says? I write this ob-clojure-literate, I'm still not good at Elisp and Clojure, so might not very good enough to use it right now.#2018-08-0418:54lleoI have a question about configuring emacs indentation.#2018-08-0418:55lleoI would prefer my closing paren, if on a line of it’s own, be on the same column as the opening paren.#2018-08-0419:12vemvHow do I make (read-from-minibuffer "Tell me something") return nil if I press C-g? (rather than an error) I tried various incantations, to no avail#2018-08-0419:24vemvGot it:
(defun vemv/read-from-minibuffer (&optional prompt)
  "Catches C-g as nil"
  (interactive)
  (let* ((inhibit-quit t)
         (output (with-local-quit
                   (read-from-minibuffer (or prompt "=> ")))))
    (or output
        (setq quit-flag nil))))
#2018-08-0421:26lilactownmy CIDER is seriously messed up today#2018-08-0421:27lilactownI’m trying to use deps.edn. It works in one project I’ve been developing for awhile, but today I started a new one and it’s completely horked#2018-08-0421:27lilactownif I just cider-jack-in Emacs completely freezes#2018-08-0421:28pauldsee the cider group - a bunch of people that use deps.edn have a broken cider setup now.#2018-08-0421:28pauld#cider#2018-08-0421:28lilactownthx#2018-08-0506:17bozhidarThe summary of the problem is that everyone should make sure they are running the latest versions of cider-nrepl, piggieback, figwheel and shadow-cljs. refactor-nrepl and sayid currently cause problems, as they weren’t updated. I’ve committed the necessary changes to refactor-nrepl (https://github.com/clojure-emacs/refactor-nrepl/commit/65da8bfbb04fb93554f3c1b56444f00dd4ac1ffd), but I don’t have permissions to cut a new snapshot myself, and I’ve sent a PR to sayid (https://github.com/bpiel/sayid/pull/40).#2018-08-0506:18bozhidarThe gist of the problem that tools.deps users are experiencing is that this defaults now to using nREPL 0.4 (which is a good thing), but not all of the middlewares you might have in your deps is updated to support it (notably refactor-nrepl and sayid).#2018-08-0514:59lilactownI assumed that was the case, since I saw it coincided with that update the cider-nrepl rolling out. it would have been good to have some way to not cause these sudden “halt and catch fire” errors. maybe by detecting that sayid and refactor-nrepl didn’t support nrepl 0.4 and either downgrading or disabling them?#2018-08-0520:25bozhidarIt’s easier said than done - refactor-nrepl hasn’t had a stable release in a very long time and with a snapshot you can never know what’s the state there. And, of course, that would imply CIDER should know about some 3rd party middleware and treat it specially, which doesn’t seem very prudent to me (not to mention those injections come from the other projects, not from CIDER itself). Also - something like this would imply that you have to parse the deps (as you have to analyze them before starting the server), which is way outside the scope of CIDER.#2018-08-0806:53slipsetDang! This tripped me up after vacation and updating emacs#2018-08-0806:53slipsethttps://github.com/bbatsov/projectile/commit/b90b950eead64b171d528098d186c19804739aa0#2018-08-0807:27bozhidar@slipset Yeah, at this point I’m thinking a should probably just remove the key altogether and leave it to the users to decide what key want to use.#2018-08-0807:28bozhidarTurns out it’s very hard to find a key that works for everyone. 😄#2018-08-0807:46slipsetNo problem, I’m just glad I figured out the cause. The fun bit is that the muscle memory is so strong.#2018-08-0807:57bozhidarThat’s why in Emacs everything is configurable. 😉#2018-08-0808:30vemvI'm looking for a prompt UI similar to:
(ido-completing-read "Press 1 to foobarize, or 2 to quuxify:" `("1" "2"))
But such that when you press 1, the prompt is done, without needing to hit RET. Anyone heard of something like that?
#2018-08-0808:44vemvFound it: (read-char-choice "Press 1 to foobarize, or 2 to quuxify:" (string-to-list "12"))#2018-08-0811:33bartukahey ppl, I am having trouble to get slack-emacs to work here#2018-08-0811:34bartukaI managed to get the client-id and the token from the DevTools as the instructions said#2018-08-0811:34bartukahowever, where do I get the client-secret?#2018-08-0811:56vemvHave you looked at https://api.slack.com/custom-integrations/legacy-tokens ?#2018-08-0817:48bjais there a predefined/idiomatic equivalent of clojure's pr-str in elisp? I'm looking for the inverse of elisp's read such that (equal (read (INVERSE-OF-READ '(bar 2 "spam"))) '(bar 2 "spam")) (defun pr-str (x) (string-trim (with-output-to-string (print x)))) gets me there, but it seems like I missed something builtin#2018-08-0818:23cmack@bja prin1-to-string sounds like thing#2018-08-0818:23bjathanks @cmack#2018-08-0818:45lilactownholy crap - for those spacemacs + macOS users out there, make sure you disable the “add period with double-space” option. This has been driving me nuts for months and I had no idea why it was happening.#2018-08-0823:42theeternalpulseis there an easy way to install packages and namespace them automatically, perhaps in addition to the functions being spilled into the namespace globally, to also have them aliased with "namespace/<original function name>". Installing something like dash makes me quake because of the global pollution.#2018-08-0904:53bozhidarDon’t think so.#2018-08-0904:53bozhidarThat’s I dropped dash in favour of seq.el and friends a long time ago.#2018-08-0904:53bozhidar(although technically everything’s polluting the global namespace, some packages are obviously more considerate of the issue 🙂 )#2018-08-0915:37theeternalpulseI'll look into that.#2018-08-0915:48theeternalpulseah it comes with emacs 25, even better#2018-08-0920:39vemvRelatedly, a nice goodie from dash.el worth copying is -> , ->> etc#2018-08-1005:36bozhidar@vemv That has been in subr-x for a while, now but in Emacs it’s thread-first and thread-last.#2018-08-1005:36bozhidarProbably since 25 as well.#2018-08-1006:16vemvI never used those because of the long names (although admittedly making an alias should be easy...)#2018-08-1318:17theeternalpulsewhat's the best immutable library/strategy for elisp. One of the downsides of coming from clojure. I'm thinking something like a swap! mechanism for top level vars.#2018-08-1404:55lincpaemacs# = Notepad++ + Clojure-CLR 🚀#2018-08-1411:01lincpahttps://clojureverse.org/t/can-notepad-clojure-clr-lsp-become-emacs-elisp/2656#2018-08-1413:04Stef😉#2018-08-1413:36lincpaI did a little work, https://github.com/linpengcheng/ClojureBoxNpp , I have written nearly 100k lines of clojure code with npp. In the community, it seems that only I write Clojure with notepad++. :white_frowning_face:#2018-08-1414:51StefIt was just a pun 😉 It's great that you built the tool you needed to push you development with Npp forward. Event if it may take a bit of time, people will end up using what you built.#2018-08-1502:09vemvthis is figwheel_server.log:#2018-08-1502:09vemv#2018-08-1502:10vemvI wonder if there's a way to "tail" it within emacs, invisibly, and whenever it matches Successfully compiled build, arbitary elisp code gets run (e.g. (message "Reloaded!"))#2018-08-1505:56vemvI solved the underlying problem (but not the question itself) with a terminal command instead:
figwheel_notifications(){
  tail -n 1 -F figwheel_server.log | grep --line-buffered "Successfully\|Failed to compile\|Compiler Warning" | while IFS='' read line; do
    if grep --silent Succ <<< $line; then
      terminal-notifier -title 'Figwheel' -message "Successfully recompiled."
    elif grep --silent Warn <<< $line; then
      terminal-notifier -title 'Figwheel' -message "Compilation warning."
    else
      terminal-notifier -title 'Figwheel' -message "Compilation error."
    fi
  done
}
Uses https://github.com/julienXX/terminal-notifier
#2018-08-1716:06j0niAnyone know how to make single ; comments align the same way as double ;; comments? I'm pretty sure this is built-in lisp mode behaviour, and tho I don't hate it, my co-workers who don't use emacs use single ; for regular, not end of line comments#2018-08-1717:57bozhidar@j0ni That’s not possible. This behaviour is not configurable. In classic Lisp style ; is an inline comment and ;; is a line comment, therefore the different behaviour.#2018-08-1717:59bozhidarThis can be changed, of course, but it’d be pretty painful as we’ll have to override some of the lisp-mode code. Cursive recently added support to use ;; for line comments, which should alleviate problems like yours.#2018-08-1718:00bozhidarhttps://github.com/bbatsov/clojure-style-guide/#comments#2018-08-1721:06vemvI (unfortunately) found myself in the same situation as you, @j0ni. You can set setq comment-indent-function to something like the following: https://github.com/vemv/.emacs.d/blob/c31246010a7c8862515b365437d58a38cecf5d01/lib/non-submodules/vemv.paredit.el#L349 Battle-tested for a few weeks, finally works fine after some traumatic first iterations. I'd recommend just settling on ;; like good Clojure citizens 🙂#2018-08-1721:08vemv(btw that code links to a SO question I made 5 years ago... my thinking has definitely changed since then ;p)#2018-08-1811:12bozhidarYeah, that’s a decent approach. At some point I planned to decouple clojure-mode completely from lisp-mode, but I never got to doing so. This is the only way to mitigate the need for such hacks here and there.#2018-08-1918:07j0ni@vemv @bozhidar it turned out that my co-worker had misunderstood the idiomatic style, and was totally ready to switch. I was just being too polite. Sometimes it's difficult to shake off the British upbringing I guess 😛#2018-08-1918:11dpsuttonI think this has been a point of contention between cursive and emacs and Colin has been very generous in accommodating the quirks of emacs#2018-08-1918:11dpsuttonI think this might even be in C territory in emacs#2018-08-2006:42bozhidar@dpsutton Oh, no, it’s not C-territory at all. And it’s not really a lot of work - just a convention so strong that no one ever considered making this customizable. It’s trivial to make the behaviour configurable in lisp-mode, but I doubt anyone would approve such a change, that’s why I mentioned it’d be best at some point to just stop deriving this from it if we want to make it more flexible. And yeah - I appreciate a lot that Colin took some time to make this configurable in Cursive. If I had more time I’d certainly do the same for clojure-mode.#2018-08-2012:29dpsuttonoh apologies. I thought I had traced that one down before#2018-08-2015:44bozhidarNo worries. I know how messy all of this is.#2018-08-2121:43theeternalpulseI'm using magit, and i notice that if I'm on a branch A, and I want to rebase on some upstream master branch, I do a rebase, but it shows that "changes unpulled from A" afterward#2018-08-2121:44theeternalpulseI'm not clear on why this is. When I pull, it then adds the same changes to the log as from the rebase, so it appears twice.#2018-08-2122:16cmackit sounds like it is more likely saying there are changes unpulled from {remote name}/A where the remote is set as the pushRemote (IIRC). That message would be correct because your local branch has modified its history.#2018-08-2122:17cmackalso, you should not “pull” after doing a rebase like that.#2018-08-2122:17theeternalpulsethe thing is I push my local branch to that remote that it's saying I haven't pulled from#2018-08-2122:17theeternalpulseso I'll push that up to the upstream, then rebase on master#2018-08-2122:20cmackI can’t follow that. does upstream equal the remote?#2018-08-2122:21theeternalpulseso my branch A is branched off of upstream/master. I then make a bunch of changes and commit them locally, and push it to upstream/A. I then do a rebase, which updates the history properly, but then it says, "unpulled changes from upstream/A"#2018-08-2122:21cmackright.#2018-08-2122:23cmackand magit is telling you the truth because now all those commits locally have new hashes and they are different from upstream/A#2018-08-2122:26cmackYou now have some questions to ask yourself like: is upstream/A being shared with anyone else / are they working on it? If not, you can probably safely force push to upstream/A#2018-08-2122:26cmackbut you should definitely not pull after a rebase#2018-08-2122:27cmackgiven that scenario#2018-08-2122:32theeternalpulseah I see, so either force push or just don't push until rebase is done?#2018-08-2214:50vemvHow do you typically search for ocurrences of r as a variable / fn name? With my current search command, it just searches for the letter r, so I'll get lots of undesired matches
#2018-08-2214:52vemv(in clojure-mode. and for the current buffer)#2018-08-2214:52cmackI would search with whitespace either before or after — something like: \ r or#2018-08-2214:52cmackin swiper#2018-08-2214:53cmacklikewise for fn I would probably try \(r\ #2018-08-2214:54vemvvariables can be invoked as fns though 🙂#2018-08-2214:58vemvProbably I'm looking for something that takes advantage of the major mode's syntax table, which specifies what is a word in that language#2018-08-2215:07cmackmy way is definitely not like a dedicated find-usages for a major mode or other IDE … just a “get-it-done” thing. >_<#2018-08-2315:12theeternalpulsehttps://github.com/GuidoSchmidt/circadian.el#2018-08-2315:13theeternalpulseFound this cool plugin.#2018-08-2419:19lilactownanyone familiar with lsp-mode?#2018-08-2419:19lilactownand lsp-ui#2018-08-2419:20lilactownI have a language server that is responding with hover events like "contents": {"kind": "markdown", "value": "its a module"} and I want to render the value using markdown#2018-08-2419:23lilactownI see lots of client-specific hooks in lsp-mode for rendering the old MarkedString with {"language": "blah", "value": "asdf.jkl"} type contents but only a global defcustom for rendering MarkupContent like the above#2018-08-2612:33bozhidarFYI - I just cut a release of clj-refactor.el and refactor-nrepl https://github.com/clojure-emacs/clj-refactor.el/blob/master/CHANGELOG.md#240-2018-08-26#2018-08-2612:47andrea.crottiAwesome 👍 #2018-08-2701:17theeternalpulseis there something similar to evil-lispy but better ergonomics and navigation commands.#2018-08-2708:19mpenetis there a way to have cider follow clj-fmt formatting rules, or the other way around#2018-08-2708:20mpenetwithout adding annotations everywhere#2018-08-2708:27mpenetI prefer the defaults in cider but I need to play nice with cljfmt#2018-08-2708:28vemvare macros the only point of contention?#2018-08-2708:28mpenetmostly yes#2018-08-2708:30mpenetsometimes some protocol functions get indented differently too apparently#2018-08-2708:30vemvPersonally I use put-clojure-indent to teach clojure-mode how to indent specific macros. Although recently I realised that that's unnecesary under CIDER. i.e. make sure to format under an active cider connection#2018-08-2708:31mpenetyeah I suspected that#2018-08-2708:32mpenetmost of the clj.spec stuff gets indented weirdly#2018-08-2708:32mpenetsince it's mostly macros#2018-08-2708:35mpenetah but that was fixed in the latest cljfmt commit, just not released yet#2018-08-2708:37mpenet@weavejester would you do a release with 81cdeaa34afdda39ec68ded554910203d3ff770b please?#2018-08-2713:45bozhidar@vemv It’s relatively easy to infer if something’s a macro taking a body. SLIME did this for Common Lisp and we can certainly do so as well.#2018-08-2816:30vemvHappy with this code, thought I'd share
(dolist (h `(kill-emacs-hook focus-out-hook))
  (add-hook h (lambda (&rest _)
                (shell-command-to-string "~/bin/fntoggle off"))))

(add-hook 'focus-in-hook (lambda (&rest _)
                           (shell-command-to-string "~/bin/fntoggle on")))
https://github.com/nelsonjchen/fntoggle That way I don't have to hit fn+<a fn key> neither in Emacs or in macOS
#2018-08-3003:37andy.fingerhutI was hoping to find some way in Emacs to do a multi-file search over most, but not all, files in a "project", e.g. all files in a particular directory and its subdirectories, but with customizations I can make to the set of files, based on name patterns, suffixes, directories, etc.#2018-08-3003:37andy.fingerhute.g. Never search files ending in .txt or .docx for project A, but in project B, some other variant of that custom to project B.#2018-08-3003:38andy.fingerhutI found and tried projectile, but haven't figured out how to get it to do that yet (if it can).#2018-08-3003:53dpsuttonthe customizations you can make to the set of files. dynamically or in dir-locals?#2018-08-3003:54dpsuttonyou can use helm-ag with .ag-ignore info: https://github.com/syohex/emacs-helm-ag#helm-ag-use-agignoredefault-nil#2018-08-3003:56dpsuttonalso this. i haven't tried it yet but looks good: https://github.com/Wilfred/deadgrep#2018-08-3003:56andy.fingerhutAt least for now, I think the set of files I want to include/exclude will be relatively slowly changing, so I don't mind editing some kind of project-specific config file to change them.#2018-08-3120:15andy.fingerhutI have since tried installing the_silver_searcher (easy on both macOS via MacPorts, and Ubuntu via apt) then Emacs helm-ag package. the_silver_searcher / ag command by default pays attention to .gitignore and a few other similar files for other version control software besides git, and also its own per-directory .ignore files and user-wide $HOME/.agignore That is customizable enough for me.#2018-08-3003:56andy.fingerhutthx for suggestions. Will check them out.#2018-08-3014:15tanzoniteblack@andy.fingerhut are you using projectile (https://projectile.readthedocs.io/en/latest/)? If so, you can in each project edit your .projectile to ignore specific files, or based off globs. And then projectile-grep (or projectile-ag) Example of a .projectile (which is put at the root folder of each of your projects):
-*.txt
-*.html
#2018-08-3014:16tanzoniteblackah, I see now above you have tried projectile, but couldn't find the project config.#2018-08-3016:49andy.fingerhutThanks. Yeah, I saw some docs about creating a .projectile file, and I have added some lines to it like -*.txt but those files are still searched when I do projectile-grep#2018-08-3018:51tanzoniteblackI think you might need -/*.txt#2018-08-3018:52tanzoniteblack.projectile is a poorly documented feature...I keep meaning to send a PR for that, but hasn't happened yet#2018-08-3014:48lukas.rychteckyHi Emacs lovers, how do you live without Parinfer? I’ve been using VIm for several years right now. I’ve tried to switch to Spacemacs. So how do you format you brackets? Via SPC k?#2018-08-3014:59pauldYeah, I just got used to using the SPC k commands. Once you learn them, it works well. There were some things I missed from paredit but I forgot what after being with spacemacs for so long. Never used Parinfer.#2018-08-3015:01pauldthe brackets are a bit annoying, I don't know of any commands to switch them from () to {} for instance, but I haven't really looked.#2018-08-3015:02pauldI usually jut put the opening bracket then slurp the code in - that works with {} brackets as well#2018-08-3015:02pauldthere is a #spacemacs channel#2018-08-3015:02dpsuttonif you are using cider you have clojure-mode and you can use C-c C-r [ or { or ( to change the delimiters#2018-08-3015:03dpsuttonthere are some really nice refactors in clojure mode that are pure textual. sexps for the win#2018-08-3015:04dpsuttonon a new file it can create the ns form for you, change threading forms, lots of good stuff#2018-08-3015:04paulddo you know the name of the function for C-c C-r?#2018-08-3015:05dpsuttonclojure-convert-collection-to-*#2018-08-3015:05pauldclojure-refactor-map?#2018-08-3015:06dpsuttonyes you will find it in there#2018-08-3015:06pauldah nice! , r c in spacemacs#2018-08-3015:07lilactownI was searching for the same 😄#2018-08-3015:08pauldI often want to use SPC k w to wrap something but don't want the default ().#2018-08-3015:09pauldFunny I haven't explored all these clojure-mode bindings#2018-08-3015:11pauldWow, so much to explore under clj-refactor (, r menu in Spacemacs)!#2018-08-3015:13pauldWhat is this amazing magic? If you are in spacemacs try
, r ?
#2018-08-3015:14pauldIt give documentation on the clojure refactor commands along with gif animations showing usage#2018-08-3015:14pauldTIL#2018-08-3015:17paulduse Q instead of q to close the doc window#2018-08-3015:40j0niThis is kind of vague, but maybe someone has ideas: I've been noticing a lot of flicker in my emacs, mostly in the context of clojure buffers, which seems to be caused by eldoc-mode (that is, it stops when I turn off eldoc-mode). I feel like I've dealt with this before, but my memory is almost 50 and I'm terrible at making notes. Anyone recognize this symptom?#2018-08-3015:40j0ni(The flickering, not the memory loss)#2018-08-3018:44bja@pauld for my solution at extending SPC k w yo take an argument: https://gist.github.com/emidln/393eb7696516bc39de4a437d8067eb62#file-emidln-el-L11#2018-08-3018:46pauldah nice elisp!#2018-08-3018:50bjaI don't remember why I didn't use a loop for that duplicated code. Something in there might be a macro and I didn't want to propagate macros, but that's a guess.#2018-08-3118:41hlollidoes someone know how to increase the recent buffers history? I'm using ido.#2018-09-0206:02bozhidar@hlolli Seems I blogged about this a while back http://emacsredux.com/blog/2013/04/05/recently-visited-files/ 🙂#2018-09-0413:20hlolliperfect! thanks!#2018-09-0217:02bozhidarCIDER 0.18 (Saigon) is out! Read all about it here https://github.com/clojure-emacs/cider/releases/tag/v0.18.0 TL;DR: Yeah, those are a TON of changes indeed! Pay close attention to everything marked with “Breaking”, as some of those might surprise you! Generally you should know the following: * CIDER now supports nREPL 0.4 * We’ve revamped completely the connection management, so be sure to check http://www.cider.mx/en/latest/managing_connections/ * Now the canonical way to start CIDER is C-c M-x (M-x cider) or C-c C-x .... The old jack-in and connect keybindings will be removed at some point for the sake of consistency. * CIDER will now auto-inject piggieback for ClojureScript REPLs. * Many keymaps were changed significantly in order to make them consistent, group related actions together and to free up keys on the top-level (C-c C/M-letter). * CIDER and cider-nrepl are now released independently (not really obvious now, but should become clear what I mean after a few releases). Thanks to everyone who helped with the current release! I love you all! Special thanks to the London Clojurians, Daniel Compton and Clojurists Together for their support! Now it’s time for me to take a long break and enjoy a few mugs of cold cider! Cheers!#2018-09-0219:25joelkuiperam I the only one who experiences frequent lockups with long outputs? Sometimes I derp and execute something that dumps megabytes of data into the buffer and my emacs crashes#2018-09-0219:25joelkuiperis there some way to avoid this?#2018-09-0219:25joelkuiper(apart from me trying not to output more than a few lines into the REPL … but sometimes that is genuinely unknowable)#2018-09-0306:01bozhidarThat’s a long-standing issue. @gonewest818 was working on a solution to handle long-output in a more intelligent fashion a while ago, but unfortunately his work never made it to master.#2018-09-0306:02bozhidarBasically we need some way to fold huge output in the REPL and be able to expand it in small increments.#2018-09-0312:10soulflyerI have recently set emacs to truncate lines in my repl buffers in the hope that it will stop emacs locking up if I accidentally output something huge. So far it seems to be working. I put this in the config:
(add-hook 'cider-repl-mode-hook (lambda () (setq truncate-lines t)))
and bound toggle-truncate-lines to C-c C-t so I can turn it back on easily.
#2018-09-0321:12theeternalpulseI can't seem to eval/autocomplete with the latest cider after doing jack-in#2018-09-0321:16lilactownanything in your messages?#2018-09-0321:22theeternalpulseno, after I connect it freezes for a while#2018-09-0321:23lilactown:thinking_face: what about in your nREPL buffer?#2018-09-0321:23theeternalpulseThat shows up fine after it's done#2018-09-0321:23theeternalpulsebut as I eval, I don't get errors or anything#2018-09-0321:24lilactownif you run cider-switch-to-repl-buffer does it find the REPL?#2018-09-0321:26theeternalpulseyes#2018-09-0321:27theeternalpulsenow I'm getting a freezing issue after it connects, wasn't happening before#2018-09-0321:27theeternalpulseit just shows connection established, but I can't actually do anything#2018-09-0321:28lilactownpreviously I was having issues with latest cider/nREPL and some middlewares#2018-09-0321:28theeternalpulsethen when I do C-g I can switch to the buffer but no commands go through#2018-09-0321:29lilactownit’s strange that you don’t see anything aberrant in the messages or nREPL buffer#2018-09-0321:37theeternalpulseI'm going to just see if it freezes for a long time or eventually lets up#2018-09-0321:38theeternalpulseOk, I did a full update of my packages and my config (spacemacs) and it works now#2018-09-0321:39lilactowngotcha. are you by chance on the develop branch of spacemacs?#2018-09-0321:40theeternalpulseyes#2018-09-0321:41theeternalpulseI'm hoping to eventually migrate to a custom emacs config, but of course that's a job in itself lol#2018-09-0321:42lilactowngotcha. it was probably either sayid or clj-refactor that was out of date. they are middleware which are included by default in the develop branch and was causing me similar issues#2018-09-0321:42lilactownyeah for sure hahaha#2018-09-0321:42lilactownI’m happy with spacemacs as my daily driver#2018-09-0402:06bartukaHi ppl, I closed a cider repl buffer and now when I try to M-x cider-jack-in I get cider--gather-session-params: Selecting deleted buffer#2018-09-0402:06bartukaany help on that?#2018-09-0419:35vemvWhenever I create a .clj file, a ns declaration is inserted (which is very convenient). How to tweak that? IDK if it's clojure-mode or cider the one doing the magic#2018-09-0419:35dpsuttoni believe that is cider-refactor#2018-09-0419:40vemvI see it's clojure-insert-ns-form, which is later improved by CIDER (I should stop my habit of asking before searching ;p)#2018-09-0419:50tanzoniteblack@vemv in some degrees...please don't. It's educational for the rest of us following along 🙂#2018-09-0618:22theeternalpulseSeem to have an issue with projectile, sometimes certain files under a project seem to "disassociate" with the project, so when I go to helm-projectile it asks me to choose a project first. It has a git repot and some files work fine, but every now and then I'll have a disocnnect with the file and the project and have to renavigate.#2018-09-0714:21borkdudeWhen I am browsing files with emacs, e.g. C-x C-f (ido-find-file), how do I get the files in the directory showing below each other instead of next to each other.#2018-09-0714:37bostonaholic@borkdude ido-vertical-mode#2018-09-0714:38borkdudethanks!#2018-09-0714:38bostonaholichttps://github.com/creichert/ido-vertical-mode.el for the repo#2018-09-0714:38bostonaholicit’s on melpa, too#2018-09-0823:27Chasehello, i've been happily using spacemacs but find it so hard to resist trying to roll my own emacs + evil + clojure dev config. I want something to play around with when i'm too tired to put in the deep work needed to learn programming. is there any beginner resource you folks can point to for me to start building my own emacs config so I can have evil and cider up and running as I slowly play with adding org, magit, etc. to the mix?#2018-09-0906:04dadairI’d start with a bare .emacs.d and use use-package to slowly add new packages#2018-09-0911:00vemv@chase-lambert I'd start with spacemacs, and gradually abandon it if you're so inclined 🙂 And of course you can take the spacemacs (or other starter kits') source for inspiration. e.g. you wonder "how to setup Haskell? What packages to pick?" -> go and copy their config#2018-09-0911:03vemv--- Q: anyone knows of a way to do a 'double fuzzy search': first fuzzy-filter the search corpus (filenames), then the contents themselves#2018-09-0911:03vemvi.e. I want to find foo in all filenames that contain .sql#2018-09-0911:03vemv(I use helm-ag but other options welcome)#2018-09-0916:11dpsuttonYou can read bbatsovs prelude which is a traditional emacs init and use it as a guide template inspiration#2018-09-1012:59hlolliOne small detail with aggressive-ident mode. When you press enter(newline), the cursor stays at indented location and deletes all the space in the previous line, if it was empty, very good. But it doesn't do it with backspace, if the line above is empty, I would like it to move the cursor to indented location automatically, but not the the beginning of line. Is there a way to do this?#2018-09-1014:45j0ni@chase-lambert I didn't do the spacemacs route, but I found that starting with a config which was more traditional, in my case the "emacs starter kit", the now abandoned technomancy setup, followed by gradually replacing the things I used with my own config version, worked for me. I also used Bodil Stokke's emacs.d as a template for organizing stuff.#2018-09-1014:46j0niin the end I copy/pasted a dozen lines of esk that I was still using and uninstalled esk completely#2018-09-1109:25borkdudeIn my .zshenv I have some logging. This logging turns up in emacs when I do projectile-find-file. How can I suppress that? I tried using $INSIDE_EMACS but that won’t work#2018-09-1109:30borkdudemaybe I should log the stuff in zshenv somewhere else, but there’s only stdoud and stderr right#2018-09-1112:24bozhidarWhat exactly are you logging? I can’t understand how the shell config is interfering with Projectile.#2018-09-1114:06borkdudeI’m just echoing something at the start of my zsh session, like:
$ zsh
Loading zsh config from Dropbox
Using LOCAL RabbitMQ
Using LOCAL database
#2018-09-1117:38vemvperhaps a workaround would be to rename .zshenv -> exports.sh, and source that from .zshrc#2018-09-1117:39borkdudeI already have that kind of setup. The logging happens in a sourced file.#2018-09-1114:07borkdudeand I’m seeing this in emacs when doing projectile-find-file#2018-09-1217:53j0ni👋 hey, anyone know how to take a very long map literal which is on a single line and have emacs split it into 1 key/value per line?#2018-09-1217:56vemvI'd evaluate it at the repl and then (pprint *1) There may be a fancier way though 🙂#2018-09-1217:58j0nihmm, I guess that's ok 🙂 I often wish it was either part of or adjacent to C-c SPC#2018-09-1218:06j0nialso that solution isn't great with data that can't be trivially read back in like jodatime objects#2018-09-1218:08bozhidarSo, you want to reformat the literals in clojure-mode, right?#2018-09-1218:08bozhidarOr do something in the REPL?#2018-09-1218:08vemv@U06MD7077 - precede the expr by '?#2018-09-1218:09j0niclojure-mode#2018-09-1218:09j0ni@U051BLM8F ^^#2018-09-1218:10j0ni@U45T93RA6 ok#2018-09-1218:10j0ni@U051BLM8F my use case is that I often come to tests written by others which contain huge blobs of test data in the form of maps that have been captured during dev and pasted into the test files.#2018-09-1307:52bozhidarI see. Well, when you’re connected to CIDER you can certainly you the pretty-printing logic in a source buffer as well, but something to transform hash literals can easily be added to clojure-mode as well.#2018-09-1312:21borkdudecider-pprint-eval-last-sexp is usually what I use#2018-09-1316:24vemvIs there a way to customize how will hl-line mode will affect a given face that is unrelated to hl-line#2018-09-1316:24vemve.g. I have a custom font-locking that comes from a minor mode:#2018-09-1316:24vemv#2018-09-1316:24vemvbut when I place the cursor over there, hl-line-mode will make it unreadable#2018-09-1316:25vemv#2018-09-1316:26vemv(for clarity: as you might not see my hl-line is just another shade of dark grey)#2018-09-1316:50tanzoniteblack@vemv is https://stackoverflow.com/questions/17628985/how-to-set-a-buffer-locally-face-attribute-for-a-particular-buffer what you're looking for?#2018-09-1316:53vemvThanks for the suggestion! That seems to create a buffer-specific hl-line face, whereas I'm seeking a mechanism that says "if hl-line clashes with the specific face xxx, then use yyy as the background color"#2018-09-1317:05tanzoniteblackyou could probably do that by overwriting hl-line-make-overlay to put a custom face value based off something? But no, I don't know of any existing way to do this#2018-09-1317:08vemvSounds well-guided. Probably I'll simply choose less conflicting colors though 🙂#2018-09-1322:13Chaseso i'm playing with rolling my own emacs config instead of spacemacs. what do you folks think of this guide to get me going with cider/clojure mode? https://ccann.github.io/2015/10/18/cider.html Anything you would add or subtract? I'm trying to go as minimal as possible (while using use-package) as I actually finally sit down and learn Emacs. It's been a blast so far but I'm concerned I'm neglecting clojure learning while exploring the new toy.#2018-09-1406:24bozhidarI’ve got a super basic setup here https://github.com/bbatsov/emacs.d/blob/master/init.el#L362#2018-09-1406:25bozhidarI’d restrain from using clj-refactor.el at first in the interest of you having a smoother sailing.#2018-09-1406:25bozhidarOnce you get more comfortable with Emacs you can move to adopting it.#2018-09-1414:38zalkyHi folks, anyone who uses paredit know if it's possible to unwrap a sexp:
|(x y z)    =>   |x y z
Specifically, this is a forward unwrap, like smart-paren's sp-unwrap-sexp. I know there is paredit-splice-sexp but that unwraps the surrounding sexp, and is not as useful because navigating sexps usually leaves you at the beginning, not inside.
#2018-09-1416:05vemvCouldn't find it. A composite custom command could search-forward-regexp one of ([{", then call paredit-splice-sexp#2018-09-1417:04zalkyThanks for the response! That actually sounds fairly straight forward. But luckily, I was able to just bring in smartparens' sp-unwrap-sex without it interfering with paredit.#2018-09-1418:06vemvYeah, generally most SP functions (or any given mode's) don't need the mode to be active#2018-09-1518:26cmackI’m trying experiment with cider+nrepl+figwheel.main using “new” deps.edn method but am not having luck. Does anyone have an example emacs config or project config that is working with nrepl 0.4.5 and figwheel.main they could point me too?#2018-09-1518:45dpsuttonwhat are your symptoms @cmack?#2018-09-1518:46dpsuttoni used the following dir-locals to get it to use the correct alias:
((nil
  (cider-clojure-cli-global-options . "-A:fig")))
and we have the same type of project except that i'm not using nrepl 0.4.5
#2018-09-1518:50cmackOn the road again after car was repaired. Will post more when home#2018-09-1518:53dpsutton👍#2018-09-1519:35cmack@dpsutton the .dir-locals looks promising…#2018-09-1519:36cmackright now, I’m seeing
[nREPL] Starting server via /opt/local/bin/clojure -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"])'...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Exception in thread "main" java.io.FileNotFoundException: Could not locate cider_nrepl/main__init.class or cider_nrepl/main.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
#2018-09-1519:36cmackin messages buffer#2018-09-1519:37dpsutton
[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} cider/cider-nrepl {:mvn/version "0.18.0"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
this is what mine looks like. I wonder why yours doesn't specify coordinates for cider-nrepl itself
#2018-09-1519:40cmack
{:deps {org.clojure/clojure {:mvn/version "1.9.0"}}
 :aliases {:fig {:extra-deps
                  {org.clojure/clojurescript {:mvn/version "1.10.339"}
                   com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
                   com.bhauman/figwheel-main {:mvn/version "0.1.5"}
                   cider/cider-nrepl {:mvn/version "0.18.0"}
                   nrepl/nrepl {:mvn/version "0.4.5"}
                   reagent {:mvn/version "0.7.0"}}
                 :extra-paths ["resources" "target"]
                 :main-opts ["-m" "figwheel.main"]}
           :build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r"]}
           :min   {:main-opts ["-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}}}
is the deps.edn I’m working from… I think a good portion was generated from a reagent starter template
#2018-09-1519:52dpsuttonyou can take the rebel readline out. it won't place nice with emacs#2018-09-1519:54dpsuttondid you try the dir locals? I'm not seeing the alias in there#2018-09-1519:54dpsuttontry evaluating (hack-local-variables)#2018-09-1519:55dpsuttonthere's some logic in CIDER about whether to look for dir locals or not and i haven't followed the logic to understand when/if it does#2018-09-1520:01cmackhmm C-h a says the .dir-locals.el is being read… I’ll try hack-local-variables next#2018-09-1520:02cmack… still not seeing -A:fig injected#2018-09-1713:16plexusIt seems current versions of clj-refactor will eagerly load all files in your project when the process starts up... is there any way to turn this off?#2018-09-1713:20benedekif memory serves right it is off by default. you might have something in your config to turn it on#2018-09-1713:20benedekgive me a sec#2018-09-1713:21benedekmy guess would be that cljr-warn-on-eval is set to nil in your config plexus#2018-09-1713:26plexusah yes, you're right. When I do an operation and it needs to analyze the code I want it to just do it without asking, but it shouldn't load all code at startup.#2018-09-1713:33benedekhold on a bit#2018-09-1713:34benedekyou are right too ;)#2018-09-1713:35benedekyou still can have this set to nil but then you need to set cljr-eagerly-build-asts-on-startup to nil#2018-09-1713:35benedekthis indeed defaults to t#2018-09-1713:40plexusaha, good to know. Thanks for looking that up!#2018-09-1713:42benedeknw#2018-09-1713:42plexusA question for the Spacemacs users here, recently we made Sayid opt-in in the Clojure layer, and @bozhidar suggested doing the same for clj-refactor. Does that seem like a good idea? ( 👍 for making it opt-in, 👎 for keeping the current always-on default)#2018-09-1713:43plexusThis means you would have to do this to get clj-refactor back:
dotspacemacs-configuration-layers
'(...
 (clojure :variables clojure-enable-clj-refactor t))
#2018-09-1713:50benedekthere seems to be a #spacemacs channel#2018-09-1713:51benedekrelatively active?!#2018-09-1713:51benedeki am not following it so no real idea...#2018-09-1713:59jeff.terrellYep, it's fairly active. I'm in it. And I don't feel strongly either way about making clj-refactor opt-in.#2018-09-1715:23vemvCan I do something equivalent to git show 705e35b0 but that will use Clojure syntax highlighting? I was thinking of either: • using Emacs as a pager (current attempt will complain: emacs: standard input is not a tty) • Searching a magit/etc solution (not experienced with magit myself)#2018-09-1715:23vemv--#2018-09-1715:23vemvanother very similar command I'm targeting to replace would be git diff master. With both, I want to code-review myself#2018-09-1715:36vemvGuess that if this ticket exists, then it's hard 🙂 https://github.com/magit/magit/issues/2942#2018-09-1810:30stardivinerEmacs has a major mode javap-mode can view .class file. But I can't use javap-mode to view .class file in .jar file (which is opened in archive-mode in Emacs). Does anybody know how to handle this?#2018-09-1811:29vemvthere's an example of opening files-in-jars in the CIDER codebase which you may copy#2018-09-1812:16jumarIsn't cider-open-classpath-entry and then opening the class file an option?#2018-09-1904:44stardiviner@U06BE1L6T cider-open-class-entry open .jar file is same as open .jar file directly Emacs auto use archive-mode. Same as I do.#2018-09-1904:46stardivinerAfter I open the .class file. I run command javap-buffer. Got error:
Error: Can't found class: SpeechRecognizer
#2018-09-1906:21jumar@U28FF36Q4 Well, I guess the more interesting part is to open the class file itself which should show a decompiled class. I don't remember if I set up anything special but I think I didn't (I use spacemacs).#2018-09-1906:22jumarWell, not really decompiled but the kind of output you would get from javap#2018-09-2203:02stardivinerI tried Emacs open a plain .class file. It can be decompiled. But when class file in .jar archive file. it can't be decompiled. I submitted an issue https://github.com/hiredman/javap-mode/issues/7#2018-09-1913:01dpsuttonsetting up emacs on my girlfriends macbook and the terminal emacs doesn't receive C-<return> it only sees the unmodified return. Does anyone know how to simulate this event? Or make sure a terminal passes it through?#2018-09-1917:24tanzoniteblack@dpsutton depending on what terminal you're using (probably the mac built in one?) you probably need to go to it's settings and check it's keyboard shortcuts#2018-09-1917:25dpsuttonwas looking in iterm2 and didn't see an easy way#2018-09-1917:25dpsuttonunless there's an escape code for enter that i don't know#2018-09-1917:26andy.fingerhutThere are macOS GUI versions of GNU Emacs, too -- I haven't used that one for more than a few minutes as I have gotten accustomed to using the X windows version of Emacs on my Mac -- behaves mostly like the Linux version.#2018-09-1917:27dpsuttonyeah i run it just fine on my fedora machine. was getting it set up on a mac and got a little lost. Installed with brew and it seems to not have x11 support#2018-09-1917:32andy.fingerhutIf you want a macOS GUI, and GNU Emacs (i.e. not Xemacs), maybe this is worth a shot? https://emacsformacosx.com That is the one I tried briefly but decided I was OK continuing to use X windows on my Mac.#2018-09-1917:32dpsuttoni'll try that tonight. thanks#2018-09-1917:32andy.fingerhutI wouldn't suggest my personal choice for someone else who didn't need X windows, though.#2018-09-1918:09dorabbrew cask install emacs works well for me as a GUI version (not using X11). The C-<return> seems to work in the GUI version. When I run in Terminal with emacs -nw, C-<return> does not see to "work". So, perhaps has something to do with Terminal. Might want to look at Settings > Profiles > Keyboard.#2018-09-2008:50benedeki highly recommend https://github.com/railwaycat/homebrew-emacsmacport for a mac#2018-09-2015:06lilactownyup. This is the script I use to install the railwaycat/homebrew emacs: https://gist.github.com/Lokeh/7987c235065df0f2441577255da17614#2018-09-2015:25vemvwhy the osascript? I have ln -s /usr/local/Cellar/emacs-mac/emacs-*/Emacs.app /Applications/Emacs.app#2018-09-2015:43lilactownlets me use spotlight easier#2018-09-2015:44lilactownI usually start Emacs from spotlight, sometimes the dock. Almost never from the command line. so the osascript works a lot better for those#2018-09-2015:45vemvI also can see the ln'd Emacs.app in my Spotlight. No biggie anyway 🙂#2018-09-2015:47lilactownyeah I think it has to do with the order it shows up in spotlight? I had issues where it kept defaulting to some random file with Emacs in the name until I used the osascript version ¯\(ツ)/¯#2018-09-2015:18vemv--with-no-title-bars rocks as well 🙂#2018-09-2015:19vemv#2018-09-2015:19vemvI have the same for iTerm as macOS' colorful buttons are fairly useless in these cases#2018-09-2018:16kommen@benedek I use https://github.com/d12frosted/homebrew-emacs-plus, but it seems very similar. or am I overlooking something?#2018-09-2109:51benedekthis looks good too. but railwaycat actually installs an osx specific emacs#2018-09-2109:52benedekwhile this above installs a stock gnu emacs i think#2018-09-2109:52benedeksee details here about the port: https://bitbucket.org/mituharu/emacs-mac/overview#2018-09-2109:53benedeki guess the news-mac file is an interesting read as well if you want to asses this version#2018-09-2200:01vxerandom thought, if there was a wrapper around a C STM system, eg http://www.tmware.org/tinystm.html , could one implement clojure like concurrency primitives and load them as dynamic modules https://github.com/emacs-pe/emacs-modules ?#2018-09-2202:45richiardiandreaI don't see why not#2018-09-2203:23vxeasked on irc, general consensus is that STM isn’t that beneficial without accompanying immutable data structures#2018-09-2203:23vxeasked on irc, general consensus is that STM isn’t that beneficial without accompanying immutable data structures#2018-09-2218:00theeternalpulsehey, question. I'm doing this so that a plugin that expects a single symbol actually picks one from a random list, it seems to work but was wondering if this is the proper way. I basically want a function to be evaluated where a variable is expected.
(defun pick-random (list)
    (nth (random (length list)) list))

  (use-package circadian
    :ensure t
    :config
    (let ((dark-themes '(spacemacs-dark material-dark sanityinc-tomorrow-eighties))
          (light-themes '(spacemacs-light material-light gandalf sanityinc-tomorrow-day otmos-softer soft-morning)))
      (setq circadian-themes `(("8:00" . ,(pick-random light-themes))
                               ("19:00" . ,(pick-random dark-themes))))
      (circadian-setup)))
#2018-09-2218:04vemvcan you paste a failed attempt?#2018-09-2218:15theeternalpulsethis seems to work, though i'm pretty sure it doesn't evaluate each time since it evaluates only once at startup#2018-09-2218:17vemvAh, I got you now. I don't think want a function to be evaluated where a variable is expected is feasible. You'd have to open a PR against circadian to make things more dynamic#2018-09-2218:18theeternalpulseI figured, I thought elisp had some magic hybrid function/variable#2018-09-2309:53Andrea ImparatoI’d like to any evil emacs user here to use https://github.com/luxbock/evil-cleverparens, it basically changed my life since I discovered it 😄#2018-09-2503:20theeternalpulseI've always found the paren navigation keys in these and other ones not intuitive, do you keep the bindings or have custome ones for things like next/last paren/sexp/etc?#2018-09-2514:49Andrea ImparatoI kept the original bindings, they are quite intuitive honestly#2018-09-2514:49Andrea ImparatoI use mostly just > and M-(#2018-09-2511:58Macrozcider-test-run-ns-tests doesn't support ClojureScript?#2018-09-2512:12vemvIn case you appreciate the workaround, I normally send
(concat "(cljs.test/run-tests '" (cider-current-ns) ")")
to the repl with a shortcut
#2018-09-2512:08Macrozhttps://github.com/clojure-emacs/cider/issues/1268#2018-09-2512:08Macrozso what is help needed?#2018-09-2512:14Macrozmaybe this should be on cider#2018-09-2518:50gis there any way to get the REPL's test definitions of a namespace to reflect what's saved in the buffer?#2018-09-2518:50gfor example, i've defined two tests .. but now i've removed one, and i'd like it to not be run anymore#2018-09-2518:51gactually, bleh. this is probably also a cider question#2018-09-2519:40bostonaholicyou could use ns-unmap manually#2018-09-2520:01gthanks!#2018-09-2607:01bozhidar@gtzogana There’s also cider-undef.#2018-09-2607:01bozhidarUsing cider-ns-refresh should also help with this.#2018-09-2715:47stardivinertest#2018-09-2715:55bozhidar@stardiviner It works!#2018-09-2813:58andrea.crotti@gtzogana sometimes I just redefine the test as empty 😄#2018-09-2813:59andrea.crottiso it means it still runs but at least it passes quickly#2018-09-2821:29theeternalpulseHow do I prevent "buffer creep" in the sense that I can dedicate workspaces to only allow buffers to come into view if they are part of a specific project?#2018-09-2902:15vemvprojectile-switch-to-buffer might be a good start#2018-09-2913:25theeternalpulseI use that all the time, but it's prev-next buffer that isn't aware of projects. I started to look into making a next/previous buffer for projects but wanted to see if there's an equivalent. Basically I want to dedicate a layout to a specific project.#2018-09-2913:30vemvI use such an approach, it works great but it's too tailor-made to share it (yet) Basically I have a hashmap mapping project-id -> filename-list, and my next/prev buffer functions shift the order of those lists by one position#2018-09-2913:34theeternalpulseWhat are some of the vars you use to build the list, if you can could you sahre it in a gist, I'm curious to build on it#2018-09-2913:37theeternalpulseI wanted to do something like check if the next buffer was in the same layout, if not then go to the nearest one that was, and vice versa for previous#2018-09-2913:37theeternalpulsejust found the code for next-buffer pretty involved#2018-09-2913:42vemvhttps://github.com/vemv/.emacs.d/blob/181f8175480c45fc020ee68e0a39ef985b2b8166/lib/non-submodules/vemv.project-interaction.el#L176 • The code uses a fixed layout: (vemv/safe-select-window vemv/main_window). vemv/main_window is the window where I open all my project-specific file buffers (other buffers may temporarily hijack it as well) • Only 3 function calls in this body are relevant to the 'algorithm': (vemv/clean-chosen-file-buffer-order), (switch-to-buffer ..., (puthash ...#2018-09-2913:42vemvHope it helps!#2018-09-3003:03theeternalpulseI'll take a look, thanks#2018-09-2920:22Chaseso i'm slowly building up my init.el for the first time and haven't yet decided between smartparens, paredit, parinfer, or lispy and am not using any of them right now so I don't get any auto closing paren goodness yet which is fine. one thing i do love though is that C-RET in the Repl just completes all my ending parens for me before evaluating. is there a way I can get that functionality in my actual code buffer?#2018-09-2920:25vemvParedit (and presumably others) complete ) for (s, and ensure that you can't delete )s in a breaking manner So that feature (as I understand it: infer and repair paren state before saving a buffer, or eval'ing it) might be unneeded?#2018-09-2920:28Chasetrue. i definitely plan on learning one of those tools for moving and restructuring s-expressions as such. right now i'm trying to limit adding one more big thing to the learning list as I'm also in the early stages of my programming (and clojure and vanilla emacs) journey. So i was just curious if i could get that ending parens help before I dive into the heavy tools. that cider repl feature is super handy with my current work flow. no biggy though#2018-09-2920:31vemvYou defo can use Paredit just for the mentioned aspect, without having to learn any shortcut. I use classic paredit (v 22, from 2010). There's a newer version, but it's a beta. Continues to work flawlessly for me 🙂#2018-09-2920:32Chasefair enough, makes sense. i know myself though and there is no way i'm going to resist the temptation to try out all of them and tinker, tinker, tinker. lol#2018-09-2920:34ChaseAnother curiosity: I also see a lot of people say as their clojure ability advances they end up just evaluating s-exp in the buffer itself instead of typing in the actual repl. i can see myself drifting to that but when they say that are they usually meaning they still have the repl in view in a split window or that they don't even have it in sight? I find a lot of the inline evaluation in my code buffer just shows me nil or whatever which isn't so helpful in this learning phase. i like to play around with the functions, trying new things and looking up docs while in the repl. are they doing this within their actual code buffer instead?#2018-09-2920:34Chaseapologies for the verbosity, that seems to just be what i do when thinking of how to ask this stuff#2018-09-2920:37vemvThis menu gives you functionality for both kinds of evaluation:#2018-09-2920:41Chasedefinitely. i have my handy cider cheat sheet near with the keyboard commands for those evaluations. i was just curious if people are really exploring around and building up functions within their actual code buffer vs doing it in the repl until they have the function they want and copying it over to the code buffer. maybe i'm too infatuated with how cool the repl is#2018-09-2920:52vemvI use a hybrid, described in this docstring https://github.com/vemv/.emacs.d/blob/ad96020c772b05d018feb39b94563c4b0b492342/lib/non-submodules/vemv.lang.el#L9#2018-09-2920:53vemvSo I author a .clj namespace within the file buffer itself. From time to time I'll vemv/send some sexprs (like defuns, but also experiments). Or I'll just eval the whole buffer if there's no need for being incremental#2018-09-2920:57Chasecool beans. i'll bookmark for the future. and this just adds another notch on my growing emacs infatuation. how cool is it that you code up some lisp (another infatuation!) to make this cool tool do what you want. i'm loving this stuff!#2018-09-2922:59andy.fingerhutIf you prefer to run bits of code purely in the REPL, and only after it is something you want to keep, copy it into a buffer that gets saved, no one is going to stop you 🙂 I get the impression that Stuart Halloway does all of his code entry in the window/buffer that gets saved to disk, and the only expressions he evals in the REPL are sent from that buffer: https://github.com/matthiasn/talk-transcripts/blob/master/Halloway_Stuart/REPLDrivenDevelopment.md#2018-09-3000:23lilactown(related) I just found out that CIDER has a function for evaluating and printing the return to a comment#2018-10-0106:23bozhidar@vemv According to the changelog the newest stable version is 24 https://mumble.net/~campbell/emacs/paredit.release#2018-10-0106:23bozhidarI see 25 is marked as beta. Not a big deal, though. The paredit documentation is notoriously hard to find. 🙂#2018-10-0106:26vemvgood to know that paredit isn't as rusty as I thought 🙂#2018-10-0106:28bozhidarYeah. It’s amazing that its author worked on it for so long. My oldest project (Projectile) is now 7 years old and this seems like forever to me. paredit is probably 20 years old or something like this.#2018-10-0106:30bozhidarAnd I just noticed CIDER is 6 (started in 2012). They grow up so fast! 😄#2018-10-0106:31vemvthe other day I noticed this, made me smile#2018-10-0106:32bozhidarYeah, I certainly didn’t see this coming. I started Projectile because I had some issues with find-file-at-project back in the day and in the beginning it had 0 configuration, only native file indexing and only one interactive command. 😄 I’m still puzzled how things got where they are today. 😄#2018-10-0200:36aganyone else having problem with doc functions? e.g. C-c C-d C-r, C-c C-d C-d… first of all they ignoring cider-prompt-for-symbol and prompt all the time. Even when you type the right thing, it would say “Symbol not resolved”#2018-10-0200:36agwhat gives?#2018-10-0200:40agCIDER 0.18.1snapshot (package: 20180930.1836)#2018-10-0200:54agoh well… it seems it really requires ns to be loaded to the repl in order to be able to evaluate the forms. Sounds kinda silly. At least cider-grimoire-web should not require to be connected and loaded in order to grab the docs#2018-10-0202:18richiardiandreaThere is very little static analysis in cider but probably the symbol at point plus the namespace for core functions should be easy to do statically. If you open an issue I will try to investigate, no promise though - @ag #2018-10-0208:51orestisI’m torn. I love the Evil keybindings, I love the “don’t think about it too much” of spacemacs and its somewhat uniform interface, but I hate the fact that I can’t debug any issues that crop up when I’m using it, because too many moving parts and abstractions. What alternatives are there to have a reasonably well-behaved Emacs distribution that doesn’t try to be too clever and also plays well with Evil keybindings?#2018-10-0216:07aguse spacemacs's base distribution. bare bones. add your own layers on top of it#2018-10-0408:40plexusI have tried this but consistently ran into issues where I had to manually patch things. Spacemacs's layers are not tested to work independently, lots of hidden dependencies between them.#2018-10-0214:06bhauman@orestis I always start with the base installation and layer the least amount of features on it as I can get away with.
#2018-10-0214:07bhaumanthis has served me well for years#2018-10-0214:07bhaumanthis does mean that I don’t have the latest cool features#2018-10-0214:07orestisI’m starting to see the value of this 🙂#2018-10-0214:08bhaumanbut my set up never takes more than an hour from scratch#2018-10-0214:08orestisMy only gripe is that I’m so used to use the vim keybindings to move around so using any other editor than Vim or Evil Emacs is painful these days, otherwise I’d just buy IntelliJ IDEs and be done with it.#2018-10-0214:08bhaumanoh I’m not saying don’t use evil mode#2018-10-0214:08bhaumanI’m just saying that you can install emacs and then install evil-mode#2018-10-0214:09bhaumanand cider#2018-10-0214:09bhaumanand paredit#2018-10-0214:09bhaumanand hook them up to work the way you want them to#2018-10-0214:10bhaumanbut the less packages you have the better off your experience is going to be IMHO#2018-10-0214:12orestisOne issue that I have had in the past is that if you have to use multiple languages for some reason, your nicely configured editor breaks down pretty fast. I’m sure I’m doing something wrong but this is the value of using some pre-configured thing. But I guess I just need to read up on how emacs actually works. I spent the time on Vim ages ago and it still serves me well, so I guess another investment might make sense at some point.#2018-10-0214:12orestisAnyway I’m just rambling now 🙂#2018-10-0214:13bhaumanah I could see that being a problem for evil mode#2018-10-0214:13bhaumanI don’t have any experience with it#2018-10-0214:15bhaumanhttps://github.com/noctuid/evil-guide#2018-10-0214:15bhaumanthat looks like a good resource#2018-10-0214:43dadair@orestis there is also doom-emacs which is lighter than spacemacs but more “out of the box” than rolling your own#2018-10-0214:43dadairBelieve it defaults to vim bindings as well#2018-10-0214:56mattlydoom emacs is great, though its development lifecycle is approaching that of spacemacs: just stay on "develop" and hope things don't break#2018-10-0215:03orestisI hate that. This is what prompted me to look outside of spacemacs in the first place. #2018-10-0215:04orestisAny experience with prelude? I hope its a bit more stable coming from that particular author :)#2018-10-0215:06borkdudeI have used prelude for years. it’s great if you ask me.#2018-10-0215:06borkdudestable: depends on what packages you use. 😉#2018-10-0215:09mattlyone plus for doom-emacs though, it is under very active development largely by its original author#2018-10-0215:09mattlyhe's just kept pushing the 2.1 release out so now "develop" is ~3k+ commits ahead of the last release#2018-10-0316:58orestisWell, mv .emacs .emacs.backup and for the first time I’m following the emacs tutorial 🙂#2018-10-0321:06ChaseSomething I just learned is if you start emacs with emacs -q it will open it without loading your config.#2018-10-0317:42orestisTutorial finished, going well so far. I can’t believe I was using evil mode all these years and didn’t know some of those things. It feels slower to have to prefix everything with C-<something> all the time, but IME writing Clojure so far, I don’t need all that vim-fu that efficiently allows you to slice and dice text.#2018-10-0320:51ChaseTake a look at this if you decide to roll your own configuration: https://huytd.github.io/emacs-from-scratch.html#2018-10-0320:54ChaseI found this the most straight forward "I want to build my own kind of Spacemacs" guide. That being said, I ultimately decided to leave out Evil and just learn the Emacs bindings first so I could utilize all the great Emacs guides out there. In a surprise upset, I've found I actually really enjoy the Emacs keybindings way of things. I think it might be a better fit for me than modal editing. I had already remapped Caps Lock to Control when using Vim and would highly recommend doing so whichever route you take.#2018-10-0320:55ChaseWith this, to get started with Clojure just use use-package to add Clojure mode and Cider. You can google around for minimal ways to do that. Start small and slowly configure as your learn your work patterns.#2018-10-0406:26orestisThanks @chase-lambert! I love Vim keybindings when moving around code, since they are objectively more ergonomical. But I am now learning the pure Emacs way, I have a hunch it’s a better fit for Lispy stuff. Plus yes, all the guides out there really are made for the default keybindings.#2018-10-0418:53ChaseI can agree with this. One thing I started doing with Vim (and I was never a huge power user) and now with Emacs keybindings is using search to navigate as quickly and efficiently as possible. C-s really gets me somewhere pretty fast and I still have a lot to learn in terms of navigating in such a manner. Something to think about if you aren't already doing so.#2018-10-1413:30practicalli-john@U7PBP4UVA I have made the transition the other way, from Emacs to Vim bindings. As a long term Emacs user, I find Vim keybindings so much faster and easier to type. I use Spacemacs as my base configuration, as it provides Vim bindings for all modes. There is also lisp state which is great for structural editing of lisp code.#2018-10-0407:24bozhidar> he’s just kept pushing the 2.1 release out so now “develop” is ~3k+ commits ahead of the last release#2018-10-0407:24bozhidarWow!#2018-10-0407:24bozhidarWell, I think Prelude doesn’t have so many commits for its entire existence. 😄 I wonder what those people are doing - that’s just an Emacs config after all. 😄 😄 😄#2018-10-0407:25bozhidarAs a comparison - my personal config has just 71 commits (https://github.com/bbatsov/emacs.d)#2018-10-0407:31orestisSo you don’t use prelude @bozhidar ?#2018-10-0407:39orestisAaargh, I thought I was done with editor customization but it’s sooo addictive :)#2018-10-0407:46bozhidarIt used to be my own configuration for a long period of time, but then I got annoyed that I had to add a lot of flexibility there, which I didn’t really need myself, as I know exactly what I want to use. It also became harder to make baseline changes, as I had to think about impacting the users. At this point I decided that Prelude and my config become separate things. 🙂#2018-10-0407:47bozhidarIn general I think that most Clojure devs need simply a 100-lines of config with 5-10 packages in it and they’ll be fine.#2018-10-0407:48orestisYeah, that’s the direction I’m going for. For JS stuff I’ve resigned myself to VSCode these days. #2018-10-0407:49bozhidarDid you try https://indium.readthedocs.io/en/latest/?#2018-10-0407:49bozhidarI’m not into JS, but it looks pretty sweet.#2018-10-0408:02orestisInteresting, I’ll have a look. #2018-10-0408:03orestis Vs code has some pretty nice static analysis which is very useful when exploring a codebase. #2018-10-0408:04orestisWhich is I think something of a divide between tools. Modern IDEs seem to target exploration, old editors creation. Perhaps I’m just making things up though :)#2018-10-0408:54bozhidarVery interesting perspective!#2018-10-0408:56bozhidarI have to say I somewhat agree with it - I recall I was thinking along the same lines when I made the switch from IDEs to Emacs. The exploration features of the ide-s were something I really missed (especially for Java development). Turned out that if you put your mind to it you can get similar results with Emacs and Vim, but it’s certainly non-trivial to get there. 🙂#2018-10-0411:29theeternalpulse~I've switched to ivy and noticed all my ivy related searches start with ^. I can't seem to find the setting specifically for the initial search pattern in ivy, is something else controlling this?~ actually I somehow got a search to find an article with the ^ https://oremacs.com/2016/01/06/ivy-flx/#2018-10-0421:51Chasei'm probably in an extreme minority but so far i am not liking how heavy handed the auto pair-ing functionality works in things like paredit (like I can't delete the closing paren) and smartparens, etc. Tbh, I always struggled with that in vim too. Right now i just want to go super minimal on that stuff. rainbow delimiters lets me see if i have parens balanced for now. but i know i will definitely want to have structural editing of s-expression capability, right? does emacs have built in functionality for that? if not, what is the most non invasive way to go about this? do some folks actually find they are ok without it or am i getting too minimal here and really holding myself back?#2018-10-0421:57dpsuttoni'm not sure i follow. if you don't have balanced parens at all time how could you do structural editing?#2018-10-0421:58Chasehmmm, that's a good point. but why can't i just be balancing the parens myself?#2018-10-0421:59Chasei'm still in the learning phase so most of my programming is following along in books and tutorials and writing small functions. a lot of stuff straight in the repl. maybe i'm not grasping just how unwieldy it will eventually get?#2018-10-0422:03dpsuttonwell you can#2018-10-0422:03dpsuttonbut it will probably often do the wrong thing. "kill until this closing parens" will wipe your buffer if there is no closing parens#2018-10-0422:04dpsuttoni can't imagine when i would ever not want a closing paren. And since everything is balanced, I can easily slurp things in, or delete entire forms at a time, etc#2018-10-0422:05Chasei see where you are going with this. in my head i was thinking you are using structural editing on an already completed function and s-expressions that you want to edit.#2018-10-0422:06Chasemy main workflow is putting things in the repl so without that closing paren I can just hit enter and enter the rest of the expression like normal without it evaluating. then when i'm ready i hit Ctl-Enter and it autocompletes all the closing parens needed and evaluates. I'm suspecting this is not an idiomatic way of developing in clojure#2018-10-0422:06dpsuttonah. yes i do something to inhibit evaluation as well#2018-10-0422:07dpsutton
(define-key cider-repl-mode-map (kbd "RET") #'cider-repl-newline-and-indent)
(define-key cider-repl-mode-map (kbd "C-<return>") #'cider-repl-return)
#2018-10-1413:35practicalli-john@U11BV7MTK Excellent. I was just about to figure out how to do multi-line editing in the repl buffer, so thanks for sharing.#2018-10-0422:07dpsuttonmakes a world of difference#2018-10-0422:07dpsuttoni want enter to give a new line and control enter to "submit"#2018-10-0422:07dpsuttoni think cursive it like this and it is super nice#2018-10-0422:07ChaseAha! This might be exactly what solves my pain point. Thank you!#2018-10-0422:07dpsuttonyes i have felt that pain. i think this will be much nicer for you as you learn to use structural editing#2018-10-0422:08ChaseSo what do you prefer for your auto pairing/structural editing while I have ya?#2018-10-0422:08dpsuttonare you using terminal emacs or gui?#2018-10-0422:08Chasegui#2018-10-0422:08dpsuttonok good. i ran into some issues ensuring there was a control-enter in terminal emacs on osx. but shouldn't be a problem for you#2018-10-0422:08dpsuttoni use paredit. It's less "magical" and therefore predictive. I haven't ever used parinfer and i've heard some people rave about it though#2018-10-0422:09Chasei'm using use-package so where exactly do i put those two functions?#2018-10-0422:10Chasei think i will just go back to trying to learn paredit too.#2018-10-0422:10dpsutton
(use-package foo
  :init
  (setq foo-variable t))
#2018-10-0422:10dpsuttoni think you put it in an :init form. I don't use use-package though so i'm not positive#2018-10-0422:20Chasecan't get it to work. i'll keep trying though, i think that is basically exactly what i wanted without realizing it.#2018-10-0422:23dpsuttonwhat are your symptoms of it not working?#2018-10-0422:24dpsuttonerror message or it just doesn't seem to take?#2018-10-0422:24dpsuttonand did you put them there and then restart emacs? if you eval them manually do they work?#2018-10-0422:24dpsuttonuse package is macro-y so you probably want to put them there and then just eval-expression on those forms so they work now#2018-10-0422:25Chasegot it! I just didn't have it in the right spot. sweet! thanks a bunch. I'm probably too attached to this way of working but for now it works for me and now i can slowly learn paredit without it completely overhauling my learning workflow#2018-10-0422:26dpsuttonmake emacs work for you 🙂#2018-10-0422:28Chasei'm so geeking out over emacs/lisps! i'm wondering if use-package goes against my trying to have real control over my config and learn emacs from "first principles" minimalism kind of reboot. i always loved vim-plug though cuz it just works and it is dead simple.#2018-10-0422:30dpsuttoni think use-package gives you quite a bit of control and makes sure you do lots of things right. it makes it quite nice. if i were to start over i'd probably use it#2018-10-0422:30dpsuttonit's also from the current maintainer of emacs so it's got some real quality behind it#2018-10-0422:32Chaseawesome. i appreciate all the advice#2018-10-0423:14dadairThere is a youtube video where the creator of use-package shows exactly how it works (he shows what it macroexpands to in different situations). That might lift the veil.#2018-10-0502:04fedregI have to work on a small Java project 😞 and have never used emacs for Java. Is it doable or should I just use IntelliJ for the Java? If anyone uses emacs for Java and could point me to their config I would greatly appreciate it! thx!#2018-10-0505:09andy.fingerhutOK, I may be in the minority here using inf-clojure instead of Cider, but inf-clojure creates a command inf-clojure-eval-last-sexp that sends the expression before point to the REPL buffer and evaluates it. At least with the version I am using, it does not cause the REPL buffer to show the expression, only the output from evaluating it. I'd like a similar command that shows the expression in the REPL, too, so when I am reading through the REPL I can see what was being evaluated, not only its output.#2018-10-0618:24benzapOff-topic, but do you have an elisp config that juggles between using inf-clojure and cider? I would be interested in knowing how that's done#2018-10-0618:24benzapI'd like to do development and cider, and then maybe try and spin up a inf-clojure repl for a production server#2018-10-0508:36bozhidar@andy.fingerhut I think we already have this command. Let me just see how it was named. Something like insert-and-eval#2018-10-0508:40bozhidarAh, actually there are such commands only in CIDER. They blur in my mind from time to time. Please file a ticket for this and I’ll get it done when I can. I don’t pay much attention to inf-clojure these days (too many projects going on), but for someone I respect so much I can add a couple of simple commands. 🙂#2018-10-0510:03andrea.crottisomething quite strange happening this morning, I fire both Clj and Cljs repls#2018-10-0510:04andrea.crottithe repl is connected since I can do (js/alert ) from it and auto reloading works#2018-10-0510:04andrea.crottibut I can't evaluate anything in the cljs files, it says the Repl is not connected#2018-10-0510:05andrea.crottiit was working yesterday and I didn't really change anything, I also moved from 0.18 stable to the 0.18 snapshot#2018-10-0510:05andrea.crottimaybe it's something to do with the project itself, but still is there a way to try to assign a repl?#2018-10-0510:05andrea.crottior any idea why this problem could occur?#2018-10-0510:12andrea.crottiuhm in another project it all works as usual, so never mind#2018-10-0510:12andrea.crottisomething messed up with my project maybe#2018-10-0514:56bozhidar@andrea.crotti In the 0.18.1-snapshot branch we only have a few small bugfixes. Nothing significant has changed.#2018-10-0515:01andrea.crottiI'm actually really confused about what's going on, I tried now on another machine as well and it's the same thing#2018-10-0515:01andrea.crottiI also disabled the cider-default-cljs-repl and selected Figwheel at start#2018-10-0515:02andrea.crottiit seems to all work correctly, the cljs repl stays in pending cljs and then renames to "*cider-repl personal/elo:localhost:39591(clj)*<2>"#2018-10-0515:02andrea.crottino errors at all in the JS console or in the cljs repl though, which still works if I call something directly#2018-10-0515:03andrea.crottibut it's not linked correctly so any evaluation in a cljs file doesn't work#2018-10-0515:11andrea.crottialright I found the problem
-                   [com.cemerick/piggieback "0.2.2"]
+                   [cider/piggieback "0.3.9"]
#2018-10-0515:12andrea.crottiso probably it just stopped working with 0.1.8 and that old version of piggieback#2018-10-0515:17lilactown@andrea.crotti you probably just saved me a bunch of work figuring out the same issue. haven't been able to evaluate in a CLJS REPL in a certain project since updating CIDER/etc.#2018-10-0515:19andrea.crottihehe in your welcome @lilactown#2018-10-0515:19andrea.crottiI only found out by checking out the cider docs related to figwheel again#2018-10-0515:19andrea.crottiI didn't even rememberh that piggieback was moved#2018-10-0515:19andrea.crottiand it's particularly nasty since I could not find a single error#2018-10-0515:21andrea.crottimaybe an extra assertion somewhere might help @bozhidar? for example to make sure you have a recent version of piggieback?#2018-10-0515:22lilactownhmm actually that didn't fix it lol. I notice that when I connect, I get a message version-to-list: Version must be a string#2018-10-0515:22lilactownI'm connecting remotely to a shadow-cljs server#2018-10-0515:23andrea.crottimm no it's not the same thing then#2018-10-0520:47bozhidar> maybe an extra assertion somewhere might help @bozhidar? for example to make sure you have a recent version of piggieback?#2018-10-0520:48bozhidarYeah, I’ve been planning to do this for a while, as many people were bit by this. Haven’t had much time for CIDER the past few weeks, though.#2018-10-0520:49bozhidar@lilactown Can you share with us some more context - e.g. the whole stacktrace?#2018-10-0522:48lilactownthat's the only thing I see in messages. I'm not emacs-savvy enough to get anymore#2018-10-0809:03solfQuestion about org-emacs agenda: what does SPACE do in org-mode agenda view? It says it's for :tag-char but I can't find what it is#2018-10-0809:52benzapthe spacebar?#2018-10-0809:52benzapYou could try C-h k SPACE to get the command that it's calling#2018-10-0809:53benzapThat's Control+h, then hit the space bar#2018-10-0809:54benzapIf you want a list of all commands that are bound for your major-mode + minor-mode's, you can run C-h m#2018-10-0810:01solfsorry it's not SPACE directly, it's when you enter / then SPACE. It's not a key in a keymap, I traced the code:
(or (eq char ?\s)
	  (setq a (rassoc char alist))
	  (and tag (setq a (cons tag nil))))
#2018-10-0810:01solfnow to find out what that does :d#2018-10-0920:38fabraohello all, why emacs is inserting [clojure.test :as t] when I create a file core.clj#2018-10-0921:01adamfreythat is automatic functionality provided by clj-refactor: https://github.com/clojure-emacs/clj-refactor.el/blob/master/clj-refactor.el#L1043#2018-10-0921:01adamfreyif you check out that file you can come up with ways to customize or disable that behavior#2018-10-0921:46fabraowell but why in .clj not only in _test.clj?#2018-10-0920:38fabrao?#2018-10-1015:20lilactownI'm trying to use magit to rebase. I keep getting in a state where I resolve a conflict while rebasing, save the file, and then instead of it being staged the changes are not staged and magit shows the particular commit as gone#2018-10-1015:38lilactownalso the auto-staging when I save is infuriating. I almost threw my computer through a window just now because I decided to try and rebase manually from the command line and magit / spacemacs / something kept sticking it back in that weird state when I saved the file from vim 😡#2018-10-1015:38dpsuttoni've never heard of auto-staging. could it be vim is auto staging?#2018-10-1015:40mgrbytesuspect this is something in spacemacs, never had magit "auto-stage" anything#2018-10-1015:40lilactownnope. it's definitely magit in Emacs#2018-10-1015:40lilactownprobably true. I am using spacemacs#2018-10-1015:41lilactownOK this is definitely a git issue. I modified the file to fix the conflicts, staged it, and now the changes are gone and I can't continue ¯\(ツ)/¯#2018-10-1015:42lilactownby "changes gone" I mean that they don't show up as staged after adding the file#2018-10-1015:43mgrbytechecked your gitignore file?#2018-10-1015:44lilactowndefinitely not ignored#2018-10-1015:45mgrbyte¯\(ツ)/¯ then, sorry!#2018-10-1015:47lilactownyeah I think I screwed up the history somehow. I think what happened is I branched off of this feature branch, merged master in, then merged to master, now I'm trying to rebase and it's getting multiple commits for the same changes#2018-10-1015:48lilactownso now I'm trying to rebase like a newb and it's not happenin'#2018-10-1217:27zalkyHey all: I need a function that is basically a predicate for whether or not I'm writing lisp code. I was thinking I could set a buffer local variable via a lisp-mode-hook, and then just check the value of that variable, but there's probably a easier way, no?#2018-10-1307:44plexus@zalky you're looking for (derived-mode-p 'lisp-mode), but note that clojure-mode doesn't derive from lisp-mode, but clojurescript-mode does derive from clojure-mode, so this should work: (derived-mode-p 'lisp-mode 'clojure-mode)#2018-10-1314:05zalky@plexus, awesome, that works great, thanks!#2018-10-1317:35Chasei think i'm confusing myself on workflow. what i would like to do is be in the source file and have the repl opened in a split window. then at the end of an expression i want to send it to the repl, evaluate it, but stay in my source file. i can't seem to find the right command to do that. i can send to the repl but it doesn't evaluate so if i send something else it tacks it on to the end of the last thing I sent.#2018-10-1319:15dpsuttonthere are insert commands. check out
(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-after-insert-p nil)
@chase-lambert
#2018-10-1320:07Chaseawesome stuff. I put that in my config and now C-c M-p does exactly as I wanted. you are my emacs guru, man. Thanks a lot!#2018-10-1320:32dpsuttonOh I think there's a map at c-c m-j that includes d,e, and r for defun expression and region just like the eval map#2018-10-1320:32dpsuttonI'm not at a computer so I'm trying to query my muscle memory for the chords#2018-10-1320:34ChaseC-c M-j is what i use for cider jack-in. not sure what you mean in the 2nd part of that sentence. eval map? I assume these are some cool new tricks for me though#2018-10-1320:48dpsuttonYou're right. Maybe c-c c-j. #2018-10-1320:49dpsuttonhttps://github.com/clojure-emacs/cider/pull/2319/files#2018-10-1320:50dpsuttonThere's the pr for it#2018-10-1321:02Chaseahh, ok. I think I am getting it. C-c M-p like I discovered above runs cider-insert-last-sexp-in-repl just like C-c C-j e does. So I do need to keep those config changes in my file for it to still have the behavior I want of eval-ing in the repl but keeping me in my source file. C-h k was so useful for just now exploring that. Emacs is so cool!!!#2018-10-1622:44danielcomptonDoes anyone know why lots of elisp files end with something like ;;; my-file.el ends here?#2018-10-1622:44danielcomptonIs it for licensing delineation or debugging or ?#2018-10-1622:47dadairhttps://emacs.stackexchange.com/questions/12115/why-do-elisp-files-have-end-of-file-comments/12117#2018-10-1623:43practicalli-johnI am wondering how common it is to write code directly in the Clojure REPL buffer. Currently the default seems to be set for single line expressions as RET evaluates the function in the REPL buffer. Wondering how much impact a change would be to use C-RET to evaluate and RET to start a new line and indent.#2018-10-1623:44andy.fingerhutSome people prefer always writing code in a saved/saveable buffer first, then evaluating it in the REPL from there, so they have a long-term record of expressions they have evaluated, and all the power of their code editing mode to do it with.#2018-10-1623:46andy.fingerhutStuart Halloway advocates for this approach in his talk "REPL driven development": https://github.com/matthiasn/talk-transcripts/blob/master/Halloway_Stuart/REPLDrivenDevelopment.md starting around time 29:50#2018-10-1701:02dpsutton@jr0cket that's the setup I use. I can't imagine going back. #2018-10-1701:03dpsuttonIf it eagerly evaluates it makes it feel limited to only trivial calculations#2018-10-1701:46practicalli-john@andy.fingerhut sorry, I should have been clearer. If the default key binding in a REPL buffer for evaluating an expression was changed to C-RET, how many people would this annoy, anger or confuse. I don’t use the REPL buffer myself, hence the question. It seems Dan and I make two votes for such a change, so 2-0 so far.#2018-10-1701:49practicalli-johnI use the code buffer pretty much exclusively, unless I debug with printing. I’ve long been doing the journaling of the design choices (I call them REPL experiments) that Stuart talks about in the running with scissor talk. #2018-10-1701:52practicalli-johnHowever, the REPL and REPL history experience seems to be broken in Spacemacs (Evil state). While looking into that I noticed the REPL buffer didn’t do multi-line. Every other editor and even the Clojure CLI tools with rebel.readline does multi-line, so this behaviour now seems to be the norm.#2018-10-1702:56dpsuttoni think rebel readline does multiline by unfinished parens. I don't much like this approach but I think @richiardiandrea built a clever feature that will auto close all parens and eval if that's the way you like to work#2018-10-1703:41richiardiandreaWell not even mine, but I think I would be able to dig it up from my emacs conf 😃 #2018-10-1703:48dpsuttonI thought you committed that to cider#2018-10-1704:18richiardiandreaUhm if I did that I do not remember 😄 #2018-10-1708:56bozhidarI always code in a source buffer and just send stuff for evaluation to the REPL. From time to time I might do some experiments in the REPL itself, but that happens pretty infrequently.#2018-10-1708:57bozhidarI did a (bad) demo of my approach a while ago https://www.youtube.com/watch?v=aYA4AAjLfT0#2018-10-1708:59bozhidar> However, the REPL and REPL history experience seems to be broken in Spacemacs (Evil state). While looking into that I noticed the REPL buffer didn’t do multi-line. Every other editor and even the Clojure CLI tools with rebel.readline does multi-line, so this behaviour now seems to be the norm.#2018-10-1709:00bozhidar@jr0cket not sure what you mean by this. CIDER’s REPL does multi-line just like any other Emacs REPL (using unfinished expression or C-j) and that’s properly reflected in the history.#2018-10-1711:00practicalli-john@bozhidar its Spacemacs Evil specific and I've been thinking about how to improve this in the Spacemacs clojure layer config. C-j is used for traversing history so cant be used for insert-and-indent in the REPL buffer and the REPL buffer keybindings only works in Evil insert or Emacs state#2018-10-1711:38jumarI use evil mode and find C-j behavior perfectly acceptable. Not sure what you're talking about.#2018-10-1712:02practicalli-johnYes but the C-j is for traversing REPL buffer history in Spacemacs Clojure layer, not for cider-repl-newline-and-indent. In the Cider docs it defines C-j as the keybinding for newline interaction in the repl, but the repl history in Spacemacs over-rides this. https://cider.readthedocs.io/en/latest/using_the_repl/#customizing-newline-interaction#2018-10-1717:31llsouderI have [cider/piggieback "0.3.9"] in my project.clj but emacs give me an error that it is missing cemerick piggieback. I have search my project, .lein and .emacs for a reference to cemerick and cannot find one. I also did a lein deps :tree#2018-10-1717:52dpsuttonWhat version of cider are you running#2018-10-1717:59llsoudercider 0.17#2018-10-1718:04llsouderHow do I control the version of cider? I just checked out my spacemacs config SPC f e d and I dont see any version numbers.#2018-10-1718:13dpsuttonso that was in the transition period of cider towards cider/piggieback from cemerick/piggieback. and that may predate cider/piggieback so it doesn't know that that is an acceptable solution#2018-10-1718:14dpsuttonlet me check out 0.17 and see if there's a knob. i think there'sa defcustom somewhere to inhibit those checks. just need t osee what the name is#2018-10-1718:16dpsuttonyou can monkey patch it here (defun cider-verify-piggieback-is-present ()) with that#2018-10-1718:16dpsuttonand you can find that function and see how it is checking for the presence of piggieback#2018-10-1718:35bozhidarYeah, that seems like a reasonable approach#2018-10-1718:36bozhidarIn 0.19 I’ll completely drop the cemerick/piggieback stuff, so we can simplify a bit the code.#2018-10-1718:37llsouder
M-x configuration-layer/update-packages
154 packages to update 😛
#2018-10-1718:38dpsuttonha. i did 127 or so a few weeks ago and it worked flawlessly. good luck#2018-10-1718:50llsouderwhen I start the repl I see emacs using 0.19 snapshot but my repl says 0.18 snapshot?#2018-10-1718:51llsouderbeside that I still get the error after I start figwheel and use (cljs-repl)#2018-10-1718:53llsouderI guess the dependency is in figwheel?#2018-10-1719:05dpsuttonoh you're getting this from figwheel, not cider#2018-10-1719:05dpsuttonwhich version of figwheel are you on. i think you need to be on 16+#2018-10-1721:03llsouderI put back the cemerick version. I am using 0.5.16 of figwheel#2018-10-1721:05llsouderI posted my real problem in #figwheel , all day I have been fidgeting with the settings, starting fresh, updating things, following tutorials. Not really how I wanted to spend my home coding time.#2018-10-1721:08llsouderI think what it comes down to is the emacs repl is not calling mount-root when I save a file but lein figwheel does.#2018-10-1721:35llsouderok, figwheel updates my page from emacs when I use inf-clojure but then there is no cider so I dont get the cool evaluations.#2018-10-1721:37dadairTrying to resolve an annoyance that I’ve let go on for too long. Whenever I type the following on a new line:
(def some-var "some-string")
when I type the first character of “some-string” (after the opening double quote), the form always gets indented for some reason:
(def something "some-string")
^did not type
I assume it has something to do with “some-string” being ambiguously parsed as the docstring, but I’m not sure why it is indenting (or what is indenting it automatically). Any advice on debugging/changing? Anyone else running into this?
#2018-10-1721:40dadairActive modes: clojure, clojure-refactor, cider, EditorConfig, paredit#2018-10-1802:05richiardiandreaUhm funny I think I noticed that too but not consistently...thought I was crazy 😸 it smells like a clojure-mode issue#2018-10-1803:00dpsuttoni 100% agree with that annoyance#2018-10-1803:01dpsuttoni enabled clojure-mode in the emacs scratch buffer and reproduced it. so yes, clojure-mode#2018-10-1803:04dpsutton
(defun clojure-indent-line ()
      "Indent current line as Clojure code."
      (if (clojure-in-docstring-p)
          (save-excursion
            (beginning-of-line)
            (when (and (looking-at "^\\s-*")
                       (<= (string-width (match-string-no-properties 0))
                           (string-width (clojure-docstring-fill-prefix))))
              (replace-match (clojure-docstring-fill-prefix))))
        (lisp-indent-line)))

#2018-10-1803:04dpsuttonis the offending function#2018-10-1803:05dpsuttonand it appears that your intuition that it was confused and thinks it is in a docstring#2018-10-1803:16dpsuttonhttps://github.com/clojure-emacs/clojure-mode/issues/241 wow. there's a lot going on here#2018-10-1803:52dpsuttonSimple fix for me is to add another call to clojure-docstring-p in the when after the call to beginning of line. Because it should be when still in a docstring indent the line. I think#2018-10-2116:03richiardiandreaHas this been open as issue at least? I don't see it in the project...I can do that#2018-10-2116:11dpsuttonNot that I know of. I think @U0E2EQFME was going to go this#2018-10-2116:43richiardiandreaOk thank you!#2018-10-2116:44dpsuttonnot sure if that's still the plan#2018-10-2117:15dadairStill in the plan just haven’t got to it yet, planning on getting to it later this week#2018-10-1805:26dadairThanks for digging into it! I’ll see if I can get a PR up to fix#2018-10-1813:25bozhidarA PR would be most welcome!#2018-10-1814:22bozhidar(I’ve noticed this issue a while ago, but I never got to it)#2018-10-1916:28j0nihey @bozhidar is it the case that clojure-mode treats any symbol in first place in a list which starts with with- as if it were a macro with a [x & rest] signature?#2018-10-2007:54bozhidarYeah, I recall we do this. Probably it’s configurable, but I don’t have time to check this now.#2018-10-2007:55bozhidarIt’s a similar logic to what we have for def*.#2018-10-1916:28j0niI haven't looked, but I've noticed a couple of times functions which start with- getting indented that way#2018-10-1916:29j0nifor example
(tf/with-zone formatter
  (if (string? timezone)
    (t/time-zone-for-id timezone)
    timezone))
#2018-10-1916:41eccentric JHow do I fix my JS indentation in spacemacs?#2018-10-1916:43dpsuttonit seems to be aligned with the R.compose#2018-10-1916:43dpsuttonalthough the alignment of the lines before are so bizarre that who knows what should result#2018-10-1916:44dpsuttonthe ) flush with the gutter is foreign to me#2018-10-1916:48eccentric Jhttps://cl.ly/1be6d8dd590b/Screen%252520Shot%2525202018-10-19%252520at%25252012.46.39%252520PM.png#2018-10-1916:48eccentric JEven after changing that part it’s still behaving unexpectedly#2018-10-1916:49eccentric JEven after getting rid of the map & compose statement it’s still indenting incorrectly#2018-10-1917:07eccentric Jhttps://cl.ly/21745f4658d2/Screen%252520Recording%2525202018-10-19%252520at%25252001.07%252520PM.gif#2018-10-1917:08dpsuttonCan you try running format the region? I think you're seeing issues where locally they are lined up but globally they are not#2018-10-1917:08eccentric JSure#2018-10-1917:11eccentric Jhttps://cl.ly/a18b11b14642/Image%2525202018-10-19%252520at%2525201.11.20%252520PM.png#2018-10-1917:11eccentric JAppears to want to ignore comments but align to the declaration#2018-10-1917:13dpsuttonthat is the normal style i think?#2018-10-1917:13eccentric JI guess it must be#2018-10-1917:17eccentric JOk, I’ll just change the .eslintrc and adapt to it but is there any way to get comments to match the indent?#2018-10-1917:20dpsuttonneed to find out what mode you are in and ask the package maintainers. reasonably good chance there's a defcustom for it if you want to read the source#2018-10-1917:21eccentric Jjs2-mode. Looking through the source now for related settings 🙂#2018-10-1918:37Lyn HeadleyAnybody using lispy? How do I insert an empty vector []?#2018-10-1918:38Lyn Headleyso far the best I have found is C-q [ C-q ]#2018-10-1918:40eccentric J
(define-key evil-insert-state-map (kbd "TAB") 'indent-relative)
  (define-key evil-insert-state-map (kbd "RET") (lambda () (interactive) (newline) (indent-relative)))
#2018-10-1918:41eccentric JIt’s not pretty but I found a way to achieve what I wanted#2018-10-1918:54Lyn HeadleyI found an answer: https://github.com/abo-abo/lispy/issues/64#2018-10-1919:37practicalli-john@jayzawrotny have you configured the indentation settings to use 2 spaces https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/javascript#indentation#2018-10-1919:45eccentric JYes. Both settings are set to 2#2018-10-2000:27Chaseso does anyone else find M-f a little counter intuitive? My brain wants it to put the cursor on the first character in the next word. M-b seems to do as I imagine it would. Is this a leftover thing from my vim experience? Do folks get used to it or switch the behavior? I assume I'm just missing the real functionality of putting you in the space before the word.#2018-10-2000:33ChaseUsing C-s seems to offer similar confusion for me. if I start typing in C-s println it puts my cursor well into the word wherever I stopped typing. Searching backwards with C-r keeps me at the first character in the search term which I prefer. I think I'm just missing why it should behave like that.#2018-10-2005:48dadair@chase-lambert M-f is “move forward over word”, not “move to next word”, that helped me grasp it a bit better. You can change the behaviour: https://stackoverflow.com/questions/1771102/changing-emacs-forward-word-behaviour#2018-10-2111:31sbHello, is that normal.. the Spacemacs freeze like “windows” not a first time.. ? Do you have problem with spacemacs too?#2018-10-2111:31sb(on osx)#2018-10-2113:04practicalli-john@sb it is not normal for Spacemacs to freeze. Some builds of Emacs can cause issues, so please share how you installed Emacs on OSX. Which version of Spacemacs are you using (`master` or develop branch) and what were you doing (modes in use, buffers, etc) when you experienced the crash? There are details of how to diagnose Spacemacs on https://github.com/syl20bnr/spacemacs/wiki/Debugging#2018-10-2113:04sbOk, I check it and share with you. Thanks!#2018-10-2113:06practicalli-johnIf you believe its Spacemacs specific, we also have a #spacemacs channel here#2018-10-2113:07sbSorry, in this case that was the wrong channel. I didn’t see the Spacemacs channel.#2018-10-2118:18gis there a common or easy way to maintain multiple, easily-accessible emacs configurations?#2018-10-2118:18gi'd like to maintain my working setup, but also blow it away and experiment with vanilla.#2018-10-2118:18gi could just mv etc but i wonder if there's a better way#2018-10-2118:24dpsuttonI think I remember @plexus writing something like this#2018-10-2118:25dpsuttonhttps://github.com/plexus/chemacs#2018-10-2211:16vemvIs this the proper way (in Lein project.clj) to have Java sources that can be found by CIDER?
[org.apache.kafka/kafka-streams "1.0.0"]
                 [org.apache.kafka/kafka-streams "1.0.0" :classifier "sources"]
                 [org.apache.kafka/kafka-streams "1.0.0" :classifier "javadoc"]
Didn't work for me, but IDK if that's the correct approach to begin with. Those additional deps are being fetched for sure:
~/.m2/repository/org/apache/kafka/kafka-streams/1.0.0 $ ls
_remote.repositories                 kafka-streams-1.0.0.jar
kafka-streams-1.0.0-javadoc.jar      kafka-streams-1.0.0.jar.sha1
kafka-streams-1.0.0-javadoc.jar.sha1 kafka-streams-1.0.0.pom
kafka-streams-1.0.0-sources.jar      kafka-streams-1.0.0.pom.sha1
kafka-streams-1.0.0-sources.jar.sha1
#2018-10-2213:49gnejshowdy.. just a quick sanity-check.. In Spacemacs (develop), when adding new Leiningen dependency with cljr-add-project-dependency the new classes are not available in the REPL. This used to work.. Is it just me, or a known issue?#2018-10-2213:52vemvShould be this https://github.com/clojure-emacs/clj-refactor.el/blob/ec158357c4f7a375bc47f89de71ea28028a3bfa0/CHANGELOG.md#240-2018-08-26#2018-10-2213:53gnejsAh. Thanks a lot :thumbsup:#2018-10-2215:32jeff.terrellAlso, there's a channel dedicated to #spacemacs.#2018-10-2218:24bozhidar@vemv Looks like the correct approach to me. As long as the classes and the javadoc are on the classpath they should work just fine with CIDER.#2018-10-2218:28vemvThanks for the confirmation! Can eventually report a reproducible case.#2018-10-2218:34bozhidar:thumbsup:#2018-10-2218:24bozhidar(although I also recall some reports that this broke for some people after Java 8)#2018-10-2308:15andy.fingerhutI've used emacs for many years, and don't often go out of my way to tweak/customize it further, making do with what I've learned earlier. This may be old hat to some, but I just found it today and really really like it: bind a convenient-to-type key to isearch-forward-symbol-at-point and add this to your Emacs init: http://ergoemacs.org/emacs/emacs_isearch_by_arrow_keys.html#2018-10-2405:01andy.fingerhutOK, really basic question -- I think it used to be, years ago, the C-x C-b would consistently leave the cursor in the buffer it is now, and make the "other buffer" in the frame the list of buffers. Since version ???, it seems that when I have 2 buffers open in the frame, about half the time the list of buffers is created in the other 'half', as it used to, but the other half the list of buffers replaces the buffer the cursor is in. Does anyone else also see this, and/or better yet, know how to change that behavior so the buffer list consistently shows up in the other buffer, not the current one?#2018-10-2405:12andy.fingerhutMaybe what I really want is something like this: Invoke one Elisp command/function that replaces the current buffer with a list of buffers, each marked with a single distinct character, e.g. a b c d or 0 1 2 3 .... Pressing one of those keys replaces the buffer with the one selected. If the list of buffers is longer than fits on the screen, a key like spacebar will page down.#2018-10-2406:00dadairI’m a custom-elisp noob, but you could probably achieve this with some wrapper around helm+ace-jump#2018-10-2406:01andy.fingerhutAfter some internet searching around, I have found and starting to try ace-jump-buffer. May be exactly what I want.#2018-10-2407:42danielcomptonYep, as you were describing that I thought of ace/avy#2018-10-2417:51richiardiandreaI posted a Magit small issue here: https://www.reddit.com/r/emacs/comments/9r1q7t/cannot_use_magitversion_in_custom_build/ Maybe some folks here can help as well#2018-10-2616:36orestisI played around with inf-clojure today since I wanted to connect to a remote socket REPL and that’s the only way I could find (without adding nREPL to the remote server). It’s not too bad, though I’d love to get completions the same way I get with CIDER.#2018-10-2616:36orestisI think one possible workflow for live-debugging is poking around the live server with inf-clojure, then for any non-trivial tweaks switch back to a local JVM with CIDER, then once you’re happy try sending the form to the server and see what happens.#2018-10-2619:09richiardiandrea@orestis I had completion working at some point you need to have compliment on the classpath#2018-10-2619:10richiardiandreaoh actually maybe it was a WIP: https://github.com/clojure-emacs/inf-clojure/pull/124#2018-10-2913:52bozhidarYeah, basically we can’t do the completion without adding some library to the classpath to provide it (or alternatively loading that library remotely).#2018-10-2913:53bozhidarI want to look at some point at the possibility to load nREPL middleware remotely.#2018-10-2913:53bozhidarBtw, here’s one article I just wrote that might be interesting to CIDER users https://metaredux.com/posts/2018/10/29/nrepl-redux.html#2018-10-3113:12llsouderHow do you "goto declaration" to view the code? google turned up M-. but that did not work for me.#2018-10-3113:18dpsuttonthat's the universal way to do it and most modes obey it. what was displayed when you tried it?#2018-10-3113:36dadairCider needs to be running and symbols need to have been defined (eg., eval’d) for M-. to work#2018-10-3113:37dadairWon’t work if you’ve just opened a clojure file in a buffer by itself#2018-10-3113:37dadairAs far as I know#2018-11-0211:55llsouder@dpsutton Previous command was not evil repeat: xxxxxxxx#2018-11-0215:55andy.fingerhutThat is such an fun error message from a computer program. Especially weird if you didn't realize that 'evil' was the name of an editor mode/package.#2018-11-0215:58dpsuttonalso all bets are off in evil and spacemacs land. don't know what they use for navigation#2018-11-0603:33llsouderturns out gd works in spacemacs#2018-11-0302:34dadairBit off topic, but can any other “do everything in emacs” people recommend a contacts-organization tool? I’ve seen BBDB, org-contacts, etc. I’ve tried BBDB, but it seems undocumented and fractured (i.e., “is this blog about bbdb 1 or 2 or 3?“, and some functions from tutorials I can’t even find; for example, I can’t figure out how to simply add birthdates). It sounds like org-contacts is also unmaintained. There’s a custom contacts.el package in scimax that looks promising.
#2018-11-0302:41andy.fingerhutCan anything truly be off topic in an discussion group about emacs? 🙂#2018-11-0514:12lispers-anonymous@dadair Depending on what you are doing, you could just use normal org-mode and not rely on org-contact. I don’t maintain my contacts in emacs (maybe I should), but if I were going to I would write an emacs function that prompted me for inputs like contact name, phone number, email, category, and drop that information in a file using some kind of structure like
* dadair
:properties:
:phone: 
Then you could use org agenda to search for contacts.
#2018-11-0516:10dadairThanks! My only concern with something hand-rolled is integrating with mu4e or gnus (I’ll be migrating to one of them soon)#2018-11-0601:01lispers-anonymousI wish I had some advice for you there. I don’t use either of those tools. The emacs subreddit or an irc may be good places to find advice for what you are trying to do.#2018-11-0514:13orestisAny users of inferior-clojure here? I can connect to a remote REPL but can’t get my buffer to acknowledge that it is connected. Instead, it always shows “Inferior Clojure: no process”.#2018-11-0514:16orestisIt says inf-clojure-proc: No Clojure subprocess; see variable 'inf-clojure-buffer'#2018-11-0514:17lispers-anonymousWhat does inf-clojure-buffer say?#2018-11-0514:18orestisIt says that I should use it to set up the, well, inf-clojure-buffer that commands go to — but its value is already *inf-clojure* which is the buffer that commands should go to.#2018-11-0514:21orestisEvaling this in the minibuffer: (setq inf-clojure-buffer "*inf-clojure*") doesn’t seem to fix anything.#2018-11-0514:21lispers-anonymousDo you have the variable inferior-lisp-program? If so is it set to anything, like "lein run"?#2018-11-0514:22orestisEvaluating inferior-lisp-program throws an error, and describe-variable & ivy refuses to autocomplete it, so probably not?#2018-11-0514:23orestisBut I’m in inferior clojure, not inferior lisp…#2018-11-0514:23orestisHere’s what I see…#2018-11-0514:23lispers-anonymousI’m not too familiar with inferior clojure, but I thought it might use inferior lisp under the hood.#2018-11-0514:25orestis
(defun inf-clojure-proc ()
  "Return the current inferior Clojure process.
See variable `inf-clojure-buffer'."
  (let ((proc (get-buffer-process (if (derived-mode-p 'inf-clojure-mode)
                                      (current-buffer)
                                    inf-clojure-buffer))))
    (or proc
        (error "No Clojure subprocess; see variable `inf-clojure-buffer'"))))
I can’t make sense of this…
#2018-11-0514:25lispers-anonymousHave you added this to your init file?
(autoload 'inf-clojure "inf-clojure" "Run an inferior Clojure process" t)
  (add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
#2018-11-0514:25orestisThis is the function of inferior clojure that throws an error.#2018-11-0514:31lispers-anonymousI was just able to get inferior clojure up and running on my emacs (normally I use cider). Here are the steps I took Add this to my init file,
(use-package inf-clojure
  :ensure t
  :pin "melpa"
  :config
  (autoload 'inf-clojure "inf-clojure" "Run an inferior Clojure process" t)
  (add-hook 'clojure-mode-hook #'inf-clojure-minor-mode))
If you don’t use use-package, you should be able to install it, and in your init file add
(require 'inf-clojure)
(autoload 'inf-clojure "inf-clojure" "Run an inferior Clojure process" t)
(add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
Evaluate the code, whether it is use package or something else, then in a clojure buffer (I picked a project.clj), run M-x inf-clojure and watch your repl start up. You should have leiningen or whatever tool you use installed and available on your path so emacs and inf-clojure can find it.
#2018-11-0514:32orestisRight, thanks — this works — I want to connect to an already running socket REPL.#2018-11-0514:32orestisSo what I have to do first is inf-clojure-connect#2018-11-0514:32lispers-anonymousOh I see.#2018-11-0514:32orestisAnd this does create the *inf-clojure* buffer, but then for some reason my actual source file is not connected to that.#2018-11-0514:37orestisOK, I managed to do something too — the key bit is to make sure you are first on Clojure major mode, and the invoke inf-clojure-minor-mode#2018-11-0514:37lispers-anonymousI just tried the same thing with my basic inf-clojure setup, and couldn’t get it working#2018-11-0514:38lispers-anonymousI get an error saying comint-propmpt-regexp not set properly. The *inf-clojure* buffer is not acting like it’s connected to a repl. It’s just an empty buffer with no prompts.#2018-11-0514:38orestisWhich is what confused me — the Clojure source buffer needs to have inf-clojure minor mode, not inf-clojure-mode#2018-11-0514:39orestisWeird, that works for me just fine.#2018-11-0514:40lispers-anonymousWell I use cider so i’m not worried about mine. You should have inf-clojure-minor-mode already enabled in clojure-mode bufferes if you add it in a hook. Doing that would keep you from having to start the minor mode every time#2018-11-0515:58orestisYep- I figured it out now. I also use cider usually but this is to connect to a remote socket REPL that doesn’t have nRepl etc. #2018-11-0515:58orestisSo I have to set it up manually. I’ll probably end up just bundling nRepl and the relevant middleware to be able to just use cider there. #2018-11-0515:59orestisThanks for your help!#2018-11-0516:11lispers-anonymousIndeed. Glad you were able to figure it out 🎉#2018-11-0519:09valtteri@orestis to me inf-clojure-connect works as expected. I’m on Prelude and I’ve installed inf-clojure with M-x package-install inf-clojure. I can eval forms from (cljs) buffer with inf-clojure-eval-last-sexp etc. There’s also #inf-clojure but it’s been inactive for while.#2018-11-0519:47orestis@valtteri thanks, my confusion was that I was entering the inf-clojure major mode which is the one that applies to the REPL buffer itself. I should have entered the minor mode which allows you to eval buffers etc. #2018-11-0613:32bozhidar> Evaluating inferior-lisp-program throws an error, and describe-variable & ivy refuses to autocomplete it, so probably not?#2018-11-0613:33bozhidar@orestis This variable is not used by inf-clojure at all. 🙂#2018-11-0613:33bozhidarTake a look at the usage section here https://github.com/clojure-emacs/inf-clojure#usage#2018-11-0613:34bozhidar> Which is what confused me — the Clojure source buffer needs to have inf-clojure minor mode, not inf-clojure-mode#2018-11-0613:35bozhidarWhat’s weird about this? One is the major-mode for the REPL buffer, the other one is just a minor mode that establishes some keybindings. That’s a pretty standard setup in Emacs-lands.#2018-11-0613:42orestisNothing weird about it 🙂 I just don’t know enough about Emacs#2018-11-0823:16plexusSomething I wish I had thought of earlier:
(defun plexus-clojure-extras/cider-pprint-register (register)
  (interactive (list (register-read-with-preview "Eval register: ")))
  (cider--pprint-eval-form (get-register register)))
#2018-11-0823:16plexusSelect some clojure code, then do M-x copy-to-register (`C-x r x`), and pick a letter#2018-11-0823:17plexusnow with M-x plexus-clojure-extras/cider-pprint-register <letter> you can run that code from anywhere, and see the result in a pop-up buffer#2018-11-0823:18plexusspacemacs folks can do this to have it available as ,,
(dolist (m '(clojure-mode
             clojurec-mode
             clojurescript-mode
             clojurex-mode
             cider-repl-mode
             cider-clojure-interaction-mode))

  (spacemacs/set-leader-keys-for-major-mode m
    "," 'plexus-clojure-extras/cider-pprint-register))
#2018-11-0823:19plexuse.g. I have (kaocha.repl/run) in register ,, now I can always re-run my tests with ,,,#2018-11-0902:02richiardiandreaoh that nice!#2018-11-0922:47bhaumanOK I’m finally setting up magit, any tips??#2018-11-1009:07practicalli-john@bhauman I use magic to try out pull requests easily, for example https://practicalli.github.io/spacemacs/magit/testing-pull-requests.html This may require the Magithub package https://github.com/vermiculus/magithub You can also create a local git repository just by opening magic status in directory that isn’t currently in git version control https://practicalli.github.io/spacemacs/magit/create-local-repository.html M opens the remote menu and allows you to add a shared repository (e.g github repo) to you local repo https://practicalli.github.io/spacemacs/magit/remote-repositories.html#2018-11-1016:57bhauman@U05254DQM thanks this is all very helpful!!#2018-11-1121:38theeternalpulseI love reflog current from status > log > reflog current. Shows only things I've done to the repo in detail.#2018-11-1206:26danielcomptonI found the Magithub package was extremely slow, to the point of unusability on repos with many GitHub issues. It also seemed to have some issues with downloading CI statuses, it would break the whole magit status buffer. YMMV of course#2018-11-1212:58practicalli-john@U051KLSJF yes, Magithub can be very slow if it is always checking for issues and pull requests each time you open magit-status. In a fairly recent update on the Spacemacs develop branch Magithub is set to be off-line by default and you can use SPC u in front of g r to update the status and check Github issues and pr's. Off-line by default restores magit-status to its normal speedy self.#2018-11-0922:55mccraigmccraigM-x magit-status and then h will guide you through everything#2018-11-0923:03lispers-anonymousWhen I learned magit I turned off my ssh agent stuff so I had to enter a password to make commits to github/lab. It's easy to hit the wrong key and do something you didn't intend. I turned it back on after I was more comfortable with magit. #2018-11-0923:14bhauman@dannyfreeman thats a good idea#2018-11-0923:14bhauman@mccraigmccraig yeah its pretty dang intuitive#2018-11-0923:15dpsuttonI have forgotten command line and I don't miss it#2018-11-0923:19dadair:thumbsup: Anytime I question the clear superiority of Emacs I’m brought back by Magit specifically#2018-11-0923:20dpsuttonPressing "?" In any magit buffer should teach you everything you need#2018-11-1009:07practicalli-john@bhauman I use magic to try out pull requests easily, for example https://practicalli.github.io/spacemacs/magit/testing-pull-requests.html This may require the Magithub package https://github.com/vermiculus/magithub You can also create a local git repository just by opening magic status in directory that isn’t currently in git version control https://practicalli.github.io/spacemacs/magit/create-local-repository.html M opens the remote menu and allows you to add a shared repository (e.g github repo) to you local repo https://practicalli.github.io/spacemacs/magit/remote-repositories.html#2018-11-1008:06richiardiandreaHas anyone tried borg? I have always liked the idea of getting submodules for emacs modules#2018-11-1013:22lispers-anonymousYou don't need magithub to pull down PRs with magit. It only works with github apparently. No support gitlab or bitbuckets.#2018-11-1017:52practicalli-johnOh, thanks, good to know. I wasnt sure so I mentioned it. I assume Magit does need the ghub packge for Github authentication though (its on my todo list to learn more about).#2018-11-1019:40bhauman@plexus I’m adding your register idea to my emacs#2018-11-1019:40bhaumanI’m looking into a couple of improvements#2018-11-1019:40bhaumanIt would be great to store the last sexp#2018-11-1019:40bhaumanto a register#2018-11-1019:42bhaumanand it would be great to either evaluate in the current buffers ns or probably better to prepend an (in-ns ) statement#2018-11-1110:29lispers-anonymous@bhauman I bet cider provides a nice way to get the current buffers ns that you could use. I'll look when I'm up and at it later today #2018-11-1120:01pesterhazyPublished zprint-mode, a minor mode for rapidly pretty-printing Clojure(script) code: https://github.com/pesterhazy/zprint-mode.el This is my first Emacs package, so feedback (here or as Github issues) is greatly appreciated#2018-11-1123:02richiardiandreaNice! I will definitely try it out 😉 #2018-11-1207:49danielcomptonIs there a way in Projectile to sort the files list by most recently used file? It seems to be sorted by a breadth first directory search?#2018-11-1207:50danielcomptonOr some similar alphabetical kind of sorting#2018-11-1207:50danielcomptonI guess there might be a perf impact to sorting these#2018-11-1208:50pesterhazy@danielcompton not a direct answer to your question but I use this git alias to get a list of files under version control ordered by mtime: modified = !git ls-files -z | xargs -0 ls -tr#2018-11-1208:51pesterhazy@richiardiandrea please let me know if it works for you#2018-11-1212:53practicalli-john@danielcompton projectile sorts by most recent file open in Spacemacs (`develop` branch). From a quick search, I believe its this code that makes it work https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bspacemacs/spacemacs-project/packages.el#L51#2018-11-1312:18vemv#2018-11-1312:19vemvhow do I change the color of these black borders? I tried with customizing fringe but it seems unrelated#2018-11-1315:19kliph@vemv M-x list-faces-display and look for mode-line, most likely.#2018-11-1316:09lispers-anonymousI don’t believe mode-line will account for the black margins on the side#2018-11-1422:02sashtonHas anyone seen issues with the which-keys buffer showing up partially behind the minibuffer? I’m using Spacemacs, without too much customization at this point. If I restart Emacs, the problem will go away, but at some point I perform a series of unknown actions and it gets in a bad state (I just haven’t noticed yet what those actions are). I’m hoping someone has seen this before and would know how it could be fixed without resorting to a restart.#2018-11-1507:48practicalli-john@U08TWB99B maybe it’s related to this https://github.com/syl20bnr/spacemacs/issues/11165 My guess would be an issue with the version of Emacs, especially if you are running Emacs 26 or 27. Or it could be a bug in the which-key package, in which case you could try to pin to an earlier version of which-key package.#2018-11-1513:34sashtonAwesome! That was it. Thanks#2018-11-1521:34futuroNeat! I ran into this same issue today, and I'm glad to see a probable cause.#2018-11-1422:37ewenAn elisp library for monitoring log files during development https://github.com/EwenG/strette.el#2018-11-1507:08bozhidar@danielcompton @jr0cket Regarding Projectile’s sort order - keep in mind that if you’re on master it works only for native and hybrid indexing. For performance reasons alien will ignore the sort order.#2018-11-1508:04danielcomptonThanks, good note. I did wonder how it would interact with those modes#2018-11-1801:33theeternalpulseIs there a way for projectile to be constrained to a particular layout. I woudl like layouts to have a set project and not allow switching to any buffer that isn't in the same project#2018-11-1921:54kommenfor people who feel their Emacs is sluggish on macOS, maybe have a look at emacs-mac: https://twitter.com/kommen/status/1064635124904591361#2018-11-2008:36hkjelsI really don’t see much of a difference.. How can I check that metal is being used?#2018-11-2008:43kommenyou can check (frame-monitor-attributes)#2018-11-2008:44kommenin my case it includes (metal-device-name . "AMD Radeon Pro 460")#2018-11-2008:52hkjelsOK, so it should be working then#2018-11-2008:52hkjelsThanks..#2018-11-2014:36jumarThis looks really cool but the behavior is quite strange. Some shortcuts are different (e.g. Cmd-Shift-> instead of Alt-shift->) and jump-to-definition doesn't work ("No jump handler was able to find this symbol"). I use spacemacs.#2018-11-2014:40kommenok, good to know. I didn’t run into any such issues yet, working with it for a day. I think they did have port-specific options for cmd and alt key handling#2018-11-2020:09eccentric J
(global-set-key [(hyper a)] 'mark-whole-buffer)
(global-set-key [(hyper v)] 'yank)
(global-set-key [(hyper c)] 'kill-ring-save)
(global-set-key [(hyper s)] 'save-buffer)
(global-set-key [(hyper l)] 'goto-line)
(global-set-key [(hyper w)]
                (lambda () (interactive) (delete-window)))
(global-set-key [(hyper z)] 'undo)
where does that go in emacs-mac spacemacs?
#2018-11-1921:55kommenwished I found out about emacs-mac earlier, but Metal support is still fresh…#2018-11-2001:34lispers-anonymousThanks for sharing that. I’ve been using it for a couple of hours today and it’s really snappy compared to the default emacs available through homebrew. It seems to stay pretty up to date as well, which is nice.#2018-11-2109:22nielsIs there an emacs package that interactively suggests more efficient/idiomatic ways of navigating? e.g. you hit M-C-b three times to get to the beginning of the line, and something shows up saying "Save two keystrokes with (back-to-indentation) M-m"#2018-11-2602:53felipebarrosHmm, like an automated Emacs Golf training 🙂#2018-11-2602:59felipebarrosI personally do not know if that makes much sense. Emacs can't compete with Vim or Kakoune or others when it comes to that. But, if your objective is to reduce the amount of keystrokes without changing to Evil, you can try god-mode (https://melpa.org/#/god-mode) if you haven't. I really like Emacs defaults honestly, abusing moving by sexps and lists when editing code and by paragraphs and sentences when editing text. Making seldom use of avy (https://melpa.org/#/god-mode) to jump to words or lines when things are really distant. I couldn't find it, but ever since I read Mickey Petersen (of https://masteringemacs.org/ fame) mention that he used and abused isearch (I believe it was him at least :thinking_face:), I realized it is extremely powerful and have used and abused to move around as well. I even use it to select regions by setting a mark and doing a search. It's awesome and very fast. Add to that the stuff bound to M-s, imenu and helm-occur and I don't miss a thing when it comes to moving with clarity and good speed, even if its not exactly saving me keystrokes. Possibly relevant: https://masteringemacs.org/article/discoverel-discover-emacs-context-menus and https://masteringemacs.org/article/searching-buffers-occur-mode#2018-11-2603:21felipebarrosI realize this wasn't an answer to your question (the answer is probably that such package doesn't exist, but the things closer to aiding you in discoverability are probably good old tutorials, guides and tricks), but hope it may help somehow.#2018-11-2603:26felipebarrosOne last tip: I believe the most important thing when optimizing your editing flow is to do it slowly for a long time, taking the time to consider what you're actually trying to achieve. Emacs has a lot of stuff going on as you know, and it takes time to actually value and integrate its working logic with ours. By the time you are confident enough to go fast, you will be moving in a very efficient way and using the right tools for each operation.#2018-11-2603:27felipebarrosAnd I personally used it for years before I consciously decreased my speed in order to reflect on what I was trying to achieve, so even if you have a lot of time of Emacs, you may not have given that possibility a serious try.#2018-11-2914:48nielsThis is good advice. It's hard to slow down when you're on the clock. I find that when I sit down in my own time, and use it with no goals in mind I end up learning the most.#2018-11-2112:17hlollidon't think so, but emacs gives you a suggestion when you run a function with M-x, when that function is bound to keys, it will tell you that you can run it with a keysequence. You can get a package that autocompletes keysequences, you write C-c and you get a list of keysequences. But I recommend asking here for finding more efficient ways to do things.#2018-11-2113:59nielsI think you're talking about which-key, right? I use it, and like it. But what I was hoping for is something like those online tutorial things like "emacs foo" where you try to get somewhere in as little keystrokes as possible. Anyway, thanks for thinking along.#2018-11-2120:06slipsetC-h t is your friend.#2018-11-2210:44ag@nmdrenard you want lossage analyser. Something that would read last N keystrokes in C-h l and attempts to find and suggest a more efficent way. afaik that does not exists#2018-11-2210:47nielsI didn't know about (view-lossage), thanks#2018-11-2210:48agimho Emacs (unlike IntelliJ) does not have it simply because it would not be easy to implement due to modality, the concept completely foreign to Intellij (and most other editors)#2018-11-2219:20lispers-anonymousWhen you know what function is bound to the long key strokes, running describe-function will tell you all the keybindings that function is bound to#2018-11-2714:22chris_johnsonI would just like to say a brief word of thanks for keyboard macros and specifically for the ~1500 iterations of “move to first comma in line, kill rest of line, move to next line” that were handled by a five-step keyboard macro and C-u 0 C-x e 😄#2018-11-2717:41richiardiandreawhere...how...but... 😄#2018-11-2718:11rduplainIs there a way to configure emacs to pick up .dir-locals.el for the *scratch* buffer? Use case: run cider-jack-in-cljs on a fresh emacs session. I have this in .dir-locals.el:
((nil . ((cider-default-cljs-repl . figwheel-main))))
The first argument is for the mode by which Emacs is to pick up the local variable, and nil conventionally means "all modes." I'm using the latest Emacs, 26.1, and notice that this variable does not take effect on *scratch* but is picked up when I open a Clojure(Script) buffer.
#2018-11-2814:12rduplainIn case anyone else runs into this problem, my current thought is to have a function in my .emacs which sniffs the project files (here, project.clj) and sets the right defaults for CIDER. I prefer that my config "figures it out" instead of prompting for detail. While REPL sessions are often long-running, I am most often working on small projects and want everything pre-configured for the project so that I can jump right in.#2018-11-2815:40richiardiandreaUhm, i never needed that ...can't you check in a .dir-locals.el to your repo once at project creation time? Am I missing something?#2018-11-2814:12rduplainIn case anyone else runs into this problem, my current thought is to have a function in my .emacs which sniffs the project files (here, project.clj) and sets the right defaults for CIDER. I prefer that my config "figures it out" instead of prompting for detail. While REPL sessions are often long-running, I am most often working on small projects and want everything pre-configured for the project so that I can jump right in.#2018-11-2800:46theeternalpulseI just put magit through the ringer with a crazy cherry pick. Magit kept forgetting that it was doing a cherry pick and I had to go back to the terminal to manually continue the cherry pick. It also didn't pick up some changes that I had to view in the terminal client. I can't say why exactly my use case was crazy, but I also spent half a day on it so I am not eager to replicate it. Has something like this happened to anyone else?#2018-11-2809:44kommen@theeternalpulse check your magit-process buffer for anything suspicious#2018-11-2813:46jeff.terrellYeah, that's the first thing I'd look at, if you haven't already. $ from a status buffer should switch to it. @theeternalpulse#2018-11-2815:13andrea.crottiMelpa seems to be dead 😨#2018-11-2815:18vemvyup, just realised as well https://github.com/melpa/melpa/issues/5837#2018-11-2815:19vemvI was going nuts because precisely this morning I was proceeding to install emacs on a new Mojave machine... was chasing TLS issues and whatnot#2018-11-2823:15blancehas anyone ever seen outofmemory error with clj-refactor? i'm just trying to rename a symbol, but got OutOfMemoryError: Java heap space I modified jvm-opts with Xmx5g and it's still not enough. I then increased it to 8g, but got java.lang.OutOfMemoryErrorRequested array size exceeds VM limit#2018-11-2909:43narendraj9Do you see a stacktrace that you can share?#2018-11-2919:23blance
error in process filter: Error in nrepl-refactor: 
                                [0mclojure.core/[34mprint-map[0m  [36m            core_print.clj:  238[0m
                         [0mclojure.core/[34mprint-prefix-map[0m  [36m            core_print.clj:  229[0m
                         [0mclojure.core/[34mprint-sequential[0m  [36m            core_print.clj:   66[0m
                      [0mclojure.core/print-prefix-map/[34mfn[0m  [36m            core_print.clj:  233[0m
                                    [0mclojure.core/[34mpr-on[0m  [36m                  core.clj: 3666[0m
                                                   [0m...[0m  [36m                                [0m
                                       [0mclojure.core/[34mfn[0m  [36m            core_print.clj:  266[0m
                                [0mclojure.core/[34mprint-map[0m  [36m            core_print.clj:  238[0m
                         [0mclojure.core/[34mprint-prefix-map[0m  [36m            core_print.clj:  229[0m
                         [0mclojure.core/[34mprint-sequential[0m  [36m            core_print.clj:   66[0m
                      [0mclojure.core/print-prefix-map/[34mfn[0m  [36m            core_print.clj:  233[0m
                                    [0mclojure.core/[34mpr-on[0m  [36m                  core.clj: 3666[0m
                                                   [0m...[0m  [36m                                [0m
                                       [0mclojure.core/[34mfn[0m  [36m            core_print.clj:  266[0m
                                [0mclojure.core/[34mprint-map[0m  [36m            core_print.clj:  238[0m
                         [0mclojure.core/[34mprint-prefix-map[0m  [36m            core_print.clj:  229[0m
                         [0mclojure.core/[34mprint-sequential[0m  [36m            core_print.clj:   66[0m
                      [0mclojure.core/print-prefix-map/[34mfn[0m  [36m            core_print.clj:  233[0m
                                    [0mclojure.core/[34mpr-on[0m  [36m                  core.clj: 3666[0m
                                                   [0m...[0m  [36m                                [0m
                                       [0mclojure.core/[34mfn[0m  [36m            core_print.clj:  124[0m
                            [0mjava.io.StringWriter.write[0m  [36m         StringWriter.java:  101[0m
                         [0mjava.lang.StringBuffer.append[0m  [36m         StringBuffer.java:  270[0m
                [0mjava.lang.AbstractStringBuilder.append[0m  [36mAbstractStringBuilder.java:  448[0m
[0mjava.lang.AbstractStringBuilder.ensureCapacityInternal[0m  [36mAbstractStringBuilder.java:  124[0m
                               [0mjava.util.Arrays.copyOf[0m  [36m               Arrays.java: 3332[0m
[31mjava.lang.OutOfMemoryError[0m: [0mRequested array size exceeds VM limit[0m

#2018-11-2919:23blancesorry.. there's some weird char that emacs can't display#2018-11-3007:19narendraj9I had a similar problem when I was dealing with a repository of pretty old code that had thousands of lines of Clojure.#2018-11-3007:21narendraj9With these hacks https://github.com/narendraj9/refactor-nrepl , I was able to at least see usages and rename symbols. I do not use them anymore as I am no longer working on that specific project.#2018-11-3022:28blancethanks! i'll try that out#2018-11-2823:15blancecouldn't find any related issue online:disappointed:#2018-11-2912:18benedekhave not seen one tbh#2018-11-2912:19benedekany chance your project where this happens is public?#2018-11-2912:21benedeki assume you try to rename a global var vs a local name (eg a param, something in a let etc)#2018-11-2919:24blanceit's private for the company:disappointed: I'm trying to rename a top level function defined by defn#2018-11-2919:25blancethe code base is about 5k loc src code and 10k tests, shouldn't be a problem right?#2018-11-3007:21narendraj9With clj-refactor?#2018-11-3015:26acronDid I dream this or is there an elisp dotfile I can add to a directory and when emacs loads a file from the dir it attempts to load the dotfile ?#2018-11-3015:28acronAh, found it https://www.emacswiki.org/emacs/DirectoryVariables#2018-12-0109:36martinklepschSome modes make headings appear larger and other things appear smaller (adoc-mode being an example) — does anyone happen to know how/if that kind of thing can be disabled?#2018-12-0114:02bozhidar@martinklepsch Typically you have to override all the faces the mode defines as scaled in some fashion. Generally there are no global settings you can update, as everyone’s doing their own thing.#2018-12-0114:03bozhidarIn zenburn I simply override all the adoc-mode faces with ones that always the same size. You can take a look there and do the same for whatever theme you’re using.#2018-12-0321:05danielcomptonIs there a way to get super-save to save with a focus hook? https://emacsredux.com/blog/2014/03/22/a-peek-at-emacs-24-dot-4-focus-hooks/#2018-12-0321:05danielcomptonhttps://github.com/bbatsov/super-save#2018-12-0321:05danielcomptonOr do I just want to add the hook directly when focus is lost?#2018-12-0321:06danielcomptonHmm, it seems to be there already https://github.com/bbatsov/super-save/blob/62512f60d6685d8601e2021d95e77603b6d96885/super-save.el#L49#2018-12-0321:07danielcomptonI think the issue might actually be that the macOS unsaved indicator isn't changing unless I manually save it#2018-12-0321:07danielcompton#2018-12-0321:08danielcomptonor if I switch to another window#2018-12-0321:11danielcomptonSo, to summarise, the focus-out-hook does work for super-save, but doesn't clear the macOS unsaved changes dot. But if I manually switch windows then it does save and also clears the macOS unsaved dot#2018-12-0413:40anthony-galea@danielcompton fyi, with this config it works for me on macOS:
(use-package super-save
  :ensure t
  :init
  (setq super-save-auto-save-when-idle t)
  :config
  (super-save-mode +1))
this is not required for it to work: (super-save-auto-save-when-idle t) but will save after 5 seconds when emacs is idle: https://github.com/bbatsov/super-save/blob/62512f60d6685d8601e2021d95e77603b6d96885/super-save.el#L61 funny never noticed that dot until now 🙂
#2018-12-0413:48orestissuper save can be extra annoying when figwheel fails to pick up some changes though. Not sure how to fix that.#2018-12-0417:25macrobartfastI use emacs/cider in a terminal; when I have an error it appears in a new pane that gains focus; I have to navigate back to my file to resolve the error; if there are two files open I have to explicitly navigate back to the file the error pane replaced; can I set things up to handle the display/notification of error less obtrusively?#2018-12-0417:29lilactowndoes pressing q not close the error pane?#2018-12-0417:32macrobartfastit does, but if I had two panes side by side previously (when working with two or more buffers, which I usually am) it closes them too.#2018-12-0417:32macrobartfastI'm guessing some of the more gui emacs provide pop up or overlays that get dismissed.#2018-12-0417:34macrobartfastas a side note, I saw a setup recently that seemed to show a large yellow caution sign that appeared over everything for a second... not sure what was causing that to appear.#2018-12-0417:38macrobartfastaha... https://stackoverflow.com/questions/42061111/how-to-get-rid-of-big-yellow-exclamation-mark-in-emacs#2018-12-0417:38macrobartfastI dont' want to get rid of it as I don't have it, but that's what I was seeing, apparently.#2018-12-0417:46macrobartfastI guess what I need is an error message that creates a new pane that then can be dismissed leaving the previous pane arrangement.#2018-12-0417:47macrobartfastright now it uses an open pane, and so I have to dismiss the pane entirely, or awkwardly navigate back to the previous file before switching to my main work buffer to resolve the issue.#2018-12-0417:48macrobartfastbut my whole approach may be off.#2018-12-0417:51macrobartfastjust preventing the pointer from moving to the error buffer would probably be a good start, but not sure how to do that.#2018-12-0420:57eccentric J#2018-12-0420:57eccentric JI’ve got a clj repl on the top right and a cljs repo on the bottom right#2018-12-0420:58eccentric JWhenever I execute a command against a cljs file like the bottom left I get a “No CLJS repls in the current session”#2018-12-0422:11lispers-anonymousLooks like you’re using figwheel. Did you open up the webpage and allow figwheel to finish connecting before you started evaluating cljs code?#2018-12-0422:41eccentric JThe figwheel page with the random port?#2018-12-0514:37lispers-anonymousIt would be going to a web browsers and loading up localhost on whatever port your application is hosted on.#2018-12-0518:02eccentric JOh in that case yes, I was viewing the web application and figwheel has built the project.#2018-12-0421:29dpsuttonyour repl says "pending-cljs" it hasn't finished the transition from clj -> cljs#2018-12-0421:40macrobartfastwhat are your setups for evaluating code/seeing errors?#2018-12-0422:10chris_johnson@macrobartfast I use cider and emacs (currently in OSX “GUI” emacs but fullscreen with no menubar, previously in terminal) and for me the cider-error stacktrace window is displayed over the “other window” (e.g. if I C-c C-e in my editor, the cider-error buffer is displayed in my REPL window), but pressing q simply dismisses that buffer and returns me to my regularly-scheduled REPL buffer#2018-12-0422:12chris_johnsonNot sure what config difference would lead to that different behavior but what you describe is tooth-grindingly poor quality of life. If digging through my .emacs.d can help you not have that, I’m happy to do it. 😇#2018-12-0422:42eccentric JIt’s been saying pending-cljs indefinitely#2018-12-0423:31eccentric JMy setup is figwheel, cider, spacemacs using a luminus web app template.#2018-12-0423:39macrobartfast@chris_johnson that is really helpful, and (when convenient) I'd actually really appreciate any .emacs.d archaeology...#2018-12-0423:39macrobartfastI've been in this situation for (embarrassed now!) about 2 years.#2018-12-0518:06eccentric JStill wrestling with my issues from yesterday. I’m running lein repl and lein figwheel in a project. I’m connecting to both through spacemacs + cider. Sometimes I can do C-C to send the top-level form under my cursor to the clj repl but in cljs I get that “No CLJS repls in the current session”. Also of note is cider says the cljs repl is indefinitely in a pending state.#2018-12-0518:15eccentric JIn the mean time I’ll read some docs about working with figwheel + cider and see if there’s a step in the process I’m missing. 🙂#2018-12-0518:28dpsuttonhow do you connect to the cljs repl?#2018-12-0518:28dpsuttoncider-connect-cljs?#2018-12-0518:35lispers-anonymousThat connects to an existing cljs repl. To start a new one you use cider-jack-in-cljs#2018-12-0518:58orestisIn the past I was able to start a CLJS Figwheel REPL just fine from Cider (via jack-in), but I’ve never found how to connect to an already running one. I’m not even sure if Figwheel actually starts a nRepl for you by default. #2018-12-0521:24eccentric J@dpsutton Correct. cider-connect-cljs#2018-12-0521:25dpsuttonand do you have the cider middleware correctly setup?#2018-12-0521:25dpsuttoni made a quick function to see what it is invoking without waiting for it#2018-12-0521:25dpsutton
(defun cider-copy-jack-in-command ()
  (interactive)
  (kill-new (plist-get (cider--update-jack-in-cmd (cider--update-project-dir '()))
                       :jack-in-cmd)))
#2018-12-0521:25eccentric J@orestis I’m using a luminus template that does start nrepl
Figwheel: Starting nREPL server on port: 7002
#2018-12-0521:25dpsuttonbut you need cider guts#2018-12-0521:25eccentric JOk, checking on that now#2018-12-0521:27eccentric J
:figwheel
  {:http-server-root "public"
   :server-logfile "log/figwheel-logfile.log"
   :nrepl-port 7002
   :css-dirs ["resources/public/css"]
   :nrepl-middleware
   [cider/wrap-cljs-repl cider.piggieback/wrap-cljs-repl]}
#2018-12-0521:28eccentric J#2018-12-0521:29eccentric JShould figwheel be a separate section or within profiles?#2018-12-0521:33eccentric JIt seems that cider/wrap-cljs-repl and piggieback are applied#2018-12-0521:37eccentric JAfter running cider-copy-jack-in-command I got
/Users/jay/bin/lein update-in :dependencies conj \[nrepl\ \"0.4.5\"\] -- update-in :plugins conj \[com.billpiel/sayid\ \"0.0.17\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.19.0-SNAPSHOT\"\] -- repl :headless :host localhost
but it seemed to have targeted my clj repl and not my cljs repl
#2018-12-0605:16dpsuttondoes anyone remember or know offhand of an updated brave and true emacs setup? We got an issue on CIDER and I thought someone had updated the for people following the book. ring a bell with anyone?#2018-12-0606:39eccentric JI remember some discussion a month ago but I don’t see any related issues or pull requests about it.#2018-12-0606:43eccentric JDoes this help? https://github.com/flyingmachine/emacs-for-clojure#2018-12-0617:51felipebarrosMany functions return stuff like:
({:month 1, :day 1, :human 5.3, :critter 2.3} {:month 1, :day 2, :human 5.1, :critter 2.0} {:month 2, :day 1, :human 4.9, :critter 2.1} {:month 2, :day 2, :human 5.0, :critter 2.5})
Is there a little command I'm missing that turns that into something like:
({:month 1, :day 1, :human 5.3, :critter 2.3}
 {:month 1, :day 2, :human 5.1, :critter 2.0}
 {:month 2, :day 1, :human 4.9, :critter 2.1}
 {:month 2, :day 2, :human 5.0, :critter 2.5})
That is, besides using multiple-cursors or macroing, of course. Tried cider-format-buffer but it doesn't interfere with situations like these since I guess it would be tricky to detect what was intentional or not.
#2018-12-0617:52felipebarrosBesides pprint#2018-12-0617:52felipebarrosHmm#2018-12-0617:52futuroThat sounds like the cider-repl-use-pretty-printing variable.#2018-12-0617:52futuroOr is this outside of the repl?#2018-12-0617:53futuroThere's also a slew of cider-pprint-*; perhaps one of those will do what you're looking for?#2018-12-0617:54felipebarrosYeah, just found those cider-pprint-* functions, and they solve my problem documenting code snippets I try, but both in buffer and at the repl they are returned without pretty printing.#2018-12-0617:54felipebarrosI don't have that variable it seems...#2018-12-0617:55felipebarrosOh, I have cider-repl-use-pretty-printing and cider-repl-toggle-pretty-printing, nice 😄#2018-12-0617:55felipebarrosThanks#2018-12-0617:58dpsuttonif you hit , in the repl you'll see some handy options#2018-12-0617:58dpsuttonone of which is require-pretty#2018-12-0617:59dpsuttonor toggle-pretty i think#2018-12-0617:59felipebarrosOh, the incantation to pprint to comment in a buffer: C-c C-v C-f C-c C-d gotta love Emacs 🙂#2018-12-0617:59felipebarros@dpsutton Oh, nice, I must check those options more carefully.#2018-12-0618:00felipebarros,toggle-pretty yeah#2018-12-0618:00felipebarrosperfect#2018-12-0618:00dpsuttonrequire repl utils is a favorite of mine as well#2018-12-0618:00felipebarrosHm, aren't those the default repl utils like dir, source, etc?#2018-12-0618:01felipebarrosAt least with my setup those are loaded by default#2018-12-0618:01felipebarrosIn Cider at least#2018-12-0618:01felipebarrosI know they aren't in a plain repl#2018-12-0618:02felipebarrosC-u C-c C-p also works just the same as C-c C-v C-f C-c C-d and is much more accessible.#2018-12-0618:58dpsuttonthey are in user by default. but when you switch namespaces they will no longer be there#2018-12-0618:58dpsuttonthat second shortcut looks sarcastic lol#2018-12-0809:42Daoudahey guys, i am completly new at at emacs and functional programming, so i am reading Clojure for the brave and true and trying to get emacs set up to start writing some clojure code, but i keep getting this error
Warning (emacs): Unable to activate package `ghub'.                                                                                                 
 2Required package `let-alist-1.0.5' is unavailable                                                                                                   
 3Warning (emacs): Unable to activate package `magit'.                                                                                                
 4Required package `let-alist-1.0.5' is unavailable                                                                                                   
 5Warning (emacs): Unable to activate package `ghub'.                                                                                                 
 6Required package `let-alist-1.0.5' is unavailable                                                                                                   
 7Warning (emacs): Unable to activate package `cider'.                                                                                                
 8Required package `seq-2.16' is unavailable                                                                                                          
 9Warning (emacs): Unable to activate package `ghub'.                                                                                                 
10Required package `let-alist-1.0.5' is unavailable                                                                                                   
11Warning (emacs): Unable to activate package `magit'.                                                                                                
12Required package `let-alist-1.0.5' is unavailable                                                                                                   
13Warning (emacs): Unable to activate package `ghub'.                                                                                                 
14Required package `let-alist-1.0.5' is unavailable                                                                                                   
15Warning (emacs): Unable to activate package `cider'.                                                                                                
16Required package `seq-2.16' is unavailable    
i don't know how to get out of this. any help please?
#2018-12-0809:43Daoudasystems info `#2018-12-0809:44Daouda
debian 9, emacs:  emacs -version
GNU Emacs 24.5.1
Copyright (C) 2015 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
#2018-12-0810:29orestisI can’t help with the emacs stuff, but that books introduction is very old and out of date these days. You don’t need emacs to get started with clojure. You can also work with Vs code, atom, or Cursive. #2018-12-0810:30orestisOr even without an editor at all, see http://jr0cket.co.uk/2018/07/New-Clojure-REPL-experience-with-Clj-tools-and-rebel-readline.html#2018-12-0810:31orestisNeed to go, but do have a look at the above and see if it doesn’t help you play with Clojure a little bit easier, without getting emacs in the way. #2018-12-0810:39alanforrBoth let-alist-1.0.5 and seq-2.16 are on elpa https://github.com/magit/magit/issues/3414 https://elpa.gnu.org/packages/seq.html Adding ELPA to the sources in your init file might help https://www.emacswiki.org/emacs/ELPA#2018-12-0812:45Daoudathanks guys, those links helped 🙂#2018-12-0823:06practicalli-john@quieterkali if you would like to use Emacs for Clojure development, then there are excellent install instructions in the official docs http://www.cider.mx/en/latest/installation/ Or if you want a Vim/Emacs combination, try Spacemacs https://practicalli.github.io/spacemacs/ The other editors I recommend are http://Aton.io, VSCode, or IntelliJ - as mentioned here https://clojurebridgelondon.github.io/workshop/development-tools/#2018-12-0823:08Daouda@jr0cket actually i switched to Spacemacs, trying to understand how it works#2018-12-0823:08Daoudado you know how to create a new forder?#2018-12-0823:11practicalli-johnSPC f f will create any missing folders for you when you just type in the name of a file (or M-m f f if you are only using Emacs style editing).#2018-12-0823:15practicalli-johnSo if you have project/src/ folder and want to create a project/test/core.clj file then you would SPC f f and use the helm popup to have a path of project/test/core.clj which should show test.clj file in the helm list with a [?] at the end to show that it would be created. Press RET to create a new buffer with that file name. When you first save SPC f s Emacs will ask you if you want to create the missing test folder. This works for multiple folders.#2018-12-0823:16practicalli-johnIf you have a lot of Spacemacs specific questions we do have a #spacemacs channel too#2018-12-0823:21Daouda@jr0cket thank you very much your answer 🙂#2018-12-1019:36macrobartfastdoes anyone know how to grep with projectile in a project other than the currently selected one?#2018-12-1121:21vemvFirst read a dir name with e.g. (ido-read-directory-name "Where: "), then bind default-directory to that value (`let`) and invoke your grep function within that let The point being, ido-read-directory-name defaults to your current project but you can easily change it to something else#2018-12-1020:11lispers-anonymousIn that case I would just use rgrep and point it to the directory of the other project. Not sure how to do with projectile#2018-12-1109:17practicalli-john@macrobartfast I use a layout for each project I work with, so simply switch to the right layout and search project. Not quite what you asked for, but may be of interest.#2018-12-1115:40macrobartfast@jr0cket I'll look at that... thanks!#2018-12-1121:26vemvTIL https://github.com/emacs-lsp/lsp-java exists, looks powerful. In previous occasions whenever I had to do some serious Java I abstained from Emacs also I was thinking, one could hack it to provide accurate completions in clojure buffers. e.g. for (.| some-object),#2018-12-1121:27vemv| being the cursor one could build 'fake' java code on the fly, figure out the completions for that, and offer them for clojure#2018-12-1122:27futuroJava completion with cider worked for me once I included the source tarball from maven, but not before.#2018-12-1122:52vemvIIRC there's the annoyance that for each .jar dependency, a "source variant" (not the exact term) has to be specified, which neither Lein or Cider automate (I don't think using LSP would fix this to be clear)#2018-12-1122:56vemvIn any case I don't think CIDER does type inference, so completions aren't so accurate for Java interop that spans more than one symbol. That's what I had in mind some clojure+lsp+emacs hack#2018-12-1123:00futuroYeah, that's been my experience with cider, which was sort of a non-starter. Eclipse handles it just fine, though I'm not sure how exactly it does that.#2018-12-1123:01futuroThat's good to know about CIDER and type inference, I didn't know that was a goal of the java LSP implementation.#2018-12-1123:41vemvI explained myself badly 🙂 with inference I meant, given (-> some-obj .|)#2018-12-1123:42vemvhow do you know the type of some-obj for completions?#2018-12-1123:44futuroI haven’t the foggiest, but that sounds like a really lovely feature. #2018-12-1122:27futuroAnd when I was doing Android development, I used the Eclipse completion server to get completion for Java code, though I can't remember the setup off the top of my head (and this was in ~2012)#2018-12-1122:28futuroWhich isn't really making any comments on a java LSP server for emacs; that sounds really cool.#2018-12-1208:39didibusThere's a few LSP for emacs packages right now. I'm not sure which one will win. But also keeping an eye out for: https://github.com/snoe/clojure-lsp/blob/master/README.md#2018-12-1208:43didibusHere's the packages for emacs I meant: https://github.com/joaotavora/eglot , https://github.com/sourcegraph/emacs-lsp and https://github.com/emacs-lsp/lsp-mode#2018-12-1208:47vemv@didibus that's ace, didn't know one could get homogeneous support for N languages with just 1 package 🙂#2018-12-1208:50didibusHaha ya, I havn't tried any yet though. Eglot actually looks like it might be a better emacs lsp client then lsp-mode honestly. #2018-12-1209:00vemvI would have said the opposite given the contributor/commit count although joaotavora is a good author 🙂#2018-12-1209:00didibusI'm purely going of README gut feeling 😋#2018-12-1209:02didibuslsp-mode having just gone through a major refactor and breaking upgrade, makes me feel like maybe the initial code wasn't great. It also seems to rely on an assemble of other packages which I'm always wary about. #2018-12-1209:02didibusBut, I'll probably try both and pick my favorite#2018-12-1209:03didibusAlso Eglot has gifs showing how cool it is#2018-12-1209:05vemvgood luck with the experimentation!#2018-12-1209:09didibusThx!#2018-12-1512:15bozhidarJust keep in mind that regardless of the client uniformity you also have to deal with the LSP server differences. When I read about features that auto-restart frequently crashing servers that didn’t fill me with optimism. 😄#2018-12-1518:11vemvI had a sweet experience with tide, essentially faced no issues, everything worked OOTB and with good performance. Probably emacs-lsp and such are one level of complexity above Tide though, since they aim for something generic. Have you played yet with these @didibus @U051BLM8F ?#2018-12-1519:53bozhidarI guess we can say the same when we compare LSP to specific language extensions. 🙂 No, I haven’t. I don’t do much programming these days outside of my small OSS projects. For Clojure CIDER’s exactly what I need, and in Ruby I’m way too used to program without any editor support. 😄 I guess I should check out some Ruby LSP server one of these days.#2018-12-1519:55bozhidarIf I ever get to do more Haskell or Erlang I might check out the offerings for them as well.#2018-12-1519:59didibusI tried lsp-mode and lsp-java. I think there's good potential. The good part is that it was snappy. The bad was that lsp-mode and lsp-java are in big flux. I think its too soon to use them. They're still going through some big rewrite. I also couldn't get everything to work. I'll try Eglot next to compare. And I'll be keeping an eye out on lsp-mode as it stabalizes.#2018-12-1208:53didibusNow I might just try eglot tmr and clojure-lsp 😋#2018-12-1508:11felipebarrosHas anybody here ever seen an orgmode style guide in the lines of clojure-style-guide? I find that deciding on how the data should be placed on my own is a big time sink and reason for many hours changing how things are formatted. If I could just follow a wise set of guidelines it would surely help me tremendously.#2018-12-1508:14felipebarrosIt's one of the few things I'll always be envious of Hyperbole.#2018-12-1512:18amdtI’ve been meaning to check out Hyperbole for a while, how does it handle that situation better than Org?#2018-12-1523:05felipebarrosEverything is forced into a structure by default. It has its pros and cons, of course, but I'm someone that struggles when given too much choices, so I think it is a good thing when all I need is to lay things out fast and be productive. 🙂 Hyperbole is a big project and is very opinionated, so I think it is a great thing to play with, even if just to have a view of another great tool for Emacs, but I couldn't handle it in the long term and Org just felt more practical and since it has wide recognition, much more usable. I'm talking mostly about Koutliner, which is what really interested me in the Hyperbole set of tools. Anyway, it is definitely worth to play with it over a weekend.#2018-12-1523:07felipebarrosI loose a lot of time trying to rationalize how to lay things out in orgmode.. bookmarks, todos, calendar entries, articles, links to read later... each thing has its needs and it seems that org can deal with all and be poor at dealing with most.#2018-12-1814:32amdtThanks for following up. I sometimes feel the same way about Org. It’s very flexible, but I’m not always sure how to organise my information. I’ll give Hyperbole a try!#2018-12-1721:18theeternalpulsehttps://www.lvguowei.me/post/magit-rebase/ wish I saw this a long time ago#2018-12-1721:46lilactownit is one of the most useful parts of magit IMO#2018-12-1800:13theeternalpulseI'm forced to rebase with a work project so I've found this most daunting. I used to hate how I'd do an F pull from upstream and it would be defaulted to rebase and I had no idea what it was doing.#2018-12-1800:14theeternalpulsebut it's pretty easy, albeit I've gotten some false renames from rebases, not sure if interactive would solve it#2018-12-1805:43lilactown90% of the time I just do f o to fetch origin, master, and then r e to rebase origin/master onto my branch#2018-12-1812:02jumarI still do pushing, pulling & rebasing on command line. I'm not sure what's your workflow but I really feel that magit is hiding way too much - I basically cannot see what's happening under the hood. I tried @lilactown’s workflow with f o and r e but found that the rebase ended with conflicts and magit didn't even tell me (only after doing magit status again) - just showed "rebasing...done"#2018-12-1813:45andrea.crotti@jumar just press $ and you see exactly what commands magit is running#2018-12-1821:49theeternalpulseyeah, I like magit because it is hiding a lot, unless I look. It is useful for debugging issues with other build steps that are git unrelated, but for the most part magit is a pretty solid tool that I have confidence in.#2018-12-1823:13theeternalpulseI'm using Ripgrep for counsel but not sure how to indicate file exclusions. I used to use AG and could just provide -G=.*js or something but now I can't. I have my rg command as follows
(setq counsel-rg-base-command
          "rg -i -M 120 --no-heading --line-number --color never '%s' .")
#2018-12-1901:43practicalli-john-g*.el pattern for just elisp files or -g!*.el pattern to not searching in elisp files. Fairly sure I am using ripgrep with helm#2018-12-1901:45theeternalpulsethe g flag doesn't seem to take, even with I pass in that in the command line#2018-12-1901:45theeternalpulseI get error code 1 in emacs#2018-12-1901:51practicalli-johnSorry, I don't have a setup with Ivy and counsel. I only have helm.#2018-12-1901:52theeternalpulseis there a helm varaible for the rg command?#2018-12-1901:54theeternalpulseif I omit the search term that works, so with just -g*.el it returns the files, but once I add a search term it throws an error. I remember vaguely this was mentioned in the chat, but it's disappeared since#2018-12-2009:23baptiste-from-parishello friends, As a newbie in elisp : I don’t know how to get a map-indexed, any idea ?#2018-12-2012:05mgrbyteseq-map-indexed should work#2018-12-2012:08mgrbytee.g, try evaluating: (seq-map-indexed (lambda (x y) (format "%s %s" x y)) '(1 2 3))
#2018-12-2014:17cmack@baptiste-from-paris just in case you haven’t found it, M-x apropos (bound to C-h a by default IIRC) is a great way to search for things within emacs. If you have something like helm or counsel installed and configured, they have commands that make filtering apropos results easier with fuzzy match…#2018-12-2014:29baptiste-from-parisThanks !#2018-12-2014:29baptiste-from-parisBuilt my map-indexed 😅#2018-12-2020:48danielcomptonhttps://emacsair.me/2018/12/19/forge-0.1/#2018-12-2020:49danielcomptonThis is very cool. I tried magithub, but I found it to be quite slow and a little bit buggy#2018-12-2020:57practicalli-john@danielcompton Magithub can be slow if its always 'online'. Recent Spacemacs config sets Magithub to go 'online' when the user asks (to update pull requests / issues from the project). When 'offline', magithub does not slow down magit.#2018-12-2020:58danielcomptonThere's two parts to 'slow', I found it very slow on initial download, and yes the default of always online makes things even worse in day-to-day usage#2018-12-2020:58danielcomptonBut it was the initial download being slow that stopped me going any further with it#2018-12-2020:58danielcomptonAlso, it seemed to break my (uncustomised) magit status buffer#2018-12-2021:09danielcomptonBut I appreciate the author creating it#2018-12-2121:32SenI tried to find solution in Spacemacs channel but was redirected here. How can I make color highlighting of the function name in a function call to be colored differently from the arguments? It is default in IntelliJ and VScode, so I wonder maybe I broke something in my Spacemacs config? Here is what I have in Spacemacs, note (example-fun m k v)#2018-12-2122:32theeternalpulse@armikhalev I found this which helps find out which font face you're at, then you can customize the font face https://gist.github.com/Wilfred/f7d61b7cdf9fdbb1d11c#2018-12-2123:28SenThanks, I'll check it out 👍 #2018-12-2123:43theeternalpulseIt actually didn't work much for me, you have to add the (interactive "d") to it, and shwo a message, but I only get something like h1-line as the face#2018-12-2203:02SenUnfortunately, I don't know how to use this, even to that degree#2018-12-2321:13theeternalpulseyeah I jumped the gun, it may take some reading up on emacs and emacs lisp before being able to really understand it. I'm always on ergoemacs to try and get a grasp of all the emacs concepts.#2018-12-2417:55eccentric J
'(popwin:special-display-config
    (quote
      (("^\\*Flycheck.+\\*$" :regexp t :position bottom :noselect t :dedicated t :stick t)
        ("*cider-doc*" :height 0.4 :position bottom :noselect nil :dedicated t :stick t)
        ("\\*cider-(error|repl|test).*\\*" :regexp t :width 0.4 :position right :dedicated t :stick t)
        ("*Google Translate*" :height 0.4 :position bottom :noselect t :dedicated t :stick t)
        ("^*WoMan.+*$" :regexp t :position bottom)
        ("*nosetests*" :position bottom :noselect nil :dedicated t :stick t)
        ("*grep*" :position bottom :noselect nil :dedicated t :stick t)
        ("*ert*" :position bottom :noselect nil :dedicated t :stick t)
        ("*undo-tree Diff*" :height 0.3 :position bottom :noselect nil :dedicated t :stick t)
        ("*undo-tree*" :width 60 :position right :noselect nil :dedicated t :stick t)
        ("*Async Shell Command*" :position bottom :noselect nil :dedicated t :stick t)
        ("*Shell Command Output*" :position bottom :noselect nil :dedicated t :stick t)
        ("*compilation*" :height 0.4 :position bottom :noselect t :dedicated t :stick t)
        ("*Process List*" :height 0.4 :position bottom :noselect nil :dedicated t :stick t)
        ("*Help*" :height 0.4 :position bottom :noselect t :dedicated t :stick t))))
I’m trying to get popwin to treat all cider-(repl|error|test).* the same but it doesn’t appear to work.
#2018-12-2505:51cmack@jayzawrotny you might not be escaping the parens
ELISP> (rx "*cider-" (or "error" "repl" "test") (0+ nonl) "*")
"\\*cider-\\(?:error\\|repl\\|test\\).*\\*"
#2018-12-2507:36eccentric JThanks, I’ll try that!#2018-12-2507:47eccentric JIt seems to be working. Thanks again! I tried every combination of escaping I could think of, must have just not landed on the right combo.#2018-12-2721:40theeternalpulseI have a unit test I'm making for a mode I'm working on that kills a particular region and puts it in a variable but the test doesn't seem to register region-active-p as true
(ert-deftest kill-region-test ()
  (with-current-buffer (get-buffer-create "*rack em tests*")
    (rack-em-start)
    (insert "Testing\n123")
    (goto-char 0)
    (set-mark 0)
    (push-mark 4)
    (activate-mark)
    (should (equal nil rack-em--yank-list))
    (call-interactively 'rack-em-kill-region)
    (should (equal '("Test") rack-em--yank-list))))
#2018-12-2721:40theeternalpulseall the rack-em-start does is initialize rack-em--yank-list as '()#2018-12-2721:41theeternalpulseinside rack-em-kill-region I have
(defun rack-em-kill-region
  (beg end)
  (interactive (list
                (region-beginning)
                (region-end)))
  (if (region-active-p)
      (progn
        (kill-region beg end)
        (rack-em--add-from-kill-ring))))
#2018-12-2721:41theeternalpulseand I can't seem to debug from the overseer test in emacs either#2018-12-2721:42theeternalpulse
(defun rack-em--add-from-kill-ring ()
  (add-to-list 'rack-em--yank-list
               (substring-no-properties (first kill-ring))))
#2018-12-2802:59ahungryIs there a CIDER option to keep the REPL ns synced with the current clojure buffer ns?#2018-12-2804:41narendraj9I don't think there is anything for that. I think you will have to write a function that changes the repl ns calling the command in a hook that gets executed when the selected buffer changes.#2018-12-2812:59vemvI've been planning on creating a custom keyboard for a while, that suits my Emacs habits. Perhaps it'll appeal to your tastes too! https://github.com/zenmacs/keyboard If you're interested, hit Watch -> Releases only, that'll be my "newsletter"#2018-12-2816:13mpenetInteresting. I wonder if mixing staggering+octolinear style rows is comfortable in practice#2018-12-2820:12vemvGood observation! It's a risk, OTOH I don't mind a few frowned-upon choices (qwerty, staggered, chiclet) so it wouldn't surprise me if I could work with this hybrid as well#2018-12-2820:22mpenetYou should check the Atreus btw. I am a heavy emacs user and it's a match made in heaven. Its layout was tailor made for it (and portability) and generally I think the designer made some smart choices. #2018-12-2820:31vemvI've looked into it, much respect to Technomancy. My approach is dramatically different though (not unlike my .emacs.d which also is a bit heretic)#2018-12-2815:55mattly@vemv I have a Planck, put modifiers as mod taps on home rows: https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/mattly/readme.md#2018-12-2820:16vemvNice stuff! Good to know about the QMK firmware as well#2018-12-2815:55mattlyI’ve a few tweaks to make yet but overall I like the mod taps a lot#2018-12-2903:26theeternalpulseHow would I unit test an interactive function that kills a specific region? I'm looking for examples because my test doesn't seem to register when it hits the function that there's an active region.#2018-12-2917:40theeternalpulseI ended up doign this
(goto-char 0)
    (push-mark 5 t)
    (activate-mark)
I've seen examples using set-mark but didn't really get that working, not sure if this ideomatic
#2019-01-0301:26bartukahi ppl, when I run M-x jack-in-clojurescript I get the prompt to choose the CLJS REPL type (which usually choose figwheel) and then after the figwheel application is up and running I received a Stdin prompt#2019-01-0301:27bartukaI have the
(require 'cider)
(setq cider-cljs-lein-repl
      "(do (require 'figwheel-sidecar.repl-api)
           (figwheel-sidecar.repl-api/start-figwheel!)
           (figwheel-sidecar.repl-api/cljs-repl))")
in my init.el
#2019-01-0301:41bartukamy cider version 0.19.0#2019-01-0302:01vemvThere's #cider Also for this kind of issues, a Github one should be more useful for other people experiencing the same#2019-01-0302:06bartukaoh, thks!#2019-01-0422:34ag@UBSREKQ5Q have you found out how to do this with the latest cider?#2019-01-0422:39bartukaoh yes, I had some packages outdated. I used the lein ancient upgrade and it upgraded the piggieback and sidecar packages for me. And then, it worked#2019-01-0422:40agbut have you found how with the latest CIDER forcefully invoke something in the repl immediately after jack-in?#2019-01-0500:12aghttps://clojurians.slack.com/archives/C0617A8PQ/p1546646053225900#2019-01-0323:26mattlyis there a package for emacs that highlights the contents of the bracket pair you're inside of, similar to this one for VSCode?#2019-01-0323:26mattly#2019-01-0323:27lilactownwhatever amalgamation of packages the clojure layer in spacemacs has, changes the pair of brackets I’m in to a specific color#2019-01-0323:27mattlyyeah, that's fairly pedestrian#2019-01-0323:28mattlyI'd settle for background highlighting or so of the contents, since I wouldn't expect to be able to draw nice lines like you can in VSCode#2019-01-0323:32vemvhttps://github.com/DarthFennec/highlight-indent-guides might do the trick?#2019-01-0323:42mattlyhmm, I'll give it a shot, thanks#2019-01-0323:28mattlyI've got some monster brackets of much more ambitious scope than my screenshot above#2019-01-0403:04ennhighlight-sexp does that#2019-01-0701:22felipebarrosSorry, but I can't seem to find that package or function. Are you referring to cljr--highlight-sexp?#2019-01-0708:15pesterhazyhttps://github.com/daimrod/highlight-sexp/blob/master/highlight-sexp.el#2019-01-0714:09ennYeah, it's an older library, I don't know if it ever made it into the package repos.#2019-01-0804:29felipebarrosOh, I see. Thank you!#2019-01-0906:58MacrozI recently upgraded to a new emacs + cider and am looking at my extensions with a critical eye. What is the best completion setup these days? company-mode?#2019-01-0907:46vemvI'd say so yeah, haven't perceived changes in that area in the last few years#2019-01-0908:46bozhidarYeah, it’s company-mode.#2019-01-0921:07ennIs there a way to tell projectile to consider an entire git repo one project, no matter how many profile.cljs are present? I tried messing with projectile-project-root-files-functions but I don't really know how it works.#2019-01-0923:01chopmo@enn This question rings a bell, but I'm not 100% sure how I fixed it way back... I think this snippet might be it:
(projectile-project-root-files
   (quote
    ("rebar.config" "project.clj" "build.boot" "SConstruct" "pom.xml" "build.sbt" "gradlew" "build.gradle" ".ensime" "Gemfile" "requirements.txt" "setup.py" "tox.ini" "composer.json" "Cargo.toml" "mix.exs" "stack.yaml" "info.rkt" "DESCRIPTION" "TAGS" "GTAGS")))
#2019-01-0923:01chopmoSo, whitelisting the files that mark the root of a project (and leaving eg. profile.clj out)#2019-01-0923:02ennIdeally I’d be able to do it for one specific project without changing the default behavior#2019-01-1005:38chopmoRight...I now realise that I misremembered. What I did was use a .dir-locals.el file in the root of a project to force the type. Contents:
((nil . ((projectile-project-type . lein-test))))
#2019-01-1016:13ennaha, nice#2019-01-1016:13ennThe more I think about it, though, the more I am thinking maybe if this is what I want I don't need Projectile and should just use, e.g., counsel-git.#2019-01-1111:58bozhidar@enn Depends on your use-case. If you just want a listing of files probably that’d be better. 🙂 Nested projects are always tricky to get right, as different people have different ideas how they should behave.#2019-01-1114:08ennYes, indeed. I think you could make strong arguments for either behavior (including everything in the repo, or including only the innermost project)#2019-01-1114:11bozhidarYeah, probably I should make it configurable, so people can select one of those options.#2019-01-1114:11bozhidarThat would be pretty easy.#2019-01-1114:11bozhidarI never use multi-project repos, so I never experienced the problem myself. 🙂#2019-01-1114:17ennI just started a new job which organizes things that way#2019-01-1114:23vemv> Is there a way to tell projectile to consider an entire git repo one project, no matter how many profile.cljs are present? how desirable is this though? giantic projects don't seem efficient to handle (to either a human or a computer) when facing these monorepos, I just consider its N projects separately. So I open the N projects and switch between them as I work. Very rarely I have to do a global grep or such cc @enn (just giving out an idea)#2019-01-1114:33mccraigmccraig@vemv i've got a .projectile at the top-level of our monorepo, that seems to be working ok for aging across the whole project - that .projectile contains the exclusions for aging across the whole monorepo, so that you don't get 000s of results from js build products etc#2019-01-1114:35mccraigmccraig@vemv it's pretty common for me to want to work on the model, api and client for a feature and search which can span all modules is quite useful#2019-01-1114:40vemvfair enough! One also can open "N + 1"... each subproject, plus the monorepo itself things like the directory tree become neater with these subproject views#2019-01-1114:47mccraigmccraigoh, right - i never use a directory tree - i tend to just helm across all the files in the repo#2019-01-1114:50ennSame#2019-01-1118:11Drew VerleeIs there a way to configure how single semicolons indent in clojure-mode?#2019-01-1119:19Drew VerleeOr even a more basic question, what specifically is handling indentation given i'm in a cljs file, with clojure-mode on, using spacemacs? It's hard for me to figure out what program is controlling what sometimes. Which is usually a blessing as everything just works.#2019-01-1119:24agJust to make sure: you know that single semicolons are supposed to be used only for end-of-line comments, right?#2019-01-1119:29Drew VerleeI understand that.#2019-01-1119:30Drew VerleeWell, i understand thats a common style.#2019-01-1119:32Drew VerleeI think i'll be happier finding a way to customize ;, than the alternatives.#2019-01-1119:32agI’ve seen people using single semicolons instead of doubles and that does sometimes mess up indentation#2019-01-1119:33agbut if you use them only for end-of-line comments, they do work as intended#2019-01-1119:35Drew VerleeThanks. i understand the convention its employing and knowing that, still want to change it. If that's not possible, thats good to know, if it is, i'm trying to figure out how.#2019-01-1119:35Drew VerleeI understand its not a bug and it working as the creator intended. I'm just asking if its configurable basically.#2019-01-1119:36aghmmm… then in that case I’m not sure what you’re trying to change#2019-01-1119:36Drew Verleei want single semicolons to behave as double do now.#2019-01-1119:37Drew Verlee
------------------------ ; <- dont push to middle
;;
#2019-01-1119:37Drew Verleewith - as whitespace#2019-01-1119:38agI have to tell you: - probably not a good idea. I’m not entirely sure how to convince you but single semicolons at the line ending with multiple lines kinda align nicely#2019-01-1119:38agI think that’s why they work as they are#2019-01-1119:38aggenerally in lisp modes#2019-01-1119:40aghttps://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html#2019-01-1119:42agBut if you insist, you can customize comment-indent-function#2019-01-1120:45Drew VerleeI understand its asking a lot. But would you be able to provide some direction as to how i'm supposed to use that function? Based on [this stack overflow question](https://stackoverflow.com/questions/26312317/wrong-indentation-of-comments-in-emacs) i tried this:
(defun dotspacemacs/user-config ()
  (defun foo () (setq comment-indent-function (lambda () 10)))
  (add-hook 'clojure-mode-hook 'foo))
and it doesn't change the indenting. Any quick guidance you can give would be great.
#2019-01-1121:00agI'm out for lunch. I'll try to dig through the docs when I'm back #2019-01-1121:02agIf I remember it right comment-indent-function by default points to default-indent-function. You need to fork it#2019-01-1121:26agI’m back… sorry I was wrong, the function you need to fork is this:
(defun comment-indent-default ()
  "Default for `comment-indent-function'."
  (if (and (looking-at "\\s<\\s<\\(\\s<\\)?")
	   (or (match-end 1) (/= (current-column) (current-indentation))))
      0
    (when (or (/= (current-column) (current-indentation))
	      (and (> comment-add 0) (looking-at "\\s<\\(\\S<\\|\\'\\)")))
      comment-column)))
#2019-01-1123:25Drew VerleeThanks, ill give this a try.#2019-01-1410:26Bravihi everyone. I’m trying to create a custom indentation in clojure mode, in my spacemacs. basically, I want to indent this
(rum/defc some-component
  < rum/static
  some/other-thing
  []
  ...)
like so
(rum/defc some-component
  < rum/static
    some/other-thing
  []
  ...)
#2019-01-1410:26Bravican’t figure out how to. I keep fiddling with define-clojure-indent, but I’m not entirely sure how it works#2019-01-1410:27Bravimaybe there’s an indentation master out there that could help me 😄#2019-01-1412:29vemvNot familiar with Rum. Could the following...
< rum/static
    some/other-thing
hypothetically have this other syntax instead?
[< rum/static
    some/other-thing]
Would that make sense? If so, a version with delimiters would be easier to specify with define-clojure-indent
#2019-01-1412:34Braviwould you mind showing me an example of how to specify a delimiter please?#2019-01-1412:37vemvOne doesn't specify delimiters, but forms.
[< rum/static
    some/other-thing]
(with "delimiters") is 1 form, while
< rum/static
    some/other-thing
is 3 forms, which makes clojure-mode's work harder So my question is, would it make sense if Rum used [] syntax?
#2019-01-1414:12Braviah right I see. no, Rum doesn’t use that syntax unfortunately#2019-01-1414:13vemvok it doesn't, but does it have those semantics? I really don't know that < means in your original snippet#2019-01-1514:38Bravioh its Rum’s syntax. basically you define a component like so
(rum/defc hello-world [] [:div "hi])
and then you can add so called macros to it with this syntax
(rum/defc hello-world < some-macro []
  [:div "hi])
#2019-01-1514:40vemvIs the following valid?
(rum/defc hello-world < some-macro another-macro awesome-macro cosmic-macro []
  [:div "hi])
#2019-01-1514:49Braviyes it is 🙂#2019-01-1514:51Braviif not that, perhaps you’d know how I can indent reagent’s with-let bindings. this is the code
(reagent/with-let [some-variable 1
                   other 2]
  (do-something "Hello world"))
#2019-01-1514:52Braviand I want to align key value pairs inside [] basically#2019-01-1514:52Braviso for this to become
(reagent/with-let [some-variable 1
                   other 2]
  (do-something "Hello world"))

(reagent/with-let [some-variable 1
                   other         2]
  (do-something "Hello world"))
#2019-01-1514:57vemvthat one is easy, you just have to add "reagent/with-let" to https://github.com/clojure-emacs/clojure-mode/blob/1ccef7b2b7a063aa42416d1518e8e7228d90a78d/clojure-mode.el#L1109#2019-01-1514:58vemv> yes it is 🙂 so, I advice to create your own defc macro wrapper, which invokes the original but adds a [] syntax#2019-01-1514:59vemv
(bravi/defc hello-world [< some-macro another-macro awesome-macro cosmic-macro []]
  [:div "hi])
with that your original goal will become easier
#2019-01-1514:59Braviah got ya! thank you so much 🙂 I’ll play around with that now#2019-01-1515:14Bravithis wouldn’t work, would it?
(defun clojurescript-indentations ()
  (append clojure-align-binding-forms
          '("reagent/with-let" "r/with-let")))


(add-hook 'clojurescript-mode-hook #'clojurescript-indentations)
#2019-01-1515:18vemvit should work you can also run (append clojure-align-binding-forms '("reagent/with-let" "r/with-let")) in an elisp repl to ensure that the code has run check that regular let is being aligned too, obviously if regular let isn't, others won't either#2019-01-1515:20Bravinice, thank you so much! 🙂 it works#2019-01-1411:52mpenetany thoughts about use-package?#2019-01-1411:53mpenetseems super neat to keep things organized and given who's the author I suspect it's probably quite cleanly done#2019-01-1518:52theeternalpulseI used it mainly from the suggestions of this thread https://sam217pa.github.io/2016/09/02/how-to-build-your-own-spacemacs/ it's used extensively in spacemacs and I used it to follow the guide on my way to my own config#2019-01-1412:10vemvalso has the nice side-effect of speeding up Emacs startup 🙂 I don't happen to use it, but I'd say it wraps patterns that advanced Emacs users end up implementing themselves anyway.#2019-01-1412:13mpenetI think my conf already does most of these optimisations#2019-01-1412:13mpenetbut still, for organisations sake it seems quite good#2019-01-1412:13mpenetgrouping stuff together#2019-01-1412:16vemvI agree, would migrate my handcrafted stuff to u-p if I had the time or a strong reason (other than "tidying up")#2019-01-1412:18mpenetyeah I am clearly looking for a yak to shave#2019-01-1415:07ennI love use-package. It makes it so much easier to set up a new machine too.#2019-01-1507:55danielcompton@mpenet yep I like use-package#2019-01-1507:56danielcomptonIs there a way in Emacs to rebind a function's definition when calling that function from inside another one?#2019-01-1507:56danielcomptonI want to rebind the function call to indent-pp-sexp to my own function#2019-01-1507:56danielcomptonhttps://github.com/emacs-mirror/emacs/blob/9530108fbc8bbf1ad5c1debe4b4f21da1238325b/lisp/cus-edit.el#L4608#2019-01-1507:57danielcomptonbut I only want the rebinding to happen when indent-pp-sexp is called from inside custom-save-variables. Is that something you can do with advice?#2019-01-1507:58danielcomptonI couldn't see anything that quite fit the bill#2019-01-1510:10narendraj9Have you already tried an :around advice with a cl-letf for the function you want to re-bind?#2019-01-1510:24danielcomptonNope, I thought I’d want some kind of replace#2019-01-1510:24danielcomptonOr conditional replace #2019-01-1510:29narendraj9Adding an advice to custom-save-variables with a cl-letf for indent-pp-sexp should achieve what you are trying to do, I think.#2019-01-1510:31danielcomptonAh, read up a bit more, think I see how it could work #2019-01-1508:44bozhidarCIDER 0.20 is out https://metaredux.com/posts/2019/01/15/cider-oslo.html Enjoy!#2019-01-1614:54jonpitherHave an issue with projectile not ignoring directories when doing a search (using grep, or ag), when I use the .projectile file, as specified here: https://projectile.readthedocs.io/en/latest/projects/#ignoring-files - anyone else had this?#2019-01-1616:22bozhidarThere’s some open PR about this. Likely a regression.#2019-01-1716:43farzanahow to can i enable-paredit-mode for clojure in spacemacs?#2019-01-1717:20agSomething like sp-use-paredit-bindings if I remember it correctly. #2019-01-1717:21agAlso you may want to address these in #spacemacs #2019-01-1717:23farzanathanks#2019-01-2121:07borkdudeIs it possible to have sorted bookmarks when I do C-x r b? E.g. the most frequently used at the top#2019-01-2121:41vemvI almost swear that paredit-forward-barf-sexp used to work on strings? e.g. given "a ()" I could achieve "a" ()#2019-01-2121:44vemvparedit's source explicitly forbids it, but perhaps I was enjoying the feature because of some circumstance#2019-01-2121:57richiardiandreaI think that works in smartparens, I know I know, I was never able to switch to it#2019-01-2207:57agyes, smartparens allows that. it has things like sp-slurp-hybrid-sexp#2019-01-2217:27vemvah, fantastic! good to know I have both paredit and smartparens in my config, the former being preferred. I guess I'll create a little wrapper that chooses one or the other barf impl, depending on whether we are inside a string.#2019-01-2319:23theeternalpulseI made a function as such
(defun user-prettier-eslint ()
    "Format the current file with ESLint."
    (interactive)
    (let* ((binary (executable-find "prettier-eslint_d"))
           (command (format "cat %s | %s --stdin | tee %s" buffer-file-name binary buffer-file-name)))
      (progn
        ;;(save-buffer)
        (shell-command command "*test-buffer*" "*prettier-eslint-errors*")
        (revert-buffer t t t))))

  ;; ===prettier-eslint
  (add-hook 'js2-mode-hook (lambda () (add-hook 'after-save-hook 'user-prettier-eslint nil t)))
  (add-hook 'web-mode-hook (lambda () (add-hook 'after-save-hook 'user-prettier-eslint nil t)))
and noticed that sometimes after saving a blank file is fed into the command. I uncommented the (save-buffer) to resolve it, but it seems redundant. I'm not sure if the blank content is some thing I have to wait for emacs to finish saving but wondering what the issue is.
#2019-01-2319:35vemvcould it be that your defun is being invoked N times per save? I think those hooks might pile up as you open more and more files#2019-01-2319:36vemvalso, the commented-out save-buffer would end up triggering your hook again, right? seems recursive#2019-01-2319:40theeternalpulseI thought so, but it doens't seem to since the doc says
Add to the value of HOOK the function FUNCTION.
FUNCTION is not added if already present.
FUNCTION is added (if necessary) at the beginning of the hook list
unless the optional argument APPEND is non-nil, in which case
FUNCTION is added at the end.
#2019-01-2320:01theeternalpulsegoing to restart to see if I can reproduce#2019-01-2322:05theeternalpulseseems this is happening randomly with the command itself, some calls to cat somefile.js | prettier-eslint_d --stdin gives a blank result#2019-01-2322:20vemvah, nasty!#2019-01-2322:23theeternalpulseseems to work when I use prettier-js and set the command to prettier-eslint_d.#2019-01-2322:24theeternalpulseI filed an issue in the meantime, not sure if it's some weird piping issue or the command with that argument#2019-01-2411:59madstapI'm learning org mode and I found that it breaks shift-left -right -up -down to navigate between buffers. Those commands mean things when the cursor is at headings and timestamps and stuff, which I guess I want to keep, but when the cursor is somewhere else it tells me user-error: To use shift-selection with Org-mode, customize ‘org-support-shift-select’. What I actually want in that situation is not shift-select, but to navigate between buffers. How can I accomplish this?#2019-01-2412:33madstapTo answer my own question,
(add-hook 'org-shiftup-final-hook 'windmove-up)
(add-hook 'org-shiftleft-final-hook 'windmove-left)
(add-hook 'org-shiftdown-final-hook 'windmove-down)
(add-hook 'org-shiftright-final-hook 'windmove-right)
#2019-01-2423:12theeternalpulseI was wondering, when adding hooks, when do you use #' over ' for the function symbols?#2019-01-2423:12dpsuttonhttp://endlessparentheses.com/get-in-the-habit-of-using-sharp-quote.html#2019-01-2520:07theeternalpulseMissed this, going to take a look!#2019-01-2423:13dpsutton(best resource that i know of)#2019-01-2504:21agcan someone share exact instructions how to get cider to work with figwheel-main pls. I’m trying to use piggieback but I don’t think it’s working…#2019-01-2504:21agso this clj -m figwheel.main -b dev -r works in cmdline… but I want to use cider#2019-01-2504:39ag- so. I have these in my deps.edn
com.bhauman/figwheel-main {:mvn/version "0.2.1-SNAPSHOT"}
           cider/piggieback          {:mvn/version "0.3.10"}
- I have these in my dev.cljs.edn
:target :nodejs
 :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}
but something seems to be missing ;(
#2019-01-2504:42dpsuttongot a public repo i can try it with?#2019-01-2504:44agoh… nevermind… it seems I set cider-default-cljs-repl to be figwheel facepalm#2019-01-2504:44dpsuttonlol. make sure that's in dir-locals 🙂#2019-01-2504:46agyeah.. I just did…#2019-01-2504:47dpsuttonsorry for your pain#2019-01-2504:47agnow… what do I need to set so it never prompts for default build e.g. dev?#2019-01-2504:47dpsuttonits frustrating when it works but doesn't quite#2019-01-2504:47dpsuttonnot sure about that one#2019-01-2504:48ag> sorry for your pain tis okay… life of a developer. inflicting pain to our brain and enjoying it is part of our nature I guess#2019-01-2504:48dpsuttoncider-figwheel-main-default-options ?#2019-01-2504:48dpsuttonyes that's it#2019-01-2504:48dpsuttoni'm gonna add that to our work profile as well#2019-01-2504:48dpsutton
(defun cider-figwheel-main-init-form ()
  "Produce the figwheel-main ClojureScript init form."
  (let ((form "(do (require 'figwheel.main) (figwheel.main/start %s))")
        (options (string-trim
                  (or cider-figwheel-main-default-options
                      (read-from-minibuffer "Select figwheel-main build (e.g. :dev): ")))))
    (format form (cider-normalize-cljs-init-options options))))
you can see it used here
#2019-01-2504:49agso what should it be? (setq cider-figwheel-main-default-options :dev) ?#2019-01-2504:49agthat doesn’t look right#2019-01-2504:50dpsuttoni think it's a string#2019-01-2504:50dpsuttonbut put that in dir locals don't globally set it#2019-01-2504:51agof course#2019-01-2504:51dpsutton":dev"#2019-01-2504:52aghmm… just “dev” I think worked for me#2019-01-2504:52agmaybe it’s the same…#2019-01-2504:52dpsuttonah. it puts it on actually#2019-01-2504:52dpsuttoncider-normalize-cljs-init-options runs over it#2019-01-2504:52dpsuttonbut yes it works either way#2019-01-2504:55agThank you Dan. Whew.#2019-01-2504:55dpsuttonof course!#2019-01-2504:55agsometimes I feel I’m back in javascriptland - things moving a bit too fast. but it’s a good thing… figwheel main and new nrepl and cider all these things are so effing dope#2019-01-2504:56dpsuttoni think figwheel main will be the standard for years (hopefully)#2019-01-2504:56dpsuttonsuper standard and boring#2019-01-2504:56dpsuttonit's very close to to just compiler options#2019-01-2714:14PlumpMathhi#2019-01-2714:14PlumpMathI want to see web-snippet screenshot using ob-clojurescript. What should I do?#2019-01-2714:16PlumpMath#2019-01-2714:17PlumpMathWhen I used to run javascript and html pages as orb-babel, I used to use a plug-in to show a screenshot, but I forgot the name..;;#2019-01-2714:25PlumpMathdd;#2019-01-2714:30PlumpMathah phantom.js#2019-01-2715:11PlumpMathBut like using phantom.js. ob-clojurescript looks very hard to take a screenshot of how it looks in the browser and upload right away.#2019-01-2718:11theeternalpulseI installed ivy but it can't find the counsel functions#2019-01-2718:18dpsuttonCounsel is a separate package isn't it?#2019-01-2718:19theeternalpulseah, I see, the readme says ivy/swiper/counsel are separate, but counsel includes ivy/swiper#2019-01-2921:40Anthony CiacciCross-post from #beginners I probably should've put in here: Has anyone set up in emacs a way for the kill command to skip putting a killed selection on the kill ring if the selection is just an empty string/blank lines?#2019-01-2923:33agFirst of all how are you “killing”? I’m suspecting this is evil/spacemacs problem rather than a vanilla emacs#2019-01-3020:36Anthony Ciaccimy emacs is based off http://aaronbedra.com/emacs.d/ with some minor modifications. Not really sure if it is based on evil or spacemacs : 0#2019-01-3010:01practicalli-john@ciacci1234 you could set up the backspace to delete a character (or region) without adding the deleted text to the kill ring. That is the only thing I can think of.
(global-set-key (kbd "<backspace>")
          '(lambda () (interactive) (backward-delete-char-untabify 1 nil)))
#2019-01-3020:35Anthony Ciaccithanks for the suggestion!#2019-01-3021:06practicalli-johnIf you are using the latest Spacemacs, the paste function (`p` in Evil normal mode) provides a transient state menu to cycle through the kill ring really easily. I use this to avoid needing a delete that doent add to the kill ring. It seems that the M-y, the yank-pop command does the same thing in normal Emacs (although I havent had chance to test it) https://www.gnu.org/software/emacs/manual/html_node/emacs/Earlier-Kills.html#2019-01-3021:08practicalli-johnand there is also Browsing the Kill Ring https://www.emacswiki.org/emacs/BrowseKillRing#2019-02-0405:33theeternalpulseFinall yfinished phase one of my person emacs config, one downfall of going straight to evil mode, when your init starts failing and you don't know the emacs bindings to move around 🙂#2019-02-0405:42theeternalpulseHas anyone used git subtree for keeping their emacs dependencies in order, I saw a site suggest to use that (I'm guessing as opposed to melpa stritctly)#2019-02-0410:53vemvonly git submodules... for many years, in conjunction with vanilla melpa. happy w/ it!#2019-02-0418:50theeternalpulsewhat makes you choose a submodule vs just melpa, I know I've had issues with melpa getting the latest and it breaking, so I have to pin it, I'm guessing it's to ensure that stable versions don't change unless you want them to#2019-02-0503:53vemvThe best example would be CIDER. They tend to have quite some code churn between releases, so it's hard for them not to break something for someone in each release. Say I'm happy with Cider 0.16. Even if I use the pinned-packages stuff, melpa-stable, etc I'll be forced to use a later version, which today would be 0.19. AFAICT there's no way to specify a version number/identifier. Which tdlr is my reason for submodules#2019-02-0504:50theeternalpulsei figured that was the case. wonder why melpa didn't factor in versioning#2019-02-0505:44richiardiandreaSame here, I started with Emacs Live (git submodules) and slowly moving to borg#2019-02-0621:35danielcomptonThere's an open issue for melpa stable providing old versions, but it's been open for a while, I think it's quite a lot of work to do it.#2019-02-0716:35codeasoneI just commit the /elpa folder with all it's dependencies into my dotemacs repo and used different branches to experiment with new releases (like new cider versions) in the knowledge that I can always inspect changes, and that master is always golden, irrespective of what is happening externally.#2019-02-0604:03theeternalpulseWhen loading an emacs lib using (use-package .... :load-path does it copy the file into melpa#2019-02-0606:13narendraj9To have the package downloaded from melpa, you have to add (use-package package-name :ensure t) :ensure like this.#2019-02-0606:52theeternalpulseooh I worded that completely wrong. I meant in cases where I have the plugin in a local directory and use that , does it copy the plugin folder into the .emacs.d/elpa cache#2019-02-0618:36mgrbytei think you can do describes-package and it'll show you where it's being used from#2019-02-0619:34narendraj9@U1CUUKHDL. For that I think you can use :pin local with :load-path "./" in your use-package declaration.#2019-02-0619:35theeternalpulseAh cool let me use that#2019-02-0618:32vemvanyone using clojurescript + CIDER + figwheel + one of [component, integrant]? I'm interested in the Component part, never tried such a setup. I suspect it could be more robust. does it work fine? any rough edges? I would imagine reconnection can be an issue as you reset your Component system#2019-02-0618:53vemvMaybe resetting the sockets on every reset would be a recipe for disaster... so my Component could just not do that an useful thing that could be done on reset is clearing the cljs compiler cache and such... it can get unrecoverably corrupt as one switches Git branches#2019-02-0619:50andrea.crottiI use figwheel main cider and integrant#2019-02-0619:50andrea.crottiAnd to be fair I rarely restart anything integrant just brings the system up#2019-02-0619:50andrea.crottiBut everything works pretty well anyway#2019-02-0619:52vemvis it a full-stack or frontend-only project?#2019-02-0620:05andrea.crottifull stack#2019-02-0620:06andrea.crottiyou just need things like
(defmethod ig/init-key :server/figwheel [_ {:keys [build] :as opts}]
  (log/info "Running figwheel build " build)
  (figwheel/start {:mode :serve} build))
#2019-02-0620:06andrea.crottiand something like
(defmethod ig/init-key :server/jetty [_ {:keys [port host reload?]}]
  (let [handler
        (if reload?
          (wrap-reload #'server/app-handler)
          server/app-handler)]

    (log/info "Running Jetty with auto reloading = " reload?)
    (jetty/run-jetty handler {:join? false
                              :host (or host "127.0.0.1")
                              :port port})))

(defmethod ig/halt-key! :server/jetty [_ server]
  (.stop server))
#2019-02-0620:06andrea.crottifor jetty for example#2019-02-0620:06andrea.crottiit's quite easy to do#2019-02-0620:06andrea.crottiwe also have nrepl and sass compilation there#2019-02-0620:07vemvthanks so far! does emacs connect to your figwheel or nrepl component?#2019-02-0620:08vemv(for the clojurescript part)#2019-02-0620:16andrea.crottino actually the figwheel in integrant bit is only used when running outside of Emacs#2019-02-0620:16andrea.crottiinside Emacs we still use the rest of the stuff, but figwheel main is started by Cider itself#2019-02-0620:17andrea.crottithere is just some code in user.clj to start the rest of the integrant shebang#2019-02-0620:21vemvah damn... that was the part that interested me the most 🙂#2019-02-0620:55andrea.crottiwell it's one line#2019-02-0620:55andrea.crotti(ig.repl/set-prep! (constantly dev-config))#2019-02-0620:56andrea.crottiand then if you import this [integrant.repl :as ig.repl :refer [clear go halt init reset reset-all]]#2019-02-0620:56andrea.crottiyou just have to type (go) in your Clj repl#2019-02-0620:56andrea.crottiI can't share the actual code because it's from work but I'll add something similar now to my own OSS project which I can instead share#2019-02-0621:14andrea.crotti@U45T93RA6 https://github.com/AndreaCrotti/elo/pull/140#2019-02-0621:14andrea.crottijust got it working on one of my personal projects#2019-02-0621:15andrea.crottiintegrant is really just handling jetty when you start with Emacs#2019-02-0621:15vemvhey! hmmm, let me make sure... I was talking about figwheel main is started by Cider itself... that's the part I'm trying to avoid the goal is having all the "server side" (figwheel, nrepl etc) inside Integrant. So emacs becomes a thin client#2019-02-0621:18andrea.crottiwell you can probably do that but don't want you want a cljs repl?#2019-02-0621:19andrea.crottiyou can start everything with integrant and do cider-connect into a running nrepl#2019-02-0621:19andrea.crottibut I'm not sure if cljs would work though#2019-02-0621:21vemvyeah that's what I'm curious about... particularly when the "figwheel component" is subject to restarts#2019-02-0709:06ChrisDoes anyone use inf-clojure and would be willing to share their config? I’m trying to improve my setup.#2019-02-0710:39eauchi, anyone else having trouble with org-mode and clojure blocks tangling ? ob-clojure adds an extra (ns user) at the top of each of my tangled files 😞#2019-02-0710:41eaucI've located the problematic code in latest version of ob-clojure.el... it seems to want to add a namespace declaration before expanding the source block's body (I suppose for cider integration during source block evaluation).#2019-02-0710:42eaucit gets the namespace from :ns attribute or cider context, so in my case during tangle this result in user namespace. however I think this behaviour should not happen during tangle...#2019-02-0805:47PiotrHi guys! I am new to both emacs and clojure and I don't even know how to approach this. Works on my Ubuntu, but fails on macOS. When trying to do clojure-jack-in i get this:
nREPL server started on port 49486 on host 127.0.0.1 - 
ERROR: Unhandled REPL handler exception processing message {:op clone, :id 1}
java.lang.NullPointerException
	at clojure.core$deref_future.invokeStatic(core.clj:2292)
	at clojure.core$deref.invokeStatic(core.clj:2312)
	at clojure.core$deref.invoke(core.clj:2298)
	at cemerick.piggieback$wrap_cljs_repl$fn__50762.invoke(piggieback.clj:288)
	at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__46451.invoke(middleware.clj:22)
	at refactor_nrepl.middleware$wrap_refactor$fn__55864.invoke(middleware.clj:214)
	at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__46451.invoke(middleware.clj:22)
	at nrepl.server$handle_STAR_.invokeStatic(server.clj:18)
	at nrepl.server$handle_STAR_.invoke(server.clj:15)
	at nrepl.server$handle$fn__50340.invoke(server.clj:27)
	at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

When using lein repl works just fine. Any ideas/resources?
#2019-02-0805:50dpsuttonit looks like you have refactor nrepl in your setup. can you try without that?#2019-02-0805:50dpsuttonusually better to get things working as simply as possible and then build back up to it#2019-02-0805:52dpsuttonalso, what is your lein version? lein --version?#2019-02-0805:53PiotrLeiningen 2.8.3 on Java 1.8.0_202 Java HotSpot(TM) 64-Bit Server VM#2019-02-0805:58Piotr@dpsutton I got rid of the refactor from plugins and now I am getting timeout
[nREPL] Direct connection to localhost:49542 established
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op clone id 1)
error in process filter: Sync nREPL request timed out (op clone id 1)
#2019-02-0806:02dpsuttoncan you post your project.clj file or deps.edn file?#2019-02-0806:04Piotr#2019-02-0806:07dpsuttonoh boy. ok. well you picked a big one to learn. and also at a time when a low level library changed. few things you need to bump: figwheel-sidecar -> "0.5.18"; com.cemerick/piggieback -> cider/piggieback "0.3.10" (yes coordinate change) cemerick.piggieback/wrap-cljs-repl -> cider.piggieback/wrap-cljs-repl#2019-02-0806:09Piotr🙂 Thanks. What I really don't get in here is that it works just fine on my ubuntu.#2019-02-0806:09dpsuttoni suspect your ubuntu machine has an older version of lein (2.8.1)#2019-02-0806:09dpsuttoni'm guessing your mac is new and has the latest lein?#2019-02-0806:10PiotrGenius!#2019-02-0806:10PiotrThat indeed is the case!#2019-02-0806:10PiotrThank you#2019-02-0923:54Chaseany of you emacs gurus know how I can set a default to have my vertical buffer split on the bottom be smaller by default? Like when I start a Cider repl I always end up making the repl buffer smaller. I've tried this in hopes it works like my other defaults but nothing: (add-to-list 'default-frame-alist '(top . 32))#2019-02-1001:41vemvYou need something like (add-to-list 'special-display-buffer-names '("*cider-repl-foo-bar*" your-fn))#2019-02-1001:41vemvwhere *cider-repl-foo-bar* is the expected buffer name of the repl, and your-fn a fn that receives a buffer and sets a window to it (`(set-window-buffer (split-window-vertically x) buffer)`)#2019-02-1014:12Chaseahhh cool. I'll file that away as a possible solution. I think I want something more global and not just cider specific because I do the same when using the terminal and such too.#2019-02-1014:21vemvah gotchu. In that case you want what I call a "fixed layout": N windows that don't ever are deleted. You set them up at Emacs startup, and later instruct different buffers to go to different windows. I've rolled my own fixed layout but there may be existing solutions#2019-02-1014:52practicalli-john@U9J50BY4C you could also try Golden Ratio minor mode, this sizes the active window to be the largest and reduces split windows by the Fibonacci scale, effectively doing what you ask #2019-02-1015:03ChaseI actually stumbled on Golden Ratio last night too in my search. I think I have to try it because it sounds like such an awesomely geeky approach to the problem!#2019-02-1015:10Chaseit's pretty neat, but I don't think I like the fact it's constantly resizing the windows when I switch focus. And it doesn't let me resize anything when I do want to do it manually. I'm sticking with default behavior for now.#2019-02-1015:12ChaseI was really just hoping that I could throw in a one liner 'default-frame-list for the top window to be 2/3rd the frame size or whatever. it's no biggy.#2019-02-1015:18ChaseI will say though that the more I learn the configurability of emacs and the respective tools within it like cider, I just really appreciate how cool it is. It's probably as close to a lisp machine as I'm going to get. I try to avoid language and IDE wars but...c'mon, emacs is the way, people!
#2019-02-1023:07theeternalpulseI can't seem to get the leader key space working in help modes here's my general-define-key output
(general-define-key
   :states '(normal visual insert emacs)
   :keymaps '(global help)
   :prefix "SPC"
   :non-normal-prefix "M-SPC"
#2019-02-1023:07theeternalpulsebut in the help-mode (I have an alias set up for help as (add-to-list 'general-keymap-aliases '(help . help-mode-map))#2019-02-1023:07theeternalpulsespc doesn't seem to be mapped#2019-02-1106:59mikepjbDoes anyone know how to split the output and input of the REPL like Timothy Baldridge does in his core.async talk? https://www.youtube.com/watch?v=enwIIGzhahw#2019-02-1111:18practicalli-john@mikepjb answered in #cider (in short, I dont know, Timothy was using what he stated was a bug in nrepl) https://clojurians.slack.com/archives/C0617A8PQ/p1549882501005100#2019-02-1111:19mikepjbthanks very much @jr0cket#2019-02-1111:21practicalli-john@mikepjb if you want to split output because you have a lot of output, you could always log it to a file or to elastic search. But now I am guessing as to why you would want to split your input from your output#2019-02-1111:37mikepjb@jr0cket I wanted to split the output from input to prevent asynchronous output clobbering the buffer when I'm trying to use the REPL#2019-02-1111:39mikepjbe.g
server-output-log-1: "xyz"
server-output-log-2: "xyz"
boot.user=> (map some-example-code-that-I-waserver-output-log-3: "xyz"
#2019-02-1111:40mikepjbI might try evaluating in the source file, seems like a better workaround than potentially changing the way nREPL is working#2019-02-1116:12theeternalpulsehow do I disable golden-ratio mode for the hydra buffer#2019-02-1119:07aggolden-ratio-exclude-modes#2019-02-1119:44theeternalpulsewhich mode is the minibuffer? Or at least hydra's minibuffer like window#2019-02-1119:45theeternalpulseI couldn't really get C-h m working in the buffer, it just closes#2019-02-1119:48aghmm… I guess it may be trickier than expected. maybe you may have to do something similar to this:
(dolist (buf (list " *Minibuf-0*" " *Minibuf-1*" " *which-key*"))
    (when (get-buffer buf)
      (with-current-buffer buf
        (do-something-here))))
#2019-02-1119:48ag¯\(ツ)/¯#2019-02-1119:48agor use golden-ratio-exclude-buffer-names#2019-02-1119:49agand try including those *Minibuf-0*, etc#2019-02-1121:14theeternalpulselet me try that, I was looking to see in the code what buffers it uses but larger elisp codebases are harder for me to parse by glancing#2019-02-1121:15agyeah… elisp is a bitch - once written, it becomes so cryptic after a while#2019-02-1315:53j0niIn many cases it helps to paste a function into scratch and reformat it - I've noticed that a lot of emacs elisp is adjusted presumably to nicely fit under some max line length, resulting in some code being less indented than its enclosing form - this is a ridiculous load to place on my brain, ymmv#2019-02-1315:54j0ni(I really don't know about the general state of melpa packages, but that's my experience of old code in emacs)#2019-02-1322:27theeternalpulseI have this in the file I have my keybindings set up in
(use-package key-chord
  :ensure t
  :requires evil
  :config
  (setq key-chord-two-keys-delay 0.6)
  (key-chord-define evil-insert-state-map "qw" 'evil-write)
  (key-chord-mode 1)
  )   
and it works great when I eval, but restarting emacs doesn't trigger it
#2019-02-1322:30theeternalpulsenm, had to use :after evil#2019-02-1518:47theeternalpulseIs there a function that is called whenever you focus on a buffer? I want to add general focus to a buffer to the golden-ratio additional commands, but still have golden-ratio's exclusion of modes and buffers work#2019-02-1518:58agyou mean package called “beacon”?#2019-02-1519:00theeternalpulseno, I mean I want to add to the variable golden-ratio-extra-commands whatever command emacs uses or calls when a cursor moves to a buffer#2019-02-1519:21cichliselect-window?#2019-02-1519:36cichliYou might be interested in this package also: https://github.com/cyrus-and/zoom#2019-02-1519:49theeternalpulseselect window seems to work#2019-02-1519:54theeternalpulseI may move on to zoom though#2019-02-1519:00theeternalpulsecurrently I have a bunch involving winum or evil-window-[direction]#2019-02-1519:01theeternalpulsebut would prefer to have a catchall that happens when a window is focused, and just exclude modes#2019-02-1519:01theeternalpulsethough beacon is cool#2019-02-1519:04futuroPresumably all of the movement libraries cal into a small handful of emacs functions. Maybe inspect the evil-window-* functions to see what they eventually call?#2019-02-1519:06theeternalpulseWill do, I also wanted to see what things like magit calls when opening the status window that doesn't seem to trigger golden-ratio even when I specify that as an extra command#2019-02-1519:06theeternalpulseI think it only activated it in the window it was called from#2019-02-1521:50theeternalpulseI moved to zoom and it seems to solve those issues, I'll stick with this for a while, but it seems to address some of the cases I have issues with golden-ratio mode#2019-02-1621:30dpsuttontrying to insert contents into another buffer and move point to the end of the buffer. not having luck. Create a buffer named random, and then
(with-current-buffer "random"
  (goto-char (point-max))
  (insert "\nbob\n")
  (goto-char (point-max))
  )
and no luck. point stays where it was as if there was an unwind-protect somewhere. anyone know how to do this?
#2019-02-1621:35dpsutton(with-selected-window (get-buffer-window ...))#2019-02-1621:48cichliAre you possibly inside a save-excursion?#2019-02-1621:48cichliFWIW: (with-current-buffer "*scratch*" (goto-char (point-max)) (insert "foo\n")) works for me#2019-02-1621:55dpsuttoni think that's because you're currently there. do it with a buffer that is separate from your current view#2019-02-1621:55dpsuttonmy steps above mimic more closely what we are doing with the repl buffer#2019-02-1621:55dpsuttonhttps://stackoverflow.com/questions/13530025/emacs-scroll-automatically-when-inserting-text also see this#2019-02-1621:59cichliYou’re right, if the buffer isn’t visible it won’t move the point#2019-02-1621:59dpsuttoneven if its visible it doesn't move the point#2019-02-1621:59dpsuttonscreenshot incoming#2019-02-1621:59dpsutton#2019-02-1621:59dpsuttonnote point at the end of "random stuff". using the first form will move point#2019-02-1622:02cichliSeems like we do this in a couple of places:
(with-selected-window (or (get-buffer-window ...buffer-name...)
                          (selected-window))
  ...)
#2019-02-1622:03cichliI guess if the buffer isn’t in any live window we have to leave the point where it is#2019-02-1622:08dpsuttonok. there's a problem if the buffer isn't visible in a window. can't use with-selected-window. how about something like this:
(defun cider-insert-in-repl (form eval)
  "Insert FORM in the REPL buffer and switch to it.
If EVAL is non-nil the form will also be evaluated."
  (while (string-match "\\`[ \t\n\r]+\\|[ \t\n\r]+\\'" form)
    (setq form (replace-match "" t t form)))
  (let ((repl (cider-current-repl)))
    (if-let* ((window (get-buffer-window repl)))
        (with-selected-window window
          (cider--insert-in-repl form eval))
      (with-current-buffer repl
        (cider--insert-in-repl form eval))))
  (when cider-switch-to-repl-after-insert-p
    (cider-switch-to-repl-buffer)))
#2019-02-1622:08dpsuttonie, if there's a window, use with-selected-window else fall back to with-current-buffer and it won't scroll, but its not visible so whatever#2019-02-1622:09dpsuttonso pull the guts out into cider--insert-in-repl and that is either in the context of a selected window or with-current-buffer#2019-02-1622:37dpsuttongoog find @cichli. i've updated the PR#2019-02-1720:26vemvOccasionally (and for reasons unknown) I break paredit's "jail", creating unbalanced/missing delimiters. Then determining where the error is can be hard... e.g. the function is 20 LOC long, is the missing parens at the end? in the middle? wondering if there's an emacs (or clojure) function that will tell me "things begin to be broken at line x, column y"#2019-02-1720:29mathpunk@vemv Two hacks I've found helpful: - evaluating regions, so I can find where the problem isn't - using code-folding: folding a block that's malformed will often get a complaint from the editor about an unbalanced parenthesis#2019-02-1720:30mathpunkbut i don't know about an auto function --- it might even be a harder-than-you'd-think problem, since it's about trying to read data for structure but the data is incorrectly structured#2019-02-1720:36vemvhacks noted, thanks! what do you use for code folding? I have some code-folding setup, but I currently don't know how to fold an arbitrary sexp#2019-02-1720:57mathpunkevil-fold or something. Came with spacemacs#2019-02-1720:31mathpunkoh, and I use a LOT more do/comment blocks than I used to.... so it can be nice to make a do block for what you're working on, slurp things into it, and evaluate the toplevel#2019-02-1720:31mathpunkif that all works great, slurp the next form in#2019-02-1720:36dpsuttonwhen this happens, i go to the top of the file and start hitting paredit-forward until i get a scan error#2019-02-1720:58vemvtried out. doesn't appear to help me point out the exact location (example: place a stray ( in the middle of a defn)#2019-02-1721:04vemv> it might even be a harder-than-you'd-think problem sounds spot on. For example if I insert a stray ( in L50, it might pair with the nearest ) in L51, but things don't start to break until L70. So how could an error reporter notice that something was off in L50 when in fact one can see a perfectly paired ( ...) there? Sounds pretty hard without heuristics that try to understand the meaning of the code#2019-02-1721:07dpsutton@mathpunk are you familiar with (setq clojure-toplevel-inside-comment-form t)? It changes how top level works so the comment form isn't see as the top level but the forms one level underneath it are#2019-02-1721:08mathpunkno! if i understand right from your description that is very useful#2019-02-1721:13dpsuttonhttps://github.com/clojure-emacs/cider/pull/2323#2019-02-1816:14futuroI wonder what it would look like to have a function rescan the buffer every time you insert or remove a paren, and alert you if that action caused an imbalance. #2019-02-1816:16futuroIt seems like the problem is often phrased as having a buffer with an imbalance and finding the paren that caused it, but the use case is “I took an action that imbalanced my parens, but didn’t know it.”#2019-02-1816:16andrea.crottiif you use paredit & co you simply can't have an imbalance#2019-02-1816:17andrea.crotti(depending on how you configure it I guess, but still they have your back most of the times)#2019-02-1816:40dpsuttonkill-region will let you clobber parens. there are ways around paredit unfortunately#2019-02-1816:45Chaseyeah, I had to learn that C-q ) will let you force in a closing paren when I have somehow done something that even confuses paredit.#2019-02-1817:23futuroYeah, I’ve had plenty of times where it’s gotten unbalanced. So the problem remains. #2019-02-1817:57cichliTry M-x check-parens – you could always add this to a hook to run it automatically, e.g. after-save-hook or after-change-functions#2019-02-1818:06Chaseso can I ask paredit questions here? So in this function I left out a closing paren after cnt in the second to last line:
(defn count-heads-pairs [coll]
  (loop [cnt 0 coll coll]
    (if (empty? coll)
      cnt
      (recur (if (= :h (first coll) (second coll))
               (inc cnt)
               cnt
               (rest coll))))))
What is the paredit way of getting that in there?
#2019-02-1818:16cichliWith point at the end of that line, C-} (`paredit-forward-barf-sexp`)#2019-02-1818:19Chaseperfect! oh man, that was probably just basic stuff right there but I can see the power in really learning these tools. those old school names tho...#2019-02-1818:21Chaseso forward-barf-sexp because it brought cnt into the if s-expression. so it was like the if exp brought it into the fold?#2019-02-1818:22cichliI’d say the other way around – it “barfs” the (rest coll) forward out of the if#2019-02-1818:23Chaseahh! See yeah, i'm missing the conceptual reasoning in the names. that makes more sense#2019-02-1818:33cichlihttp://danmidwood.com/content/2014/11/21/animated-paredit.html is a nice visual summary#2019-02-1818:40Chasei just had that open! I was looking for how to slow down those gifs#2019-02-1818:41Chasei think i was confusing myself by thinking slurp-forward should be the same as barf-backward so why have both#2019-02-1819:28MattiasSo, I’m curious. People have been editing Lisp-like things since the 60s or something. What’s the brief history of lisp editing? There must have been an editing winter of say 40 years when no ideas were had?#2019-02-1819:35Chasecan't help you there but I have just started watching the old SICP lecture videos and it was fun to see that even back then the editor (edwin?) would highlight that you closed a paren and Hal Abelson mentioned how awesomely useful that is for lisp editing. Maybe a fun topic for #off-topic#2019-02-1820:33cmack@mattias504 https://github.com/shaunlebron/history-of-lisp-parens there is a nice investigation here in the section on Editors#2019-02-1820:34MattiasHah. Of course there is. Thanks! Just recently listened to Shaun on one of the Clojure podcasts, very good and informative. 😀#2019-02-1820:51ChaseAnd he had a fun talk a little why back. https://www.youtube.com/watch?v=K0Tsa3smr1w#2019-02-1820:52ChaseParinfer intrigues me but I'm just not a fan of modal editing. I think they have created a smart mode though that might take the modal part away. I'm not sure and don't think that update has made it to emacs yet.#2019-02-1821:05MattiasThat history thing was amazing. Had to read all of it. Even sad there are parts missing. Lots of cool stuff there 🙂#2019-02-1909:43theeternalpulseI'm noticing which-key sometimes gets its focus taken over by whateve shows function/variable help at the bottom#2019-02-1909:43theeternalpulseis there a way to give which-key priority. I have it set up as a minibuffer with (setq which-key-popup-type 'minibuffer)#2019-02-2016:49mgrbytesince a recent pacakge upgrade, have recently starting getting messages like *LV* does not exist, create? when attempting perform actions in magit, anyone else having this? something to do with transient-show and readonly buffers according to my *Messages* buffer...#2019-02-2018:48aghave you pulled latest spacemacs?#2019-02-2018:49agalso maybe consider checking out develop branch, if you’re still on master#2019-02-2018:49agoh wait… I for some reason assumed you’re using Spacemacs, which may not be the case#2019-02-2710:09mgrbyteyeh, not using spacemacs.#2019-02-2018:44practicalli-john@mgrbyte magit just switched over to using the Emacs package called transient. That maybe causing a problem (although it works okay for me and I upgraded yesterday). Haven't seen any relevant bugs, sorry.#2019-02-2109:49eauchello were can I find help with org-babel clojure support ? recent changes broke my whole literate setup, because now you apparently need CIDER even when you just want to tangle/export your org files 😕 thanks in advance#2019-02-2218:54theeternalpulseIn mac how do I sto the annoying dialogs warning me when cleaning buffers?#2019-02-2219:18agelaborate (?)#2019-02-2219:30theeternalpulseI actually found it's related to perspective mode#2019-02-2219:31theeternalpulseI have midnight set up to clean my buffers, and if it clears a buffer in one perspective that "belongs" to another it ask for a comfirmation via a window#2019-02-2219:32theeternalpulseperspective mode gives me the most problems with buffers, I'm trying to just disable it wholesale#2019-02-2414:55practicalli-johnI have same challenge when tidying up buffers. Would be nice to have a a for all option when closing files in another perspective rather than just q or k. Example senario: I seem to get a lot of magit buffers hanging around. So I use SPC b B to see the global list of buffers. Then type magit as the pattern to list just those buffers. M-SPC opens up Helm transient state and I can use T to mark all buffers. M-D will delete all buffers, then I have to press k for every buffer that isnt in the current one (I even tried this in perspective 1, with the same results)#2019-02-2421:04agit took me a minute to open persp-mode.el and I found this var: persp-kill-foreign-buffer-behaviour.#2019-02-2421:04agand these are the choices you can set it to:
- "Ask what to do" :value ask
 - "Don't ask if a buffer belongs only to weak perspectives"
           :value dont-ask-weak
 - "Just kill" :value kill
 -"Do not suggest foreign buffer to the user(kill buffer)" :value nil
#2019-02-2421:05agI believe that can fix annoying prompt when killing buffers outside of current layout#2019-02-2421:08agI’m not sure what is “weak perspective” is though#2019-02-2418:05Chaseso I'm struggling when copy/paste refactoring due to paredit. I know C-q ) will let me force insert a closing paren but how do I force delete a closing paren?#2019-02-2418:05ChaseI'm thinking the real solution will be to splice, barf, or slurp somewhere in the function right? but I would like the option to force delete if possible.#2019-02-2418:09Chasewell the real solution seems to actually be to kill only to the appropriate paren but still!#2019-02-2418:16dpsuttonI don't understand this pain because it's easy to copy and paste valid s exprs. Why are you ending up with invalid expressions#2019-02-2418:22ChaseI think what was happening is I was killing from within the middle of a large function and not ending my point at the appropriate paren. So the solution is to pay better attention to my rainbow delimiters and make sure I have the valid s expr from the very beginning instead of just taking it all the way to the end of the line.#2019-02-2419:48cichliPrefix with C-u to force delete, e.g. C-u C-d#2019-02-2512:15andrea.crottiit would be really nice to be able to use something like outline-mode when looking at big EDN files#2019-02-2512:23cichliI haven’t used it, but take a look at https://github.com/alphapapa/outshine#2019-02-2606:14anishHi Everyone, I am using cider with figwheel , to start cider i use cider-jack-in-clj&cljs and choose figwheel#2019-02-2606:14anish#2019-02-2606:15anishIts starts clj cider and then cljs but I see pending-cljs message as it can't connect to cljs cider#2019-02-2606:16anishmy cider-version , 0.21#2019-02-2606:16anish[cider/piggieback "0.3.10"] [figwheel-sidecar "0.5.16"]#2019-02-2606:17anishNot sure if I miss any configuration?#2019-02-2606:29kommen@anish.developer maybe better to ask this in #cider. but first you should try to update the piggyback dependency to 0.4.0, see https://github.com/nrepl/piggieback#2019-02-2606:30anishthanks @kommen#2019-02-2611:44MacrozI have a shortcut C-<tab> for indenting the toplevel sexp (i.e. defun) that I'm currently in. I noticed today that indent-sexp seems to want to indent single semicolon comments to the middle of the screen even if they follow some proper code and should not change in formatting. If I change my implementation to mark the region of the containing sexp, that indentation does the right things (i.e. does not move to center of screen)#2019-02-2611:59vemvdo you use single semicolons with an explicit purpose? else go for doubles, it's more standard and fewer tools will give you trouble#2019-02-2612:19practicalli-johnA single semi-colon is used to put a comment at the end of a line. Double semi-colon is for commenting a line. This is the style guide that Clojure (and I believe lisp) developers use. Clojure-mode formats single semi-colons automatically. If you add a second semi-colon then Clojure-mode should remove that auto-indent (although you may need aggressive-indent-mode for that)#2019-02-2612:35MacrozI use single semicolons for end of line comments always. It's the Lisp way 🙂#2019-02-2613:00vemvI interpret it differently https://github.com/bbatsov/clojure-style-guide#two-semicolons-for-code-fragment Perhaps what a 'margin' comment is can be debatable. Personally I interpret "margin" comments as multi-line comments that will be aligned. I just never do that: • other editors won't be smart in keeping the alignment • even Emacs will go crazy sometimes and move the comment erratically Not good to have comments moving around in diffs#2019-02-2613:01vemvConversely ;; will always be semantically, predictably aligned following the current level of indentation#2019-02-2614:00Macrozthe style guide itself is inconsistent about the indentation of the margin comments#2019-02-2614:01MacrozI guess column 40 indent is pretty common everywhere#2019-02-2614:02MacrozI just prefer to leave the indentation as defined by the programmer so preserve the indentation the programmer gave#2019-02-2614:02Macrozcolumn 40 is not much when people typically have 120-200 columns visible at times#2019-02-2614:22vemvHonestly it's the first time I hear of "column 40" (been emacsing/clojuring since 2012). But I do respect the apparent tradition, e.g. https://stackoverflow.com/a/6365579 looks kind of beautiful. I very very rarely see comment hierarchies in Clojure code, just ; and ;; (maybe with more ; from Cursivers and more ;; from Emacsers) Anyway, I don't seek controversy 🙂#2019-02-2615:38practicalli-johnM-; is a common keybinding in Emacs that will put ;; if you are on an empty line and ; at the end of an existing line of text. This has probably shaped the implementation of the coding style for some. Personally I just use ;; and try make my code as readable for others as possible and write descriptive doc-strings. Sometimes I use comments, but mostly for separating out sections of a namespace and adding general context (header, sections, etc).#2019-02-2706:13MacrozI pretty much try to avoid all comments and prefer to name and explain in code, so there are not many comments and there definitely is not need for the margin style because they are usually also short#2019-02-2706:13MacrozI also have my comments in larger front than the rest of the code so they stand out#2019-02-2706:13Macrozif a comment is worth writing for it's either TODO or important to know why so it's worth standing out#2019-02-2706:13Macrozit also creates a nice incentive to write them out#2019-02-2706:14Macrozmost people seem to want to fade them away which nowadays I think is a disservice to them 🙂#2019-02-2612:06mpenetI cannot decide if I like ivy or not#2019-02-2612:07mpenetvs ido/smex#2019-02-2612:16cichliI switched recently after using ido for many years. Frustrating at first but I much prefer it now. I really like how editing the input is separate from choosing a candidate in ivy#2019-02-2612:20practicalli-johnI love using helm, so much more productive now than using ido#2019-02-2612:20mpenetyou can do the same with ido#2019-02-2612:28cichliWith C-e right? Or is there another way?#2019-02-2612:30mpenetif you mean just be able to edit the suggestion freely with ido on find-file for instance it is with c-x c-f if I recall#2019-02-2612:30mpenetit basically falls back to just find-file#2019-02-2612:36cichliYeah, that’s what I mean – avy doesn’t override any editing commands so you can always edit inline#2019-02-2612:37cichliYou can also use M-j to yank text from where the point was before you started completion#2019-02-2612:20mpenetI never tried helm#2019-02-2616:53Robert A. RandolphIs there a sane solution for escaping strings in yanked text? An example use is taking some data structure and stringifying it.#2019-02-2617:38richiardiandrea@audiolabs I use string-edit (I hope it is the correct name) from the magnificent Magnars#2019-02-2617:55Robert A. Randolph@richiardiandrea this looks excellent, thank you#2019-02-2700:53yuhanIf you happen to use Lispy, there are also the commands lispy-stringify, lispy-stringify-oneline and lispy-unstringify#2019-02-2811:36PiotrHi, when I do SPC / to do smart search in my spacemacs it does search everywhere. That's all nice, but if I want to exclude for example resources not to include compiled cljs how do I achieve that? Basically I want to remove content of .gitignore from the search results. Any recommendations?#2019-02-2812:17cichliCheck out https://github.com/bbatsov/projectile#2019-02-2812:21cichliI see you meant find-in-files, not find-file 😄. Look into https://github.com/BurntSushi/ripgrep – that understands .gitignore, and I imagine Spacemacs will use it automatically if it’s installed#2019-02-2812:49Piotryes, I want to find in files ! Thanks#2019-02-2812:29vemvhttps://github.com/syohex/emacs-helm-ag works nicely#2019-02-2816:37practicalli-john@piotr.kurnik using ripgrep or silver-searcher should respect your .gitignore. To exclude certain file patterns with SPC / you can also use -g! to exclude files or -g (although this may not work for all search tools). For example to exclude png images from a search, I would use -g!*.png at the start of the pattern and then a space followed by the term I was searching for.#2019-02-2818:55Piotr@U05254DQM thanks a lot! I will give it a try#2019-03-0100:38Chasemy pinky is starting to hurt! No! The last week or so. I've had Caps Lock mapped to Control for the longest time. Anyone else still experience it with that? I'm debating switching back to vim keybindings but not sure if I just need to build up the pinky stamina now that I'm coding a lot more. Any tips I should try. I'm thinking maybe I should try and use the right control button more but never liked that.#2019-03-0101:04vemvHow do you physically type? Are the wrists resting over some surface as you type? Do you stretch your fingers in order to reach some keys?#2019-03-0101:06Chasemy hands sit too high on my current desk. i'm switching to a different room in this airbnb house tomorrow though with a much better desk.#2019-03-0101:07Chasemy big fear is people mentioning they never got rid of their pinky pain. are emacs keybindings really worth this kind of hassle? seems silly when i step back and look at it when vim bindings are sitting right there.#2019-03-0101:12vemvI had emacs pinky around 2012, quite quickly got rid of it by avoiding typing in a static (wrists-over-surface) and stretchy (stetch finger instead of moving whole hand/arm) way Also I use a 'traditional' style of keybindings, no emacs, no vim#2019-03-0100:46theeternalpulseIs this with a laptop or keyboard? I have an ergonomic keyboard at work with the same setup and at home a couple laptops that have pretty good triggering of the caps lock key and don't have these issues#2019-03-0100:47theeternalpulseI can definitely see how over-extension of the pinky can cause stress at the wrists though, I've gotten that when pinkying ctrl on windows#2019-03-0100:47Chaseusually a bluetooth external keyboard for the laptop.#2019-03-0100:47theeternalpulsehttp://ergoemacs.org/emacs/emacs_best_keyboard.html#2019-03-0100:47Chasenice logitech one. i haven't had any problems but been using that C- a lot lately#2019-03-0100:48theeternalpulsesome of those are overkill i think, I can use most keyboards without issue, as long as they don't have a hard or too long a travel#2019-03-0100:49ChaseI'll check these out. I'm living quite nomadically so need something that travels well. and i'm broke. lol#2019-03-0109:09cichliCheck out https://atreus.technomancy.us#2019-03-0100:49Chasedo you use the right control key regularly?#2019-03-0100:49theeternalpulseno, almost never#2019-03-0100:49Chaseit's always felt in a weird spot#2019-03-0100:49Chaseyeah#2019-03-0100:54Chasei'm debating switching my alt keys to control keys. I've seen that suggested before. Then I could use my thumbs more. I'm not terribly opposed to going back to vim bindings though. i just think my brain prefers non modal editing#2019-03-0101:01Chaseanyone use God Mode?#2019-03-0101:16agBuilding muscle-memory for Vim-motions is absolutely worth doing. It has only one drawback: if you lose a hand - you’ll suffer, but all things considered that probably would be the least of your worries.#2019-03-0101:17Chasei actually started with vim. i liked it just felt like the modal part never quite clicked. i would still find myself in the wrong mode without realizing it.#2019-03-0101:18Chasethe more I think about it, I'm a writer first and foremost, so this little pinky scare has me worried. i do a lot of typing every day so don't want to risk that.#2019-03-0101:20agHowever learning Vim, for the sake of saving yourself from RSI - probably wrong. What you need is: correct posture, correct setup, good keyboard (Kinesis Advantage is my choice), maybe a keyboard tray, adjustable standing desk#2019-03-0101:20Chasecan't argue with that.#2019-03-0101:21agAnd never forget: Emacs can Vim better that Vim itself.#2019-03-0101:21Chasei'm coincidentally moving to a better desk this weekend#2019-03-0101:25agand… something people rarely consider. Exercise your back. RSI most of the time is a result of a weak body core - lower, upper back, abdomen muscles etc. Going to a gym and learning how to properly do deadlifts will keep you alive. Trust me. I learned that hard way. I had such a bad RSI that I couldn’t sleep at night without wearing gloves#2019-03-0101:26Chaseouch#2019-03-0101:26Chaseyeah i keep myself decently fit.#2019-03-0101:26Chaseergonomic changes are first priority#2019-03-0101:28ChaseI'm going to find it funny if I end up going back to Spacemacs, the catalyst that got me into emacs, lisp, and then trying clojure of all things.#2019-03-0101:29vemvSeconded the gym recommendation, so good to have a strong grip, back, etc#2019-03-0101:30Chasei'm already lifting, swimming, and doing jiu jitsu, people! hahaha#2019-03-0101:32Chasebut outside of that i think i've been spending way too much time sitting at a desk setup with bad ergos#2019-03-0101:32Chasethanks for the advice folks!#2019-03-0102:00yuhanHave you tried "palming" the right control key? Depending on the keyboard it can be surprisingly comfortable after getting used to#2019-03-0103:36vemvPersonally I don't recommend it, IMO it's a sign that you type in an overly static position (palms/wrists stuck to your laptop/table) i.e. instead of palming, or stretching your pinky to reach Ctrl, lift your hand, move it to one side, and use your index or thumb to hit it#2019-03-0118:50theeternalpulseI second @vemv. I do it to reach enter. otherwise you'll be twisting your wrist or extending your fingers to get to a key, and that isn't good#2019-03-0119:36theeternalpulseInteresting, if you have a cloned folder in your path and add it with magit, it adds a submodule.#2019-03-0217:11yuhanI have this little snippet that I've been using for the last few months for toggling the #_ ignore form:#2019-03-0217:11yuhanhttps://gist.github.com/yuhan0/38ac43c764017917fc3f3e5dc9104f1b#2019-03-0217:13yuhanAny comments on usability etc.? What would be a good native Emacs binding?#2019-03-0217:14yuhanI'm thinking of submitting a PR to clojure-mode#2019-03-0512:53practicalli-johnI have a script like this bound to C-##2019-03-0513:13practicalli-johnThe script I use is at https://gist.github.com/jr0cket/e3dc5b4b8a6fed37dc408f0b0fc219d2#file-spacemacs-el-L677-L693#2019-03-0513:21practicalli-johnyour script look much more detailed than mine, so will try it instead. Thanks.#2019-03-0304:10theeternalpulseI'm having a weird issue with hydra. I have them all red colored and when I call a hydra head I get a duplicate minibuffer and visibly a duplicate hydra showing up underneath my current one.#2019-03-0304:13theeternalpulsehttps://imgur.com/a/wtuDk3K#2019-03-0304:13theeternalpulsethe first one is while I'm running a hydra and calling several heads, there's a weird buildup of lines, not sure why those specifically. The second one is when I leave. All those lines are windows I have to close#2019-03-2814:46martinklepschhi all 🙂#2019-03-2814:48martinklepschI'm playing around with Spacemacs and having some issues, so few questions: - Do you run on master or develop? - Does anyone use just spacemacs-base? On master it includes some project switching/file finding stuff but in develop it seems more minimal? - Do you symlink your ~/.spacemacs file from another location? I've ran into problems with that I think so just wondering if that's something people do#2019-03-2815:51didibusI highly recommend running in develop#2019-03-2815:51didibusMaster is really old, and has more issues in my experience#2019-03-2815:52didibusI don't symlink#2019-03-2815:52didibusAnd I never used spacemacs-base#2019-03-2815:53martinklepschThanks, that's helpful to know 🙌#2019-03-2816:58mccraigmccraigi recently switched to develop - i've had no issues#2019-03-2817:50theeternalpulseI run develop, very few issues major issues that aren't noted or talked about on #spacemacs#2019-03-2818:31aga) use develop it is ironically more stable. most of the time when things break, they break because of upstream issues - package author (who doesn’t use Spacemacs) would update something, that breaks it. Spacemacs devs are usually quick to patch it up so it works with the updated version Currently Spacemacs maintainers are trying to release next version, so more stable and polished update is coming to master soon. But right now I’d suggest develop b) If you have never used Spacemacs before, I would recommend using default distro first, not base c) Spacemacs allows to have its config file in different locations (if that’s why you are trying to symlink) https://emacs.stackexchange.com/questions/20342/how-do-i-specify-a-different-folder-for-spacemacs-file#2019-03-2818:32martinklepsch@U0G75ARHC (et al) thanks for all the notes, I'll give it another try again later today#2019-03-2818:34agno problem. please feel free to ask questions there’s #spacemacs here, there’s also spacemacs gitter channel (which gets really crowded at times)#2019-03-2818:35agI also post Spacemacs and Emacs tips here https://twitter.com/ilemming people find them useful#2019-03-2821:53practicalli-johnAlthough there will be a new release soon, all the bug fixes are available on develop much sooner. I've used develop for the last two years. I tried spacemacs-base on develop recently and its just too minimal. It was enlightening to see how many features of the full distribution I am using. I have a .spacemacs.d directory in the root of my home directory for additional files (snippets, layouts, etc)#2019-03-2821:54practicalli-johnI also have free book on how I use Spacemacs with Clojure, its work in progress, but has some useful configurations https://practicalli.github.io/spacemacs/#2019-03-3017:42didibusAlso, personally, I prefer to use Spacemacs in Holy mode and with Ivy instead of Helm. Ivy is much more responsive for me. And I found that Holy mode allows you to learn more about Emacs more so then Evil. Unless your appeal is VIM bindings. Spacemacs is also an awesome Holy Emacs config, which adds quite a lot of value.#2019-03-3017:58didibus@U05254DQM Also great job on that guide! I shared it with my team#2019-03-3020:06martinklepsch@U0K064KQV thanks, I picked ivy the first time but it seems like that choice was removed the in develop?#2019-03-3020:29practicalli-john@U050TNB9F add ivy as a layer entry in dotspacemacs-configuration-layers section of your .spacemacs and ivy will replace helm as the default completion framework. There are some variables you can configure on the Ivy layer in this readme http://develop.spacemacs.org/layers/+completion/ivy/README.html#2019-03-3107:42martinklepschThanks for all the tips, I think I might have arrived at something that works for me! 🙂#2019-03-3107:42martinklepschThe discoverability with SPC is really nice#2019-03-3109:22mccraigmccraigi ended up with holy-mode and alt-SPC for the menu#2019-03-3119:22ag@U0524B4UW not the wisest choice since M-SPC is important binding that reveals some nice transients, e.g. it works in any Helm buffer (I think Ivy has the similar thing), in Org-agenda it opens enormously helpful one.#2019-03-3119:23didibus@U0G75ARHC Those can also be opened with S M Spc#2019-03-3119:23didibusSo I think it's actually a pretty good choice. Even though I personally stick to the default M m binding and just got used to it.#2019-03-3119:24agah, okay then. I’m trying to think other places where M-SPC|`S-M-SPC` works in Spacemacs#2019-03-3119:26didibusI think because Gnome default to using M SPC, most of Emacs and Spacemacs bindings have avoided using that binding. And I'm pretty sure that's why Spacemacs also binds S M SPC for things that use M SPC#2019-03-3119:29agbut do you know any other things besides org-agenda and helm/ivy buffers where that binding is used?#2019-03-3120:13didibusNope, those were the only two and I learned it from your Twitter 😋👍#2019-03-3120:13didibusI'm guessing maybe when the ? is needed to be typed. Then the transient states goes to M Spc ?#2019-03-3120:15didibusMost other layers have ? bound to the transient state#2019-03-3120:19didibusSee https://github.com/syl20bnr/spacemacs/blob/develop/doc/CONVENTIONS.org#transient-state#2019-03-3120:20didibusIt's weird though, because I've seen ? used a lot more#2019-03-3120:20didibusOr . as well#2019-04-0515:46mathpunkI symlink --- I keep my dotfiles in one system directory and symlink them to where they need to be. It is not perfect, because I'm sometimes unclear on what wants to be symlinked in $HOME vs in $HOME/.config or whatever#2019-04-0515:46mathpunki haven't had any problems, once I twiddled my .spacemacs (rather, my spacemacs.symlink) to get version control to follow symlinks#2019-03-2814:52dpsuttonthere's also a #spacemacs channel if no responses here#2019-03-2815:04orestisI gave up on spacemacs due to frequent breakage#2019-03-2818:22agMost of the time when things break, they break due to upstream issues - someone (who unaware of Spacemacs) updates their package, the contract gets broken. Or, spacemacs maintainers update the way how it works with a third-party package (because it was updated), that requires package to be updated on your machine, but you have no clue. You can’t simply have over 300 packages with bunch of strings attached to them and hope that they’d “play nicely with each other”. One thing I learned early on - you need to be able to triage what’s breaking and decide if you need that thing, if not - then simply remove it from your system. If you need it - then find a workaround and create an issue, most of the time there’s already an issue on github and someone would post a workaround. In my experience (I’ve been using Spacemacs for a few years now) it let me down only handful of times and it took me no longer than 10-20 minutes to figure out a workaround#2019-03-2815:04runswithd6sI use spacemacs in holy mode at work and my own .emacs.d/init.el at home. I enjoy the consistency and discover-ability of the keymapping in spacemacs, but find that I disagree with some of the layer choices they've made. Additionally, hiding the configuration behind layers and the hoops I need to jump through for customizing my environment drove me to rolling my own config. Generally, I track the current tagged versions of spacemacs rather than following develop.#2019-03-2818:25ag> I disagree with some of the layer choices they’ve made then roll your own layers. It is not as hard as it looks. You can even make layers based on “official” layers. e.g. : https://github.com/agzam/dot-spacemacs/tree/master/layers/ag-clojure#2019-03-2818:38runswithd6salways a possibility#2019-03-2815:06runswithd6sPlus, there's value in knowing each of the components you've added to your emacs setup. Certainly, spacemacs pioneered packaging a consistent, curated experience for users, and I encourage it for first-time users of Emacs, especially those coming from Vi.#2019-03-2815:11martinklepschI've been running with my own emacs config for a while and it's alright but also I don't understand a lot of it and wanted to try something I could maybe use myself and/or recommend to friends who are considering emacs for some stuff#2019-03-2817:40theeternalpulseI think spacemacs is great. Though it can keep you in the dark as to how emacs works. I have my own config I use at home and hope to migrate it to work once I have the javascript/reacy portion down fully. I use spacemacs at work but slowly note what I need from it and bring it to my config#2019-03-2818:05ag> Though it can keep you in the dark as to how emacs works YMMV. I have had used Emacs for two years having numerous attempts to build my own config (I am die-hard Vimmer). Then I’ve discovered Spacemacs. In a few months using Spacemacs I learned more about Emacs than I did before. Spacemacs implements some nice ideas, IMO every self-respected emacsen should at least try it.#2019-03-2818:40agThe big hurdle in learning Emacs is discoverability - you just need to know what’s available there. Once you learn you can do something using a package X, you can then learn more about it and improve your workflow. But if you don’t know that’s even possible you simply unaware there’s more efficient way of doing something. Spacemacs makes it easy to find things and ways around Emacs#2019-03-2819:12bozhidarWell, you can achieve the same with a curated list of the top 50-something packages in Emacs as well. 🙂#2019-03-2819:14bozhidarhttps://melpa.org/#/?sort=downloads&amp;asc=false 😉#2019-03-2819:46agBut it is hard to develop an educated opinion if you are a newbie and you have to start with ingredients. But if someone hands you a recipe book that may make things easier. And who knows, maybe you’d like some of those recipes in that book, even though it is hard to imagine anyone would like all of them#2019-03-2906:54bozhidarYeah, I know what you mean. The point I actually wanted to make is that for everything new there’s some learning curve. All editors require some degree of tweaking, some plugins, etc. Probably Emacs just has too many of those and that makes the setup overwhelming.#2019-03-2908:12moonbrvHello, I did install ‘prelude’ setup of emacs. When I open any file, and length of the line is more than 80 symbols I see that color theme is broken… how can I fix this?#2019-03-2908:15vemvby tweaking whitespace-line-column (and closing + opening the buffer)#2019-03-2909:14moonbrvit work, thanks!#2019-03-2909:15vemv✌️#2019-03-3020:50didibusThat's a feature 😋, but I admit it can be annoying#2019-04-0214:00RisettoI'm getting this error when I run cider-connect-cljs: ‘autopair-newline’ requires the nREPL op "classpath" (provided by cider-nrepl)#2019-04-0214:49RisettoAnyone know how I can fix this?#2019-04-0214:50dpsuttoni think bbatsov fixed this recently#2019-04-0214:50RisettoThe repl warns about this once opened: WARNING: CIDER requires nREPL 0.4.4 (or newer) to work properly -- but I made sure to require the 0.6.0 version in my project.clj#2019-04-0214:51RisettoOh?#2019-04-0214:51dpsuttonit was similar error but unrelated#2019-04-0214:52dpsuttonwhich version of lein are you on? You'll need lein 2.9.0+#2019-04-0214:52Risetto2.9.1#2019-04-0214:52dpsuttonoh interesting#2019-04-0214:52dpsuttoncheck to see if any of your deps use tools.nrepl?#2019-04-0214:53RisettoI run it with this: lein trampoline with-profile more-figwheel figwheel app test and then I would like to connect to it with cider#2019-04-0214:53RisettoI'll check!#2019-04-0214:58RisettoI ran lein deps :tree and couldn't find it there, so probably not right?#2019-04-0215:00dpsuttontry lein deps :plugin-tree#2019-04-0215:00dpsuttoni think that's the arg#2019-04-0215:02Risettostill nothing...#2019-04-0215:04RisettoAlso this is my .lein/profiles.clj#2019-04-0215:04Risetto
{:user {:plugins [[cider/cider-nrepl "0.21.1"]]
        :dependencies [[nrepl "0.6.0"]
                       [pjstadig/humane-test-output "0.8.3"]]
        :injections [(require 'pjstadig.humane-test-output)
                     (pjstadig.humane-test-output/activate!)]}}
#2019-04-0215:04RisettoWhich should ensure I get a later nrepl version right?#2019-04-0217:21bozhidar@olle142 Only if you Lein is 2.8.2 or newer. On older versions you can’t override tools.nrepl with nrepl 0.6.#2019-04-0306:11RisettoUsing 2.9.1, so I guess it should work#2019-04-0509:45orestisAny opinions on using parinfer on Emacs? It seems like the promoted plugin is experimental WRT “smart-mode”#2019-04-0511:55practicalli-johnI find Parinfer very distracting in practice. For myself, learning slurp, barf, delete and raise in paredit or smartparents was relatively low effort and is mostly all that is needed. I can also use smartparents for all the programming language, even non lisps#2019-04-0511:56orestisI got a new keyaboard which (by accident) has no arrow keys. So my paredit keybindings stopped working (I’ve since rebound them). Thought I’d try parinfer, I liked it when I was trying it out in other editors (using the smart mode)#2019-04-0511:56orestisTIL about smartparens being available to other languages. I’d have to investigate.#2019-04-0512:20dpsutton@orestis happy hacking keyboard?#2019-04-0513:23orestisNo, just some PCB from kbdfans — but they sent me the wrong one without arrow keys#2019-04-0512:28practicalli-johnI use Evil mode in Emacs, so only need to use specific arrow keys in the few things I do outside of Emacs. Since using Spacemacs my keyboard usage has been much more effective in minimising hand move and works very well with the reduced physical keys on my model01 http://keboard.io keyboard.
#2019-04-0516:55agI use Vim keybinding pretty much everywhere: - browser: Vimium - OSX: hammerspoon with Spacehammer - Linux: EXWM#2019-04-0512:35mpenetNo need to move to vim keybindings to get rid of arrow keys usage, emacs default movements keys are fine too. I guess it's a matter of preference.#2019-04-0512:39mpenetas a bonus emacs movement keys work everywhere on linux with some minor fiddling#2019-04-0512:56orestisAlso macOS with no fiddling at all. But the new breed of Electron apps breaks that (e.g. slack)#2019-04-0512:42yuhancheck out adjust-parens too, it's basically an on-demand version of Parinfer's enforced indent mode#2019-04-0517:20didibusYa, I personally prefer Holy mode as well. And I have quite a few custom keybindings. But I guess if you don't want to fiddle with customization as much, Evil is good, since Vim has a lot of default bindings to a lot of good editor commands.#2019-04-0517:21didibusAnd I use smartparens and pairinfer both. Only parinfer has a wrap around command, so I use it for that.#2019-04-0517:35didibus
;; Enable moving between windows using S-left, S-right, S-up, S-down.
  (when (fboundp 'windmove-default-keybindings)
    (windmove-default-keybindings))

  ;; Make windmove work in org-mode.
  ;; Will only work when not in a context where org uses S-<arrow>:
  (add-hook 'org-shiftup-final-hook 'windmove-up)
  (add-hook 'org-shiftleft-final-hook 'windmove-left)
  (add-hook 'org-shiftdown-final-hook 'windmove-down)
  (add-hook 'org-shiftright-final-hook 'windmove-right)


  ;; Make M-left/right/up/down global shortcuts for forward, backward, up
  ;; and down sexp. Normally, it's C-M-left/right/up/down, but I bind that to
  ;; linux next/prev desktop. So I needed to find a replacement shortcut for
  ;; them in emacs.
  (global-set-key (kbd "M-<left>") 'backward-sexp)
  (global-set-key (kbd "M-<right>") 'forward-sexp)
  (global-set-key (kbd "M-<up>") 'backward-up-list)
  (global-set-key (kbd "M-<down>") 'down-list)


  ;; Make `C-c d` a global shortcut for duplicating the current line or region.
  (global-set-key (kbd "C-c d") 'spacemacs/duplicate-line-or-region)


  ;; Make M-( , M-[ and M-{ global shortcuts to wrap following sexp
  ;; in respective brackets.
  (global-set-key (kbd "M-(") 'paredit-wrap-round)
  (global-set-key (kbd "M-[") 'paredit-wrap-square)
  (global-set-key (kbd "M-{") 'paredit-wrap-curly)


  ;; Make M-r a global shortcut for raising sexp over parent.
  (global-set-key (kbd "M-r") 'sp-raise-sexp)


  ;; Make M-S-up/down global shortcuts for expanding and contracting region.
  (global-set-key (kbd "M-S-<up>") 'er/expand-region)
  (global-set-key (kbd "M-S-<down>") 'er/contract-region)


  ;; Make C-S-up/down global shortcuts for moving a line up or down.
  (global-set-key (kbd "C-S-<up>") 'move-text-line-up)
  (global-set-key (kbd "C-S-<down>") 'move-text-line-down)
#2019-04-0517:37didibusI don't find I ever need slurp and barf with this setup. And it's more intuitive to me then slurp and barf#2019-04-0518:19orestisOh, how can you do things without slurp/barf? I just went with the “animated guide to paredit” and I’m just using these two. And sometimes I raise sexp by accident :)#2019-04-0518:25didibusI mean. I can wrap things in sexp, I can unwrap things. And I can move the cursor up/down/left/right of sexpr.#2019-04-0518:26didibusThat's all you need#2019-04-0518:34didibusI don't personally find slurping and barfing to be useful given the above commands.#2019-04-0518:34didibusI still sometimes use split and join#2019-04-0518:34didibusBut that's rare too#2019-04-0519:39PBI feel dumb for not being able to find this, but how do I set custom identation for functions/macros?#2019-04-0519:46vemvIt's the define-clojure-indent stuff in https://github.com/clojure-emacs/clojure-mode#indentation-options#2019-04-0520:20PBThanks very much!#2019-04-0914:30borkdudeanyone know how to increase the font size for a tooltip in emacs?#2019-04-1004:54aryyyaDoes anybody here use Emacs? I’d like to use clojure-mode, paredit-mode, show-paren-mode and rainbow-delimiters-mode for editing Clojure files but I can’t figure out how to enable these automatically. I’ve been enabling them manually.#2019-04-1109:09practicalli-johnThis is one reason I use the Spacemacs configuration for Emacs. I just open a Clojure file or add the word clojure to the Spacemacs layer config and Get coding http://spacemacs.org/ If you want craft your own Emacs config, then take a look at http://www.cider.mx/en/latest/additional_packages/ for some ideas. #2019-04-1109:11practicalli-johnIf you need more ideas on configuring all these packages, take a look at https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/clojure#2019-04-1109:12practicalli-johnOr just join the #cider channel on this Slack community for help (or #spacemacs channel if you choose that approach)#2019-04-1005:35yuhanyou could add those other modes to clojure-mode-hook using add-hook#2019-04-1005:36yuhanclojure-mode itself should be enabled automatically on .clj files#2019-04-1006:42orestis
(use-package clojure-mode
  ;;:pin melpa-stable
  :ensure t
  :config

  (setq clojure-toplevel-inside-comment-form t)

  (add-hook 'clojure-mode-hook #'paredit-mode)
  (add-hook 'clojure-mode-hook #'subword-mode)
  (add-hook 'clojure-mode-hook #'rainbow-delimiters-mode))
#2019-04-1006:43orestis@aryyya.xyz This is an example from my init.el#2019-04-1013:28cmackuse-package has a :hook option which can make those last three
:hook (paredit-mode subword-mode rainbow-delimiters-mode)
#2019-04-1015:55solfHow to do nested for with cl-loop? i.e. something like this:
(cl-loop
 for i from 0 to 3
 for j from 0 to 1
 collect (list i j))

# Wanted result, not what actually happens:
=> ((0 0) (0 1) (1 0) (1 1) (2 0) (2 1) (3 0) (3 1))
#2019-04-1015:57solfThe equivalent of python [(x, y) for x in range(3) for y in range(2)]#2019-04-1016:23solfApparently cl-loop doesn't support nested loops, the best I have is:
(-flatten-n 1 (cl-loop
	       for i from 0 to 3
	       collect
	       (cl-loop
		for j from 0 to 1
		collect (list i j))))
#2019-04-1016:26cmack
(cl-loop for i from 0 to 3 nconc (cl-loop for j from 0 to 1 collect (list i j)))
#2019-04-1112:39solfthanks @cmack, didn't knew about nconc#2019-04-1112:42solfthe C-h f description of it is rather cryptic though#2019-04-1112:43solf
Concatenate any number of lists by altering them.
Only the last argument is not altered, and need not be a list.
#2019-04-1112:43cmack@dromar56 it’s definitely a common lisp / mutatable-progamming-world thing… but also handy when you are programming emacs 🙂 forgive me if you’ve already seen this, but http://www.gigamonkeys.com/book/loop-for-black-belts.html is a good resource for the common lisp loop macro and probably much of it can be transferred to emacs’ cl-loop#2019-04-1112:44solfI found that page while looking for a way to nest cl-loop, but for lack of time didn't gave it a long read, will save it for this week-end 🙂#2019-04-1112:45cmackI just saw that footnote 6 on that page has a brief summary of nconc#2019-04-1112:47solfoh that's cool, so I could also have used append#2019-04-1112:47solfwhich is a name easier to remember#2019-04-1112:47solfMy main problem with emacs lisp is that I never know what the functions I want to use are called#2019-04-1116:37cmack@dromar56 apropos is one way you can search for commands (without using google) I think it’s bound to C-h a by default#2019-04-1215:16ganyonw know how i’d go about treating a paren as a word delimiter in evil?#2019-04-1215:16gi want to be able to do viW on something like (inc and only get inc#2019-04-1215:16gtried doing (modify-syntax-entry ?( "w" clojure-mode-syntax-table) but .. it thinks i’m trying to evaluate “w”#2019-04-1215:17galso tried escaping as \ but the command just didn’t work, so i’m not sure if i did it properly#2019-04-1215:18Ivan KozI'm not sure but have you tried lispyville?#2019-04-1215:27ghmm, never heard of it. looking at it now#2019-04-1215:27gdo any significant advantages over emacs-evil come to mind?#2019-04-1215:35gas an interesting side note, i recommend against ever trying what i wrote above, because now emacs thinks i have unmatched delimiters any time i use (#2019-04-1216:38practicalli-john@gtzogana adding the package evil-cleverparens will enable existing evil states to respect structural editing and parens. With ths enabled dd will delete the current line and put any tailing parens on the line above automatically. You can unwrap things with x in normal mode and lots more. evil-cleverparens is already part of the Clojure layer for Spacemacs if you use that, you just need to switch it on , T s.#2019-04-1216:38gawesome, thanks. will give it a try#2019-04-1216:50yuhanI would recommend lispyville instead of evil-cleverparens, it's less buggy and better maintained#2019-04-1217:35practicalli-johnFor lispyville or evil-cleverparens, the difference is really in how you use them (both projects have unresolved issues). lispyville uses lispy underneath and is different to the usual evil approach (although can be used complementary). evil-cleverparens works with smartparens (my current setup) and paredit.#2019-04-1219:57aryyyaI usually have two windows open plus a sidebar (Treemacs), so three windows in total. What I don’t like is that I have to use C-x o twice to switch between the two windows because the point focuses the sidebar. Is there a way to skip over the sidebar when switching windows this way and then give the sidebar a dedicated hotkey?#2019-04-1220:04aryyyaA simple solution could be a hotkey for switching to the previously selected window perhaps?#2019-04-1716:49didibusDo you use bare emacs?#2019-04-1716:50didibusI personally use windmove to navigate between windows#2019-04-1716:53didibusIt let's you move windows geometrically. Like go to the window to the left or right. Default to shift left/right/up/down#2019-04-1716:54didibusBut you can rebind them#2019-04-1716:54didibusIf using Spacemacs, you can also just do Spc 1#2019-04-1716:54didibusOr Spc 2#2019-04-1716:54didibusWhere the number is the window number you want to go to#2019-04-1716:57didibusThere's quite a few window numbering packages, not sure which one Spacemacs uses#2019-04-1716:58didibusAnd, you could also write your own elisp to do exactly what you want#2019-04-1717:00didibusAlso, some people say there's now a standard previous-window command. Check if you have it?#2019-04-1717:01didibusFinally, you can also try ace-window#2019-04-1323:38theeternalpulseIs there a good way to browse a mode map, mainly when I want to replicate the mode with a leader key instead.#2019-04-1718:15hipster coderanyone know an emacs command to replace single quotes around a text/string with double quotes?#2019-04-1718:58theeternalpulsenon-evil?#2019-04-1722:07hipster coderspacemacs, evil mode#2019-04-1722:07hipster coderemacs or vim#2019-04-1722:23theeternalpulseif you place your cursor anywhere on or inside the quotes you can do c s ' "#2019-04-1722:23theeternalpulsethis is with evil-surround which spacemacs should have#2019-04-1722:23theeternalpulsemnemonically it means "change surrounding single quote to double quote"#2019-04-1722:24theeternalpulseyou can also type '.' after your cursor is on another one and it will repeat the sequence#2019-04-1722:24theeternalpulsehttps://github.com/emacs-evil/evil-surround#2019-04-1722:38hipster coderomg, that’s so cool. it works. Space macs rocks.#2019-04-1722:38hipster coderI love it#2019-04-1722:39theeternalpulsehehe, you mean "emacs rocks" but yes, spacemacs adds a lot of the best packages, makes it look like they made it themselves 🙂.#2019-04-1722:39theeternalpulsealso evil-surround lets you define your own surround regexps#2019-04-1722:43theeternalpulsealso, it seems to recognize ' and " when you do c s '#2019-04-1722:43theeternalpulseso you never have to press shift to match the double#2019-04-1722:51hipster coderwhat’s a good use case for using regex to replace surrounding delimeters? I am trying to learn more refactoring tricks#2019-04-1723:00theeternalpulseDepends on the language, I think evil-surround has the basics for most languages, but if you want custom ones you can add them. Maybe adding common surrounds for tags for example, though I think they have those set up already. I haven't added any, but there's a section in the docs that could shed light#2019-04-1723:01theeternalpulsemaybe you want to delete a surrounding function and replace with an assignment#2019-04-1723:01theeternalpulsein the case of js#2019-04-1718:18richiardiandrea@nathantech2005 I use string-edit for this kind of things#2019-04-1718:19richiardiandreahttps://github.com/magnars/string-edit.el#2019-04-1815:50PBI've noticed that when running emacs with the option -nw certain keybinds dont work. Is there something I can do to fix this that doesn't involve explicitly re-binding all combinations I find that don't work?#2019-04-1815:55dpsuttonwhich kind of keys?#2019-04-1815:57PBSo as an example. In gui emacs, I use C-s-) to slurp with paredit.#2019-04-1815:57PBBut with -nw, that command doesn't work#2019-04-1815:58dpsuttonthat's control-super )?#2019-04-1815:59PBctrl - shift#2019-04-1815:59dpsuttoncan you check if your terminal is swallowing the control shift?#2019-04-1815:59PBHow would I do that? Excuse my ignorance#2019-04-1816:01dpsuttoni think i normally check by running C-h c which finds out which binding is at which key. and it says the key input you've entered. So in your case it might say that nothing is bound to C-)#2019-04-1816:01dpsuttonwhich means its not getting the shift#2019-04-1816:01PBI actually just set this up this bind:
(global-set-key (kbd "C-)") 'paredit-forward-slurp-sexp)
#2019-04-1816:02PBIt ignored that bind as well#2019-04-1816:03PBSo it seems, using C-h c that any command C-) or C-S-) is not being picked up#2019-04-1816:06PBHowever M-S-) shows up as M-) whcih might be right, I"m unsure at this point#2019-04-1816:17dpsuttonwait, is there a thing as shift parens? on my keyboard it requires shift to get the paren#2019-04-1816:27PBI think you can do something like s-S-y#2019-04-1816:27PBBut i'm probably wrong. I think you're right about the shift beign silent#2019-04-1816:27PBEitehr way C-h c and trying to do C-) doesn't get detected#2019-04-1816:28PBIt just sees it as )#2019-04-1816:28PBC-g is correctly picked up properly thoguh#2019-04-1816:33PBI guess I could bind it to M-)#2019-04-1816:45PBAlso, interestingly enoguh, using C-h c. If I simply do M-n it shows up as M-n. But if I do C-n M-n it's read as C-n ESC n#2019-04-1816:46dpsuttonoh yeah. terminals are funky. are you on mac? if so there are ways to customize iterm to not be wonky#2019-04-1816:46PBI'm not, arch#2019-04-1816:46PBSo I'm sure there is a way to fix this. I'm just not sure what I'm looking for#2019-04-1816:56robertfwHello - recent convert from vim to (spac)emacs here. I’ve been enjoying the features for running tests and getting a summary straight into a buffer - I’m wondering if there are any suggestions for how to include debugging information in that summary? Usually when I am digging into a failing test it’s useful to get the log output for the test to get some more visibility. I suppose I could put in a failing assertion with the data I’m interested in, are there any better options?#2019-04-1817:11PBErm. Are you not seeing a stacktrace?#2019-04-1817:18robertfwIf I crash out yes, but when I’m not fixing a crash, I’ll use things like timbre.spy to look at values (either in the test, or in code I’m debugging). When I used to run tests directly in the repl I’d see those flow past while the test was running, but in this case the test summary doesn’t capture that#2019-04-1817:20robertfwright now i’m using (is (= false symbol-im-interested-in)) so I get the info dumped out in my test summary as a failed assertion#2019-04-1817:53PBSo you can still do that, it would still show up in your repl#2019-04-1817:53PBBut if you're looking for it inside of the test-results buffer. I'm not really sure of a solution#2019-04-1818:30robertfwThanks. I’m still figuring out suitable workflows so I may just be trying to hammer a square peg into a round hole#2019-04-1901:23practicalli-john@robertfrederickwarner You can instrument a function definition before running the tests using the cider debugger, , d b or M-RET d b in Spacemacs, or put #dbg on the line before the function definition. When you run the tests you see the code step through the function with the values of symbols and function calls as each test executes.#2019-04-1918:10theeternalpulseI have a question, what is C-c called formally by emacs#2019-04-1918:10theeternalpulseis it the common prefix?#2019-04-1918:18practicalli-john@theeternalpulse that is press and hold Ctrl key and press c key C- is short for Ctrl M- is for Meta, usually Alt on PC or Option on Mac S- is for Shift I forget if there is a short-hand for Super, but then i dont really use that key with Emacs.#2019-04-1918:28agH- - hyper, s- - super, A- - alt. Meta and Alt used to be different keys#2019-04-1922:11theeternalpulseoh no, I know what the command does, but what is the C-c key called?#2019-04-1922:12theeternalpulseas in how is it referred to in general by emacs users. Similar to how evil/vim has a "leader" key designation#2019-04-1922:28dpsuttonIt’s part of a chord. Never heard a term for the first part or prefix#2019-04-2004:38amdt@theeternalpulse In general, C-c, C-x, C-h etc. are referred to as ‘prefix keys’. C-c doesn’t have a name but its keymap is the variable ‘mode-specific-map’ since it’s mainly used for mode-specific bindings. Perhaps it could be called the ‘mode-specific prefix key’ or something like that.#2019-04-2021:41alexcatalinaanyone able to use clj-refactor right now? i’m getting https://github.com/clojure-emacs/clj-refactor.el/issues/435#2019-04-2021:46alexcatalinai have cider 0.22-SNAPSHOT, which may be a problem for nrefactor?#2019-04-2021:49yuhanit's probably due to your Java version - I recall that clj-refactor isn't compatible with newer versions#2019-04-2106:07benedekyes, this particular version is not. there are workarounds described in cider docs#2019-04-2214:56PBDo you guys ever get your cider to a state where cider-send-last-sexp-to-repl sends the form to the repl, but does not evaluate?#2019-04-2222:18richiardiandreaIt happened to me then I discovered that I did not have some defcustom set to true#2019-04-2314:26PBI usually have to restart my repl#2019-04-2319:09tianshuHow can I tell emacs to use a specified language context(or just syntax highlighting) in a range on buffer. for example, I have
insert into test_table
("key")
values
(
/*~ (if (:key params) ":key" "NULL")) ~*/
);
I want highlight the content between /*~ ~*/ with clojure syntax.
#2019-04-2409:30plexus@doglooksgood the thing to google for is "Multiple Major Modes", there are a few packages around that try to do this, with varying levels of success.#2019-04-2409:31plexushttps://www.emacswiki.org/emacs/MultipleModes#2019-04-2412:53benedeki have never tried myself but i think org mode can do something like this...#2019-04-2412:58hkjelsorg-mode does some context-aware highlighting indeed#2019-04-2412:58hkjels(setq org-src-fontify-natively t)#2019-04-2413:14tianshu@plexus thanks, I'll check this repo#2019-04-2421:38dmaiocchihi all, i have a emacs nob question#2019-04-2421:39dmaiocchiwhat do you use for searching the word under the cursor ?#2019-04-2421:39dmaiocchie.g
(defn create-rocket-msg-trigger []
  (t/build
i have the cursor on the function name and i want to go to next usage. is there a way? i'm currenlty using swiper for searching but I'm searching if there is such functionality
#2019-04-2421:42dpsuttoncheck out loccur mode#2019-04-2421:42dpsuttoni use it constantly. will collapse the buffer down to only lines which match the term under point#2019-04-2421:45dmaiocchisound promising cool ! thx#2019-04-2422:02twillisjust to throw in the spacemacs solution.... M-* (spacemacs/enter-ahs-forward) ;; search symbol under point current buffer M-m * (spacemacs/helm-project-smart-do-search-region-or-symbol) ;; search symbol under point project wide with silversearcher#2019-04-2422:39LuWhat do you guys use as a completion tool? I tried company but wasn’t super happy about it #2019-04-2423:19theeternalpulseI use company, I just turn off the delay and manually trigger it with C-SPC. What don't you like about it?#2019-04-2423:44LuThe delay is the most annoying thing! I’ll give it a second try by triggering it manually #2019-04-2423:46theeternalpulseI agree, here's my setup
(use-package company
    :config
    (setq company-idle-delay nil)
    (define-key global-map (kbd "C-SPC") #'company-complete)
    (define-key company-active-map (kbd "<return>") nil)
    (define-key company-active-map (kbd "RET") nil)
    (define-key company-active-map (kbd "TAB") #'company-complete-selection))
#2019-04-2423:47theeternalpulsethis is my work machine, at home I have C-SPC as both the complete and complete-selection#2019-04-2423:47theeternalpulsethat way tab can stay the way it is#2019-04-2423:47theeternalpulseit causes confusion when switching between my work and home machine, but it can be whatver is comfortable for you#2019-04-2508:48benedekhttps://github.com/emacs-lsp/lsp-mode/pull/791#2019-04-2618:03agdoes anyone know why suddenly clipboard-yank and all the related functions suddenly not working anymore Emacs 26.2, 27 are affected#2019-04-2618:22practicalli-john@ag yank seems to be okay on my version "GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.1) of 2019-02-11" I will upgrade an old laptop to latest 27 snapshot over the weekend and test out.#2019-04-2618:23agon mine it shows let: Wrong type argument: consp, nil#2019-04-2618:24agI’m not sure wtf#2019-04-2618:24practicalli-johnwhat did you upgrade / change ??#2019-04-2618:26agI did the clean install of everything… not sure what broke it#2019-04-2618:28agIt might be spacemacs related… someone added an advice or something#2019-04-2618:31agyup it’s in Spacemacs#2019-04-2618:35aghttps://github.com/syl20bnr/spacemacs/issues/12237#2019-04-2809:47baptiste-from-parisHello friends, Does anyone have a little experience launching process with start-process-shell-command? Here is my question, I can easily launch a process, send a string input as a command but I am locked with the output when it’s too big, stdin is waiting for me to press “enter”. I can’t find a way to solve this right now. Thank’s a lot in advance for your time 🙂#2019-04-2810:17baptiste-from-parisokay, it looks like pipe process work fine for my case#2019-04-2810:17baptiste-from-paris🙂#2019-04-2815:48theeternalpulseI haven't personally used it, but I did some fiddling to get something like prettier_js working and it uses a lot of host process interop commands for piping and whatnot#2019-04-2900:50theeternalpulseIs there a way to make evil-mode remember more than just the last command for certain commands. Say I did something like vaw ... sb i' for surrouning a word with parens and inserting a ' for a list type. I want that whole operation to be seen as a command that I can repeat when I move my cursor and type .#2019-04-2901:57agUse a macro#2019-04-3019:11solfUsing regex, any way of telling "this syntax class except this character"?#2019-04-3019:12solfI want to match any word constituent (`\\sw`) except n#2019-05-0106:54benedek[\\sw^n]#2019-05-0106:54benedekon my phone have not tested#2019-05-0203:55theeternalpulseI noticed that my evil bindings and general bindings for clojure mode are overriding the dubugger. So I can't press c or n for continue or next. I have to type the emacs escape '\` to get them working. how do I make the debugger mode bindings have higher priority if that is the case.#2019-05-0208:23yuhantry this out:
(evil-make-overriding-map cider--debug-mode-map 'normal)
    (evil-normalize-keymaps)
(taken from default Spacemacs config)
#2019-05-0518:02theeternalpulseAnyone use edit-server. I've noticed when I edt certain textareas the css and such also come in line with it. Is there a way to exclude markup when editing a textbox#2019-05-0519:40lilactownI use ZSH, macOS. when I launch Emacs, and open up an ansi-term buffer, my JAVA_HOME is set. when I open up a new iTerm shell, my JAVA_HOME is not set#2019-05-0519:43theeternalpulsehttps://github.com/purcell/exec-path-from-shell This will let emacs use the system path so you don't have to set it separately.#2019-05-0519:44theeternalpulseMuch more resilient then satting the vars manually#2019-05-0519:40lilactown(I want it not set)#2019-05-0519:40lilactownany pointers on where I could start with figuring out how my JAVA_HOME is being set?#2019-05-0519:41lilactownmy .profile / .zprofile and .zshrc are not setting JAVA_HOME in this case#2019-05-0519:42lilactownah, I just found .spacemacs.env#2019-05-0519:59theeternalpulseI've noticed using use-package with load-path still tries to connect to melpa.#2019-05-0520:16theeternalpulsenm ,found out if you use :ensure t, it reaches for the melpa version.#2019-05-0818:44theeternalpulsein my magit-process buffer, there's a ton of ^[[xx entries for special characters, is there a way to make the buffer recognize and display them properly#2019-05-0821:11agscreenshot?#2019-05-1007:15manandearthLooking for a JS setup... I come to javascript from clojurescript and not the other way round, so I find it hard to give up on my emacs experience... pointers?#2019-05-1011:24practicalli-johnThe Spacemacs layer should give you some ideas, for packages used and configuration. https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/javascript#2019-05-1014:47tannersIf at all possible, attempt to use typescript over javascript. The typescript tooling for emacs (specifically tide) is miles better than the js equivalent.#2019-05-1017:23theeternalpulseI use JS at work with spacemacs, I've added RJSX package manually as it's great for react, though it has missing gaps/bugs.#2019-05-1017:23theeternalpulse@U5DEC96P7 is it backwards compatible, as in, does it provide a lot of syntax functionality to just js or does it bug out at certain points in es6 syntax? Also does it support react?#2019-05-1017:25tannersTypescript is a superset of javascript, so any valid es6 is valid typescript. And it does support react, I'm using it for a react project at work right now. The files simply change from js/jsx to ts/tsx#2019-05-1017:43theeternalpulseah, I have to trigger the modes manually when it detects import React at the top of a buffer.#2019-05-1017:43theeternalpulsesince at my job our react files are just .js#2019-05-1017:46theeternalpulseI'll try it out. though#2019-05-1107:51manandearthThanks, @U05254DQM @U5DEC96P7 and @theeternalpulse .#2019-05-1107:55practicalli-john@UBGH0Q0H4 glad we could help. I don't use JavaScript myself, I use ClojureScript and reagent (react.js wrapper). I would be interested to hear if the JavaScript layer or others has helped you. Thanks.#2019-05-1107:58manandearthI will let you know @U05254DQM, I was sent a link to download visual-studio and immediately turned pale.. 😱 So I will give it my best shot...#2019-05-1108:02practicalli-johnVSCode is quite a nice editor and a world appart from Visual Studio. So if you don't get what you need from Spacemacs in terms of JavaScript, it could be a good alternative. There is also a nice Clojure plugin called Calva.#2019-05-1108:03practicalli-johnI would like to see a nice Spacemacs experience for VSCode, maybe called Spacecode :)#2019-05-1521:50felipebarrosSorry for the late response but you may find this Reddit thread of relevance: https://www.reddit.com/r/emacs/comments/8e24t9/writing_reactjsx_in_2018_what_addons_do_you_all/ I've been recently trying to build up a nice JavaScript experience on top of Spacemacs (coming from Clj/Cljs just like you) and this helped me a lot. RJSX with Tide, flycheck/eslint, prettier and flow. It's the best of VSCode on top of Emacs so it has been great so far. I only wish I could find work with CLJS forever and never touch a line of JS again though.#2019-05-1008:08michalhey, I started using orchestra along with clojure specs and looks like defn-spec macro fools clojure mode in a way that all docstrings are treated as strings (and displayed in different color). is there any way to instruct clojure mode (which I guess is responsible for syntax highlighting) to recognize a syntax of defn-spec, which looks more or less like this:
(defn-spec my-add integer?
  "Returns the sum of `a` and `b`."
  [a integer?, b integer?]
  (+ a b))
#2019-05-1016:40yuhanI think you have to put a property onto the elisp symbol defn-spec for that to happen#2019-05-1016:42yuhansomething like (put 'defn-spec 'clojure-doc-string-elt 3) where 3 is the index of the docstring in the sexp#2019-05-1017:25theeternalpulseAny good tutorials on developing an emacs package? I've found a coupl that touch on it but nothing really comprehensive.#2019-05-1018:28jeff.terrell@theeternalpulse - Not comprehensive, but maybe a start: the "Extending Emacs" series here: http://emacsrocks.com/#2019-05-1019:44michal@qythium awesome! works perfectly. thanks.#2019-05-1118:54Idan Melamed#2019-05-1209:50practicalli-johnThe Emacs setup in http://BraveClojure.com is very old and out of date, particularly for CIDER. Suggest you look at http://www.cider.mx/en/latest/installation/. Or if you use Spacemacs, take a look at https://practicalli.github.io/spacemacs/#2019-05-1213:55Idan MelamedThanks!#2019-05-1119:03Idan MelamedI installed zsh for now... But would like to uninstall it and still be able to run the REPL from Emacs#2019-05-1119:27dpsuttoncan you m-x toggle-debug-on-error?#2019-05-1119:27dpsuttonif you can get a stacktrace of where its trying to use zsh that would be helpful#2019-05-1119:34dpsutton@idanmel where did you get your emacs setup?#2019-05-1119:34Idan Melamedshould I paste the error here?#2019-05-1119:34Idan MelamedI got it from "brave and true"#2019-05-1119:35Idan MelamedI Think I'll just keep zsh installed for now... Everything seems to work when it's installed#2019-05-1119:37dpsuttonare you on osx?#2019-05-1119:37Idan Melamedubuntu#2019-05-1119:39dpsuttonok. i'm guessing this is because you still have a .zshrc file laying around. I hypothesize that if you rename this file this problem goes away#2019-05-1119:39dpsuttonthere's a package exec-path-from-shell that loads shell info stuff but actually isn't aware that you no longer have zsh involved. I bet there's some aliases involved that assume zsh is present and this breaks#2019-05-1119:41Idan Melamed@dpsutton thanks#2019-05-1119:42dpsuttoni'm interested to know if my guess is close 🙂. Let me know#2019-05-1119:43Idan MelamedI uninstalled zsh and renamed .zshrc, and it didn't do the trick#2019-05-1119:43dpsuttonwell dang#2019-05-1119:43dpsuttoncan you restart?#2019-05-1119:44dpsuttonalso, can you eval this elisp code? (cider--resolve-command cider-lein-command)#2019-05-1119:44dpsuttonso we can see what CIDER thinks its supposed to be invoking#2019-05-1119:45Idan Melamedwher do I eval it?#2019-05-1119:46dpsuttonhit m-: and paste it into the prompt at the bottom#2019-05-1119:46dpsuttonalternatively, you can paste it into the scratch buffer which is set up as an elisp file#2019-05-1119:46Idan Melamedit evals to /home/my-username/bin/lein#2019-05-1119:47dpsuttondid you try the m-x toggle-debug-on-error?#2019-05-1119:47dpsuttonlets see the stacktrace#2019-05-1119:48Idan MelamedThanks for the help... It's working when zsh is installed, I'll just keep it at that and call it a night for now#2019-05-1119:48Idan MelamedGetting late for me#2019-05-1119:49dpsutton👍#2019-05-1119:49Idan MelamedGood night and thanks again 🙂#2019-05-1209:50practicalli-johnThe Emacs setup in http://BraveClojure.com is very old and out of date, particularly for CIDER. Suggest you look at http://www.cider.mx/en/latest/installation/. Or if you use Spacemacs, take a look at https://practicalli.github.io/spacemacs/#2019-05-1219:13theeternalpulseI noticed edebug kind of just stops if it encounters undefined vars, without showing a message or anything. Is there a way to surface any issues that caused the debugger to stop.#2019-05-1220:02theeternalpulseactually I think it has to do with the hydra displaying in the message area#2019-05-1417:18robertfwI'm using spacemacs, and have been seeing some weird indentation issues with comments. Namely, they get autoindented to the 40th column. Any pointers on where to look for what is going wrong?#2019-05-1417:18robertfwas I type that, I realize it is only happening with single ; comments, ;; comments get indented properly#2019-05-1423:06practicalli-johnSPC ; will toggle the comment for a region and SPC ; ; will toggle a comment on a line.#2019-05-1423:07practicalli-johnIn Evil (vim) normal state, you can also use g c c to toggle the comment of a line and g c to toggle the comment of a region#2019-05-1423:08practicalli-johnYou can also use M-; to add a comment line.#2019-05-1423:08practicalli-johnSpacemacs will use the default comment syntax for the current mode. If there is no default syntax for a comment, Spacemacs will prompt you 🙂#2019-05-1417:38donaldballAFAIK clojure-mode follows these semicolon conventions: https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html#2019-05-1417:38robertfwAh, that is very helpful. thanks!#2019-05-1418:01bozhidar@donaldball Yeah, that’s right. Also documented here https://github.com/bbatsov/clojure-style-guide#comments#2019-05-1418:02bozhidarIt’s on my todo to allow the usage of ; for whoever prefers this, but I haven’t had the time to do so.#2019-05-1511:50theeternalpulsehow do I translate a key code to a string?#2019-05-1511:58theeternalpulseah, (message "%c" code) works#2019-05-1516:33ChaseI'm now getting an error when trying to jack in with cider.
[nREPL] Starting server via /usr/local/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.22.0-beta1\"\] -- repl :headless :host localhost...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: /usr/local/bin/lein: line 224: type: java: not found
Leiningen couldn't find 'java' executable, which is required.
lein repl works fine from my terminal.
#2019-05-1516:33Chasejava -version works fine too. and the clj tools#2019-05-1516:35ChaseI get this suggestion: Please either set JAVA_CMD or put java (>=1.6) in your $PATH (/usr/local/sbin:/usr/local/bin:/usr/local/games:/usr/sbin:/usr/bin:/usr/games:/sbin:/bin). but my actual $PATH command gives me this:
λ ~ : $PATH
-bash: /home/chaselambert/jdk-11.0.3+7/bin:/home/chaselambert/graalvm-ce-19.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:
#2019-05-1516:53ChaseI solved it by reinstalling the exec-path-from-shell package. Not sure why my emacs needs that (I think the package is mostly for Mac folks) as I'm on linux but whatevs#2019-05-1602:30theeternalpulseI think emacs keeps separate environment from the host system, so you need to either do it manually or use this#2019-05-1602:34theeternalpulseI noticed that when I enter iedit mode or elisp-debug mode while using evil and try to type something like 'n' for next occurence in iedit or 'h' for "here" in the debugger, the keys don't seem to register since I'm in evil mode initially. I have to press esc to enter the mode where I can type the original keymap commands for the mode. Do I have to re-map all the keys I want for evil states, or is there an easy way to tell emacs "when I enter iedit mode, treat commands typed in evil states that aren't insert like they are the normal emacs modes"#2019-05-2012:22andrea.crottiit would be great to have this available in cider or just Emacs anyway https://github.com/borkdude/re-find#2019-05-2012:22andrea.crottia simple wrapper should be easy to do#2019-05-2015:00vemvPerhaps I would do a simple IDE-agnostic repl wrapper that calls the thing and then presents the results using clojure.pprint/print-table if needed As for easy access, I tend to use yasnippet over the repl buffer (e.g. refind<TAB> -> an expanded stubbed call of re-find). Plus requiring the lib in advance in Lein profiles.clj#2019-05-2108:45bozhidarThat’s what I want to do with Orchard at some point.#2019-05-2108:46bozhidarExpose an extra orchard.repl namespace that basically provides REPL-friendly wrappers for the core functionality.#2019-05-2018:10theeternalpulseIs there a way to only "export" certian functions when creating a package, instead of all of them being available globally?#2019-05-2018:13dpsuttonThere is no notion of export. They are interned or not#2019-05-2018:14dpsuttonNor a notion of namespaces#2019-05-2018:14theeternalpulseis there any solution out there, maybe a suite of macros?#2019-05-2018:15dpsuttonthere's a convention of package-name-public and package-name--private (Double dashes)#2019-05-2018:16theeternalpulseyeah, I don't love that because when a user tries to find relevant packages the --private comes up first#2019-05-2018:16theeternalpulsebut I know it's a standard#2019-05-2018:16theeternalpulseah well, I won't harp on it much, I just hate that aspect of elisp#2019-05-2018:17dpsuttonagreed 😞#2019-05-2018:18theeternalpulseI was going to go with just local lets, or use that cl- let form for functions#2019-05-2018:18theeternalpulsecl-labels#2019-05-2108:47bozhidar> it would be great to have this available in cider or just Emacs anyway#2019-05-2108:48bozhidar@andrea.crotti Yeah. Adding something like this to apropos might be cool.#2019-05-2117:05theeternalpulseIf I have a macro that only needs to generate a form to evaluate, and not parse arguments, is it standard to have a macro with no args, or have it be a function and eval the form it generates?#2019-05-2117:10theeternalpulsehttps://github.com/dantheobserver/dotflies.el/blob/master/dotflies.el#L92 Basically here my macro is just to return a macro form since I need to generate a list of args and splice it into the arguments of the cmd function#2019-05-2220:06vemvI'm surprised by the Show documentation in a WebKit widget screenshot at the bottom https://github.com/emacs-lsp/lsp-ui I thought Webkit support was still experimental/fringe in Emacs? (or maybe I have bad memory and it only was on macOS)#2019-05-2220:29dadairHow does clojure-lsp play with CIDER? Are they complimentary?#2019-05-2220:36vemvThey might play well together (as in: not clash) but CIDER is so complete it's unlikely that c-lsp adds extra value c-lsp might be recommendable if you are big on LSP and pursue a simple / uniform setup and are willing to drop CIDER for that#2019-05-2220:49dpsuttonc-lsp adds a lot of functionality. i really like it#2019-05-2221:08didibusc-lsp supports things that don't require a repl which is noce#2019-05-2221:08didibusnice*#2019-05-2221:19vemv@U11BV7MTK which would be some nice examples?#2019-05-2221:20dpsuttonrename, find-references, go to location are all quite nice#2019-05-2221:20dpsuttonemacs has go to location but it requires active nrepl and file loaded#2019-05-2221:20dpsuttonthere are other refactorings i haven't gotten setup yet in emacs but are nice in neovim#2019-05-2221:25vemvI use clj-refactor (presumably a very usual choice between CIDER users) and I'm quite happy with it (plus I assume it will have superior accuracy) Personally the "no repl" argument is quite irrelevant to me, I don't work without a repl. It can lead to committing stuff one didn't even bother trying out. Plus spawning a repl is easy enough#2019-05-2314:24bozhidarWell, you always have to be running some server (a REPL server or an LSP server). Obviously, I’m fond of the REPL approach, but some people might prefer the other one.#2019-05-2314:25bozhidarIf you’re using some very basic REPL (e.g. inf-clojure or another editor) probably c-lsp’s value proposition becomes way more appealing.#2019-05-2319:08richiardiandreaI am going to write my dream here 🙂 A server is a server so it could answer to the nRepl protocol on a port and to LSP commands on another port#2019-05-2319:29vemv😄 one also could think of a LSP server that "best-guesses" as its baseline smartness, but later if you fire up a repl, it will get CIDER-like smartness
#2019-05-2322:02didibusNot all server are made equal though#2019-05-2322:03didibusAn lsp server auto-sync with buffers, and its state can not be altered through a repl or in ad-hoc ways that don't match the source buffers.#2019-05-2322:04didibusAnd the best appeal to me, is that parsing for them is generally focused on being loose and heuristicall#2019-05-2322:05didibusWheres as if you leverage the Clojure compiler and runtime for parsing, it will be very strict, as it should. But that's a different goal to what you'd want your editor to do.#2019-05-2322:07didibusNothing specific to lsp. I mean, nRepl functionality could be designed with that in mind as well. But I'd argue at the very least, there should be one nRepl reserved to the editor, which is kept in perfect sync with the buffers automatically, and is relaxed in its parsing and used for auto-complete, refactors, go-tos, etc.#2019-05-2322:08didibusAnd another one for repl usage. Where the user is free to manually control what gets loaded, and can run code directly in it. Etc.#2019-05-2322:10didibusNot complaining, I love cider, nrepl and clj-refactor, but lsp has a simplicity to it which is appealing, and more of a it just works all the time. Where as normal nRepl requires more out of me, to make sure I'm in sync, I reloaded things properly, that I don't have any unbalanced parens, or syntax errors, etc.#2019-05-2401:25richiardiandreaYou are right state management is completely different, probably none is probably shared between the two. We might discover some neat thing by going through the exercise, very interesting..#2019-05-2410:38bozhidarI don’t get how state management can be a server’s responsibility. Typically clients should decide what they want to sync. I think you actually meant to say that LSP actually operates on the raw source code of the project, otherwise it can’t really have meaningful AST for the entire project. That’s certainly a reasonable approach for finding usages/definitions/etc. There’s nothing preventing nREPL clients from auto-loading all project files on every change to those files, btw, but it’s generally a bad idea to evaluate unconditionally code that might have some side effects.#2019-05-2412:17dpsuttonanother nice aspect of the static analysis is that it is instantly up for new projects. No messing with figuring out which profiles are needed, how to get nrepl up, possible clojurescript choices, it just starts analyzing symbols. Its quite nice.#2019-05-2412:23bozhidarWell, you still need to setup the LSP server and clients, though.#2019-05-2412:23bozhidarI think the only free lunch is something like ctags. 😉#2019-05-2412:25bozhidarAnyways, I haven’t used LSP much, so perhaps this works better than I think it does.#2019-05-2414:33didibusLsp-mode currently starts the lsp server automatically mostly. But ya, there's still some setup required for the classpath.#2019-05-2414:35didibusUsing the repl for a lot of these features make sense, since static analysis is hard. That said, I think static analysis could be a nicer UX once it works. You'd still want a repl for all eval related tasks.#2019-05-2414:36didibusThe lsp server is just a good way to allow to not have to re-built that analyses in every editor#2019-05-2414:37didibusThat said, as an Emacs user, I'd also be happy with Emacs natively being able to analyze and perform these features just with Clojure mode 😋#2019-05-2414:47richiardiandreaCtags/ggtags is awesome I tried to use it but the built in parser is not that sophisticated#2019-05-2313:54orestisFavorite themes to use for Clojure?#2019-05-2314:19practicalli-johnspacemacs-dark, kaolin-valley-dark, or their light equivalents, spacemacs-light and kaolin-valley-light#2019-05-2314:26bozhidarZenburn and Solarized#2019-05-2314:50respatializedIf you use wal to set your desktop wallpaper then xresources-theme can look really slick based on the colors it pulls from the image#2019-05-2316:49zetafishgrandshell because I am colorblind#2019-05-2320:26felipebarrosdracula a million times 🙂#2019-05-2320:26felipebarroshttps://draculatheme.com/#2019-05-2320:50agWhen it comes to choosing themes, my suggestion would be, either: - go with the most polished and popular ones: Zenburn, Solarized, Sanityinc - base16 themes - less colors, less strain to the eyes - also doom themes are aesthetically pleasing, but that aspect is very subjective#2019-05-2320:52agAlso I would recommend picking at least 2 themes: light and dark one, and switch between them depending on the light conditions. There are different ways of doing that. You can even set it based on current time#2019-05-2321:07felipebarrosDracula, Monokai and Spacemacs themes are also incredibly polished.#2019-05-2400:36agigaoLeuven during the day, Zenburn at night.#2019-05-2416:02Tim HowesI like the built-in Wombat theme#2019-05-2402:28nmkipHi, beginner here 🙂 Need some help with emacs and cider and the repl#2019-05-2402:35dpsuttonWhat’s up @juan.ignacio848 #2019-05-2402:36nmkipI can't start the repl (using M-x cider-jack-in)#2019-05-2402:37nmkipI think it might be cider version (0.14.0) but I'm not sure.#2019-05-2402:37nmkipI upgraded my lein version today#2019-05-2402:39nmkipi can start a repl using 'lein repl'#2019-05-2403:05nmkipgot it 😄#2019-05-2403:06nmkipupdated cider, cljr-refactor and repl is working again with cider jack in#2019-05-2403:06nmkip🙂#2019-05-2501:17Daoudahey guys, I am new at learning clojure and was using intellij and cursive plugin, but i decided to switch to emacs. I want to know if there a cursive plugin for emacs, if yes how to get it?#2019-05-2503:06didibusYou got many options for Emacs. Cider is the most popular one. There is also inf-clojure (most minimal). Clojure-lsp, and spiral#2019-05-2503:06didibusBut you should try Cider first#2019-05-2507:12practicalli-johnCIDER is what the large majority of developers use to give you all the IDE features you are used to. There are some great docs at http://www.cider.mx/en/stable/ If you are new to Emacs, I suggest looking at a community configuration to help you get started quickly, such as Spacemacs. My Spacemacs setup for Clojure is detaied here https://practicalli.github.io/spacemacs/ It includes auto-completion, got client, linter, structural editing, etc.#2019-05-2502:00tannersCheck out CIDER https://github.com/clojure-emacs/cider. Its the go to clojure plugin for emacs. Its different than cursive but theres a lot of overlap.#2019-05-2502:01tannersAlso if you have further questions about it theres a cider specific channel#2019-05-2704:15anishI want to copy expression when my cursor at the start of it, same as that for function when my cursor is at the start, any ideas?#2019-05-2704:38anishTo be more clear about question, e.g Ctrk-k , kills expression, instead of killing i want to copy it#2019-05-2705:52felipebarrosI believe the Emacs way is to mark to the end of line and copy with C-SPC C-e M-w or to mark the sexp and copy with {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "61224c21"}, :content ("[email protected]")}. That said, Smartparens has a function called sp-copy-sexp (by default bound to C-M-w) that does what you want. In Spacemacs it is bound to SPC k y in Evil (actually it is evil-lisp-state-sp-copy-sexp) and M-m k y in Holy.#2019-05-2705:57anishThanks#2019-05-2705:57anishe.g if i have function like#2019-05-2705:57anish(defn some-func [] (-> (call-func) (:body) (json/read-str)))#2019-05-2705:58anishand want to copy from threading macro what i need to do is , Ctl-Space, then end of read-str paren and M-w to copy#2019-05-2705:59anishBut what i would like to copy threading macro expression itself without going end of expression#2019-05-2706:00felipebarrosHmm, do you know a package called expand region?#2019-05-2706:00felipebarrosexpand-region#2019-05-2706:01anishlooking into it#2019-05-2706:01felipebarrosI believe that is what most people would use to do what you want. Inside an expression, it allows you to expand selection by container. I can't live without it. 🙂#2019-05-2706:02anishThank you !! 🙂#2019-05-2706:02felipebarrosIn Spacemacs it is in SPC v, so you can keep pressing v to expand until you reach the scope you want and then finally copy it.#2019-05-2706:03felipebarrosYou're welcome!#2019-05-2706:05anishits awesome, i don’t know why i didnt know lol#2019-05-2706:06felipebarrosYeah, there is always another package that we should be using.#2019-05-2705:52felipebarrosI believe the Emacs way is to mark to the end of line and copy with C-SPC C-e M-w or to mark the sexp and copy with {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "e8abc5a8"}, :content ("[email protected]")}. That said, Smartparens has a function called sp-copy-sexp (by default bound to C-M-w) that does what you want. In Spacemacs it is bound to SPC k y in Evil (actually it is evil-lisp-state-sp-copy-sexp) and M-m k y in Holy.#2019-05-2712:47anthony-galeaPerhaps someone else has a use for this: I wrote an elisp function that converts the contents of cljx files to use reader conditionals: https://github.com/anthonygalea/cljx/blob/master/cljx.el#L31 Tried it on timbre https://github.com/ptaoussanis/timbre/pull/288/files Feedback welcome.#2019-05-2717:19theeternalpulseIs there a better formatted stack trace in emacs. I'm getting long lines spanning far outside the window and it's hard to keep track if it's debugging a long var value. Some form of bette rnavigation buffer or pretty print#2019-05-2808:22mccraigmccraig‘toggle-truncate-lines‘ not doing it for you @theeternalpulse?#2019-05-2816:27theeternalpulseI actually haven't set up that hook yet, I'll try that#2019-05-2812:55andrea.crottisomething weird started happening with smartparens a couple of weeks ago, typing " I get \"\"#2019-05-2812:55andrea.crottiI managed somehow to fix it, but at the next Emacs restart it started happening again#2019-05-2812:55andrea.crottiboth with strict and non strict mode#2019-05-2812:55andrea.crottianyone else noticed something similar?#2019-05-2912:19practicalli-johnYes, I think I did see this a couple of times, but I think it only happens on a certain action, which I dont do very often. If it happens again I'll take note of what I did.#2019-05-2915:30andrea.crottithis is very weird, somehow it was related with ein (the Emacs Ipython Notebook library)#2019-05-2915:30andrea.crottiwhich was not required by anything but there was a function call to it that was failing#2019-05-2915:30andrea.crottistrange, since they should not really be related packages#2019-05-2915:30andrea.crottiwho knows#2019-05-2816:27theeternalpulse@andrea.crotti have you looked into electric pairs to see if disabling that works, that is if it is enabled#2019-05-2816:44andrea.crotti@theeternalpulse uhm it was disabled already#2019-05-2816:44andrea.crottiit's quite strange since it worked perfectly well for quite a long time#2019-05-2915:41bozhidarFYI - https://metaredux.com/posts/2019/05/29/cider-mx-reloaded.html#2019-05-2920:42fedregLooks really nice! Thank you!#2019-05-2916:21practicalli-johnhttps://docs.cider.mx/ looks great, thanks. Very quick website.#2019-05-2919:57pyrQuick nudge on a https://github.com/clojure-emacs/cider-nrepl/pull/611 if anyone has the chance to look at it#2019-05-3013:56flefikI’m trying to debug an issue with org-mode. C-c a a does not work and just displays an empty schedule. If I delete about half of my org file the weekdays show up (but no deadlines or schedules). This started occuring after switching spacemacs from master to develop. Any ideas?#2019-05-3015:04flefikI pulled latest and it resolved itself. Thanks anyway#2019-06-0306:06yuhanAnyone know of a command / package for normalising whitespace in Clojure code or lisps in general? (foo bar ) =>`(foo bar)`#2019-06-0318:02agM-x replace-regexp SPC+ RET SPC RET#2019-06-0319:03yuhanThat doesn't do the job of removing whitespace before closing delimiters though, or inserting spaces between forms eg. ([a][b]) => ([a] [b])#2019-06-0306:08yuhancljfmt (via cider-format) requires a running REPL process and doesn't affect inter-symbol whitespace#2019-06-0315:04orestisOh I’d love to have that too. #2019-06-0318:41felipebarrosYeah, neither parinfer-fix or whitespace-cleanup from whitespace package clean inside forms.#2019-06-0318:46felipebarrosI use delete-horizontal-space a lot though, often with multiple cursors. Maybe a simple macro can do the job?#2019-06-0318:47felipebarrosHere it is bound to M-\.#2019-06-0319:07felipebarrosMy Emacs regexp skills are failing me, but I believe you just need to ignore the first set of empty spaces (indentation), delete-horizontal-space on everything else and enter a single space or move to the end of the whitespace, one character back and delete-horizontal-space with C-u 1 M-\.#2019-06-0319:10yuhanhmm, it looks like fixup-whitespace does the job for a particular point, the problem now is to iterate it through the form and handle edge cases, eg. not affecting whitespace in strings/comments#2019-06-0319:10felipebarrosActually I mixed two ways to solve the problem. With regexup substitution you only need to target the second group of two or more whitespaces and set them to one.#2019-06-0319:11felipebarrosNice! Wasn't aware of fixup-whitespace. I may even bind it to something.#2019-06-0319:20felipebarrosC-u C-M-| perl -pe 's/(\S)(\s)\s*/$1$2/g' RET#2019-06-0319:21felipebarroswith a region#2019-06-0319:21felipebarroshehehe#2019-06-0320:14yuhan
(defun fixup-defun-whitespace ()
  "Normalise all whitespace between forms in defun, and group closing parens.
Does not affect strings/comments"
  (interactive)
  (let* ((bnds (bounds-of-thing-at-point 'defun))
         (beg (car bnds)) (end (cdr bnds)))
    (save-excursion
      (goto-char end)
      (while (> (point) beg)
        (search-backward-regexp "[([{ \t\r\n]" beg)
        (unless (or (nth 8 (syntax-ppss)) ;; in a string or comment
                    (nth 4 (syntax-ppss)))
          (let ((s (buffer-substring (point-at-bol) (point))))
            (cond
             ;; indentation, skip
             ((string-match-p "^[ \t]*\\'" s)
              (forward-line 0))
             ;; closing paren on separate line
             ((string-match-p "^[ \t]*[])}]" s)
              (forward-line -1)
              (end-of-line)
              ;; don't join if prev line is a comment
              (unless (nth 8 (syntax-ppss))
                (delete-char 1)
                (fixup-whitespace)
                (forward-line 1)))
             (t
              (fixup-whitespace))))))
      (goto-char beg)
      (indent-sexp)
      (when (derived-mode-p 'clojure-mode)
        (call-interactively 'clojure-align)))))
#2019-06-0320:15yuhanhere's what I hacked together - although I'd be surprised if something like it doesn't already exist out there#2019-06-0804:05DaoudaHey Folks, can you tell me or point me a documentation about how to use namespaces organizer nsorg on emacs?#2019-06-0822:02DaoudaHey Folks, how can I control emacs frames sizes?#2019-06-0822:06didibusYou should be able to like any other program.#2019-06-0822:06didibusUsing your OS maximize, minimize, resize features#2019-06-0822:06didibusOr you have a different idea?#2019-06-0822:09ag@quieterkali programmatically? (set-frame-position ,,,) (set-frame-size ,,,)#2019-06-0822:10Daoudai means with short keys#2019-06-0822:11Daoudaactually i have several frame and wanted to resize them according to my needs#2019-06-0822:11Daoudabut don`t know if that is possible#2019-06-0822:11aghttps://www.emacswiki.org/emacs/FrameSize#2019-06-0822:13Daoudathank you very much @ag#2019-06-0822:13Daouda🙂#2019-06-0822:35MitchHi all, does anyone know off the top of their heads if the deprecated figwheel is completely non-functional with current versions of cider?#2019-06-0822:58dpsuttonIt’s fine#2019-06-0822:58dpsuttonAssuming you mean lein figwjeel?#2019-06-0823:00Mitchyeah rather than figwheel main#2019-06-0823:02MitchI'm following a tutorial and there must be something wrong in the project.clj or some incompatibility on my end. I just saw this in the figwheel wiki and thought someone might know something here: "Note: the following instructions don't work for cider 0.18 and was likely working for previous versions. Use with caution." I will look more into it when I have some free time. Thanks!#2019-06-0912:39dotemacsNot sure what you’re doing exactly, but there’s a good chance that your version of nREPL and and nREPL middleware for figwheel don’t match. Start from that. I just had a look and if it’s this section: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl#detailed-and-automated-setup-does-not-work-in-all-versions Then that write up is a bit outdated. The current stable CIDER is 0.21. See: https://github.com/clojure-emacs/cider/releases/tag/v0.21.0 I’d say that you’d definitely want to follow their general advice, but for melpa-stable use this URL instead. When it talks about cider/piggieback, use the latest version 0.4.0. And where it talks about lein-figwheel, make sure that this version matches figwheel-sidecar, which is 0.5.18 right now.#2019-06-1123:03MitchThank you so much! Moving to melpa stable did the trick.#2019-06-0823:02Daoudahey Folks, is there something for auto-import in emacs for clojure project?#2019-06-0823:03Mitchsomething like this? https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-import-to-ns#2019-06-0823:14DaoudaHey it’s me again 🙂, what can i use to navigate between function declaration or usage in clojure project?#2019-06-0823:39didibusYou need to use clj-refactor#2019-06-0823:40didibusIt has a cljr-find-usage command#2019-06-0823:40didibusWhich lists all usage of the symbol at point (under cursor)#2019-06-0823:41didibusAnd to navigate from a usage point to the declaration you can use jump-to-definition#2019-06-0823:45didibusM-. is shortcut for go to definition#2019-06-0823:45didibusIn cider#2019-06-0823:49DaoudaThank you very much#2019-06-0900:01didibusYou should check out: https://docs.cider.mx/cider/usage/cider_mode.html#_key_reference#2019-06-0900:05didibusYou should also have a menu for CIDER, which lists a lot of the options#2019-06-1108:39mpenetis there a built-in way to specify tool.dep alias when doing a jack-in?#2019-06-1108:43mpenetgot my answer: not yet https://github.com/clojure-emacs/cider/issues/2473#2019-06-1109:24solfAnyone remembers the name of the mode that prevents doing stuff when you're not clocked in in an org task?#2019-06-1110:15solfFound it: https://github.com/roman/clocker.el#2019-06-1112:15dpsutton@mpenet use a prefix when jacking in and you can edit the command to be used#2019-06-1112:54dpsuttonhttps://github.com/clojure-emacs/cider/pull/2586#2019-06-1207:27vemvif I have a defn-like thing, how can I make its docstring's content be "indented" like clojure.core's? e.g. after a newline, emacs will jump to column 0 instead of column 2, which is undesirable#2019-06-1207:33didibushttps://cider.readthedocs.io/en/latest/indent_spec/#2019-06-1207:34didibushttps://cider.readthedocs.io/en/latest/configuration/indentation/#2019-06-1207:35vemvThat's not it#2019-06-1207:35vemvRead the q again 🙂#2019-06-1207:42manandearth@U45T93RA6, are you inserting a docstring in a defn before the argument vector and getting column 0 on a new line within the quotes?#2019-06-1207:44vemvyes, that's it#2019-06-1207:44manandearthcan't reproduce on emacs 26.2 cider 0.22.0#2019-06-1207:46vemvnote it's for a custom defn (hence the my/ prefix)#2019-06-1207:47didibusYa. I think you have to specify :style/indent :defn or something like that#2019-06-1207:47didibusOn the custom defn#2019-06-1207:48didibusTo tell Cider to indent the macro as if it were defn#2019-06-1207:48vemvalready done... overall form indentation is OK, but docstring content is not#2019-06-1207:50didibusHum, so it helped for the rest, but not doc-string#2019-06-1207:50manandearthyes @U45T93RA6 you are right, it also gives the face a different color#2019-06-1207:51didibusYa, not sure then. Maybe it's not possible to teach Cider that the string is a doc-string, so it just indents it as a normal string#2019-06-1207:56vemvIt appears to boil down to this https://github.com/clojure-emacs/clojure-mode/blob/a9cbe6a37f51da1c37035390d43500b437e8bff2/clojure-mode.el#L539-L546 You can find the code that injects 'font-lock-doc-face below. Gotta study it, it's a bit meaty#2019-06-1211:03bozhidarYeah, just as an FYI - this has nothing to do with CIDER, it’s all clojure-mode. 🙂 CIDER’s metadata affects just the bodies of forms, it doesn’t affect docstrings at all.#2019-06-1222:38didibusOh right. I always forget to distinguish the two hehe#2019-06-1218:21theeternalpulseIn magit, is there a way to filter the list of staged/unstaged items. For example if I'm rebasing I want to filter only those that contain "unmerged" to easily batch checkout a particular revision#2019-06-1220:10agCan you explain it a bit more, I’m confused of what you’re trying to do#2019-06-1313:19theeternalpulseBasically filter the list of items shown in any of the sections (staged, unstaged, etc). So if I type a regex the section will be filtered to that term.#2019-06-1314:10cmackI also don’t fully understand the desired workflow… but I don’t see anything in magit’s keybindings (`C-h m` from status) that suggests filtering or narrowing…Can your workflow be described using command line git?#2019-06-1316:19theeternalpulsethis is for the git status window I mean#2019-06-1316:21theeternalpulseFor example, filtering this list to show only something like plotter#2019-06-1317:11agI guess what you’re asking for is multiple staging areas. AFAIK Magit doesn’t support that.#2019-06-1317:20agIf you want to temporarily, visually filter things out, I guess you can use iEdit to select a word and then use iedit-show/hide-unmatched-lines.#2019-06-1317:22agit’ll look like this: here I’m filtering out everything that contains “WIP” in it#2019-06-1321:04theeternalpulseI was aware of that, For some reason th ecommand is crashing my emacs lol. I'l lsee what's up but hope this is what I wanted#2019-06-1615:53Daoudahey Folks, I am facing an issue. Can get ag to work, getting this error: zsh:1: command not found: ag. I am new on emacs. Help please!#2019-06-1616:00theeternalpulsewhat's the value of your process-environment (use C-h v process-environment?#2019-06-1616:07theeternalpulseso if in your shell you do which ag and hte value isn't in there, then you need to do a setenv with the path that has ag I think#2019-06-1616:07theeternalpulseI use ripgrep but it's in /usr/bin#2019-06-1616:09DaoudaI installed it only from emacs#2019-06-1616:09Daoudais it because of that?#2019-06-1616:09Daoudacause i can’t get it from my shell
which ag
ag not found
#2019-06-1616:15theeternalpulsehmm, if you don't have it on your host you can't use it.#2019-06-1616:16Daoudahahahaha, I’ve installed from brew and it’s working now. Tak you very much @U1CUUKHDL 😄#2019-06-1616:27theeternalpulseYeah, for things like that emacs doesn't do search best, it delegates to a process on the host machine#2019-06-1616:27theeternalpulseI'd keep note of that so that if you migrate to another computer you don't forget it.#2019-06-1718:19DaoudaHey folks, how can i maximize emacs font size when starting it?#2019-06-1721:00theeternalpulse
(set-frame-font "IBMPlexMono 14" nil t)
is what I use
#2019-06-1801:34MitchHey guys, does anyone know of a nice evil config for clj refactor? I'm just trying to set the refactor prefix to a normal state leader sequence#2019-06-1802:39futuro@mitchell_clojure check out spacemacs; that may have what you’re looking for. #2019-06-1811:41practicalli-john@mitchell_clojure r is used as a prefix for the clj-refactor keybinding in Spacemacs, so to open that menu in Evil normal state when in Clojure mode, it’s , r #2019-06-2013:39dpsuttonnot sure i'm liking emacs on osx#2019-06-2015:35practicalli-johnAre you using https://emacsformacosx.com/ or some other installation?#2019-06-2015:37dpsuttonrailway cats and brew#2019-06-2015:37practicalli-johnIts probably all those 😺 's#2019-06-2015:52minimalMust be something up#2019-06-2015:53dpsutton26.2. what are you running?#2019-06-2015:54minimal
GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.2.0, Carbon Version 158 AppKit 1671.2)
 of 2019-04-14
#2019-06-2015:57minimalfrom https://github.com/railwaycat/homebrew-emacsmacport/releases#2019-06-2018:12Lu8.5gb of swap too.. that’s when you know things will get slower 😂#2019-06-2018:29practicalli-johnSounds like a run-away process to me.... When Emacs is using more memory than Chrome, you know there is something very wrong#2019-06-2018:30dpsuttonhaha agreed. need to figure out how to investigate#2019-06-2018:48agYeah, that’s strange indeed. My Emacs with over 300 packages installed, never gets over 500M.#2019-06-2018:49dpsuttoni think its fine on my linux box. not sure why its crazy here#2019-06-2018:51dpsutton#2019-06-2018:54agis it reproducible?#2019-06-2018:55dpsuttonjust by running emacs unfortunately 😞#2019-06-2018:57agmaybe try removing all .elc files and recompiling?#2019-06-2018:58dpsutton#2019-06-2018:58dpsuttonhm. maybe this is nothing?#2019-06-2018:59ag
(directory-files-recursively user-emacs-directory "\\.elc$" t)
(byte-recompile-directory package-user-dir 0 t)
#2019-06-2508:31aptr322emacs -nw#2019-06-2607:09yasushiopen -a /Applications/Emacs.app --args -q --no-site-file#2019-06-2015:34practicalli-johnEven with the full Spacemacs, 27 layouts and a long list of buffers and modes that have been open for a month, Emacs on Ubuntu is a very reasonable 393Mb#2019-06-2104:23theeternalpulseThe only usability issues I've had with emacs on mac, and it's a mac fs thing, is that at a certain point I would get a "too many buffers open" (assuming handles to files open) issue and it wouldn't run any commands whatsoever, I'd have to somehow clear the buffer list to get it to work. I think there was a setting I ran in the console to increase that limit for the filesystem, it was months ago so I forgot what solution I used.#2019-06-2106:39ageh, what… I don’t remember hitting that for a looong time… what launchctl limit maxfiles says on your machine?#2019-06-2123:31theeternalpulsehaha, my zsh remembers that command#2019-06-2123:31theeternalpulsemaxfiles 64000 524288#2019-06-2314:46theeternalpulseI want to make a custom buffer with ccertain text styles for things like selected line, special column formats and stuff. I only know of using properties but I saw there is something with using faces, but not sure how to connect the two. Do I assign a special face to a string somehow and then create a separate face, or do I declare the string with th eproperties inline?#2019-06-2316:13borkdudeI’m re-installing a machine and setting up emacs again (using prelude). Somehow setting the mark with C-space doesn’t work anymore. Any ideas?#2019-06-2316:17borkdudeah I see, my OS is stealing this key combination for setting a different keyboard language 🙂#2019-06-2316:17borkdudesolved#2019-06-2316:51dpsuttonwhat computer did you end up with @borkdude#2019-06-2317:48borkdude@dpsutton I had to end my “research” phase abruptly as my current MBP was recalled due to a battery issue, so just went with a new one#2019-06-2409:09skuroI've the weirdest issue with indentation. Here's what happens when I'm setting an alias to a multiline :keys destructuring (I'm using clojure-align-forms-automatically): https://asciinema.org/a/gsudrvzoiwlZu8em2KjDIRrW7#2019-06-2409:10skurosame happens in every binding form (`let`, defn, etc.)#2019-06-2409:10skurocould not figure out what the hell is happening there, any clue?#2019-06-2410:33vemvI think you are experiencing a variation of https://github.com/clojure-emacs/clojure-mode/issues/525 I'd avoid the newline after three. Instead, I'd place it before :as See how with one option you are placing a newline in an 'arbitrary' place, and with the other not? Same for https://github.com/clojure-emacs/clojure-mode/issues/525 , there should be a newline after 789] From what I know, clojure-mode delegates alignment to Emacs so there's a chance that there will be no other solution#2019-06-2411:16skuroI see#2019-06-2411:17skurothing is, that screencast is more of an example, I have a fairly big map destructuring in my real code that involves about 25 names, meaning the line would become unbearably long without newlines#2019-06-2411:25vemvFrom my side, I haven't experienced this issue unless intentionally trying to reproduce it. And I do align all my hashmaps automatically I think that by following a strict/homogeneous recipe (newlines after k-v pairs, and optionally use homegeneous newlines in values) you'd avoid the issue. If my wording isn't clear I'd be happy to try correcting a big map example 🙂#2019-06-2411:27skuroplease please share a snippet please 😋#2019-06-2411:30vemv
;; homogeneous newlines across k-v pairs: 1 newline after each k-v value (as opposed to having multiple k-v's in the same line)
{:aaa [1 ;; homogeneous newlines in values: 1 newline after each value (as opposed to just 1 newline in an arbitrary position)
       2
       3]
 :b   [1]}
#2019-06-2411:37skuroalright, that might be a viable workaround, although it would be much, much preferable to cluster names arbitrarily (YMMV of course)#2019-06-2411:38skurojust a note: trying out your solution, I've found another workaround#2019-06-2411:39skurobreaking the blob of named keys with a newline at any point stops that behavior#2019-06-2411:40skuroe.g.:
(let [{:keys [one two three
              
              four five six
              seven eight nine] :as woot} big-stuff])
#2019-06-2411:40skurothat blank newline can also be put after the six#2019-06-2411:43vemvyes, but the blankline precludes alignment#2019-06-2411:43vemv(it's intentional behavior)#2019-06-2412:03skuroI figured, yes. but intentional for whom? emacs or clojure-mode?#2019-06-2412:06vemvfull context: https://github.com/clojure-emacs/clojure-mode/issues/481#2019-06-2412:10skuro👍#2019-06-2412:14skurostill fiddling with this 😛#2019-06-2412:15skuroI redefined clojure-align to use (separate . group) instead of the default one#2019-06-2412:15skurowhich seems to behave the way I want#2019-06-2412:16skurobut since my brain seems to not be permeable to most of the concepts around align-region, would you think of any downside of such a change @U45T93RA6?#2019-06-2412:19vemvnot super sure myself either there are a few defcustoms regarding alignment; none of those would suffice?#2019-06-2412:20skurolet me try#2019-06-2412:23skuroyep, customizing clojure-align-separator to be 'group works as expected#2019-06-2412:24vemv✌️#2019-06-2412:25skurothanks!#2019-06-2601:59theeternalpulseWhen I start my emacs every time it uncompresses a bunch of files and this shows up in my messages. It extends the load time of emacs by quite a few seconds:
uncompressing comint.el.gz...done
uncompressing subr.el.gz...done
uncompressing tooltip.el.gz...done
uncompressing syntax.el.gz...done
uncompressing cl-lib.el.gz...done
uncompressing macroexp.el.gz...done
uncompressing eldoc.el.gz...done
uncompressing uniquify.el.gz...done
uncompressing ediff-hook.el.gz...done
uncompressing vc-hooks.el.gz...done
uncompressing float-sup.el.gz...done
uncompressing mwheel.el.gz...done
uncompressing custom.el.gz...done
uncompressing widget.el.gz...done
uncompressing timer.el.gz...done
uncompressing x-win.el.gz...done
uncompressing common-win.el.gz...done
uncompressing frame.el.gz...done
uncompressing mouse.el.gz...done
uncompressing scroll-bar.el.gz...done
uncompressing faces.el.gz...done
#2019-06-2604:32andy.fingerhutBy any chance are you using company mode and semantic mode? I haven't ever used either, but Google found this: https://github.com/company-mode/company-mode/issues/525#2019-06-2604:46theeternalpulseI use company, didn't know what semantic was, going to look through this but looks like it's it.#2019-06-2611:59Daoudahey Folks, please can you tell me how to comment in emacs?#2019-06-2612:20dpsuttonwhat do you mean @quieterkali? There's M-; which is comment-dwim where dwim (do what i mean) will try to comment the current line in whatever comment form your language should use. Not clear if you want to comment clj code, elisp code, or just random code in a buffer#2019-06-2612:21DaoudaI want to comment an expression#2019-06-2612:21Daoudalet say a function#2019-06-2612:22dpsuttonelisp or clojure?#2019-06-2612:22Daoudaclojure#2019-06-2612:22dpsuttonjust type ; then? I'm not sure i'm following. If you want to write a code comment you can just type ; and then your comment after it#2019-06-2612:23dpsutton
(defn foo [x]
  ;; you can just type random comments
  (+ 1 x))
#2019-06-2612:24DaoudaNeed something to comment all the function. the entire form
(defn func []
        (body))
#2019-06-2612:24dpsuttonI don't know what you mean by comment all the function. Do you want to comment it out so that it won't get evaluated? If so highlight the form and hit M-; that i talked about before#2019-06-2612:25Daoudatake off a part of my code#2019-06-2612:26dpsuttonyou could put a #_ reader macro before a form or highlight and hit M-;#2019-06-2612:26Daoudanot make comment, but a way to turn off a piece of code#2019-06-2612:27Daouda#_ did the trick 😄#2019-06-2612:27Daoudathank you very much#2019-06-2612:27dpsuttonabsolutely!#2019-06-2612:43practicalli-john@quieterkali putting your function inside (comment ) or putting the reader comment macro #_ before your function, or any expression in Clojure will tell Clojure not to read that expression and therefore it does not get evaluated when you evaluate the buffer or run the code. Move the cursor (in your source code buffer) to after the closing bracket of the function that is commented and you can manually evaluate that function, even though it is commented (with a recent version of CIDER). I tend to do something like this
#_ 
(swap! app-state assoc {:my-map "another value"})
#2019-06-2612:46practicalli-johnThe #_ doesnt need to be on the same line, but needs to be the characters before the expression#2019-06-2612:47Daoudavery helpful what you said#2019-06-2612:47Daoudaspecially this: The #_ doesnt need to be on the same line, but needs to be the characters before the expression`#2019-06-2612:48Daoudaand how to evaluate comment code 🙂#2019-06-2612:48Daoudathank you very much#2019-06-2613:06jumarNote that when using #_ or comment it must still be a syntactically valid expression so e.g. the following doesn't compile:
#_(reduce + [1 2 3)
#2019-06-2613:15Daoudagood observation, I’ve fallen in this trap 😄#2019-06-2613:18jumarThat doesn't apply to ;-style comments of course#2019-06-2615:04theeternalpulseI also love #_ because you can still manually evaluate the expression with cider at least. A comment will just evaluate to null#2019-06-2615:19yuhanyou can also set the variable clojure-toplevel-inside-comment-form to enable cider-eval-defun inside comment forms#2019-06-2615:21yuhanthe docstring says it's experimental but I haven't encountered problems with it so far 🙂#2019-06-2615:32MattiasWhat’s the difference? Honest question, I’ve always used stock Emacs because I’m lazy.#2019-06-2922:37theeternalpulseHow do I get emacs minor mode bindings to bind in evil mode states. for example when I go to an elisp debugger mode and try to press "n" it picks up evil's "next" for the search. I have to press "Esc" first and press n to get it to respond to the emacs binding.#2019-06-2923:00agsomething like: (evil-define-key 'normal Info-mode-map (kbd "M") #'Info-menu)#2019-06-3003:04theeternalpulseI actually found out that this does it (add-hook 'edebug-setup-hook #'evil-normalize-keymaps)#2019-06-3003:05theeternalpulseFound this interesting emacs package, https://www.youtube.com/watch?v=3EGOwfWok5s&amp;t=#2019-07-0200:10deletedor evil-cleverparens?#2019-07-0204:33theeternalpulseI use evil-cleverparens#2019-07-0204:34theeternalpulseI have a bare-minimum setup as such
(use-package evil-cleverparens
  :ensure t
  :hook ((clojure-mode clojurescript-mode emacs-lisp-mode racket-mode cider-repl) . evil-cleverparens-mode)
  :init
  (setq evil-move-beyond t))
#2019-07-0204:35theeternalpulsehaven't needed uch customizing beyond what it sets up#2019-07-0510:26practicalli-johnI use evil-cleverparens as it feels more like an extension of smartparens rather than something different like lispyville.#2019-07-0201:39jjttjjanyone happen to know if i can make paredit slurp up a whole tagged literal in one go (ago|) #time/dur "pt6h" =>`(ago #time/dur "pt6h")`#2019-07-0312:20hugodI’m happily back to using clojure on a regular basis. I’m working on a large codebase with cider, and evey time I compile, emacs freezes for several seconds. Looking at the nrepl-messages buffer, this seems to be related to changed-namespaces messages that seem huge. Is there anything that I can do to stop emacs from freezing (presumably while parsing these changes)?#2019-07-0314:09cmack@hugod #cider might have more domain knowledge to answer that question. From a higher level, it might help to use the emacs profiler to determine if your theory on parsing is correct#2019-07-0314:33hugodThanks @U0FRWDJT1 - I’ll follow up in #cider#2019-07-0314:30Bobbi TowersI'm wondering how hard it would be to get cider-overlays working in inf-clojure#2019-07-0315:19richiardiandreaThere was an in-progress PR on that if I remember correctly#2019-07-0404:30eccentric JHi there, for some reason the alignment in lisp languages feels off. Multiline expressions are indented by 1 character. For example:
(local initial-state
  {:state :idle
    :menu nil
    :page active
    :really-long-key 'hello-there})
Is that normal\expeced?
#2019-07-0405:06nenadalmhi. it's strange/unexpected: https://github.com/bbatsov/clojure-style-guide#map-keys-alignment#2019-07-0413:51eccentric JOh that style guide is great. Thanks! After playing around it seems specific to fennel-mode which is another lisp language. My solution is to use clojure mode instead.#2019-07-0416:13eccentric JActually I see that behavior on elisp mode too:
(add '(1
        2
        3
        4)
#2019-07-0416:19dpsuttonit works correctly for me
(add '(1
       2
       3
       4))
#2019-07-0416:19dpsuttonwhich is frustrating to hear but i think it means you've got some setting somewhere.#2019-07-0416:22eccentric JOof ok, I had nuked my .spacemacs file earlier but it didn’t fix the issue. I’ll try nuking all of it and doing a fresh install.#2019-07-0416:23dpsuttontry running emacs -Q just to make sure its not your version of emacs
#2019-07-0416:25dpsuttonthen grep for indent in your .spacemacs for possible candidates?#2019-07-0416:39eccentric JI may have been on an older emacs-mac install#2019-07-0416:40eccentric JOnce I removed it and replaced it with the universal Emacs distro it was indenting correctly.#2019-07-0416:45eccentric JThe interesting thing is that clojure-mode indented correctly#2019-07-0417:03dpsuttonclojure mode sets up its own indentation rules that you can modify. Not sure what controls other lisp indentations#2019-07-0417:14eccentric JGood to know. Thanks for the help, it was driving me insane!#2019-07-0416:39eccentric JI may have been on an older emacs-mac install#2019-07-0420:01eccentric JArgh! I was wrong again, it wasn’t due to emacs-mac. However I did try emacs -Q and found that it was indenting correctly. Removing and reinstalling spacemacs.#2019-07-0421:12andy.fingerhutI don't know what other folks do, but for decades I have ingrained emacs C-x C-b, then find the buffer I want, and select it, and do this way more than is healthy for my left hand. Finally, finally, I have seen the light and started binding a single unmodified key to ace-jump-buffer from the ace-jump-mode package. Oh my, how I wish I had done this a long time ago.#2019-07-0421:15eccentric JWhat does that binding give you?#2019-07-0421:44andy.fingerhutI switch between buffers very frequently, and often not because of jumping to the definition of a function where the cursor is. ace-jump-buffer pops up a list of buffer names, each with a key before their name that, if typed, switches to that buffer (long lists of buffers have some with two-key sequences, but they prefer home row keys, and never have modifiers, and I believe most recently used buffers are always near the beginning of the list).#2019-07-0421:44andy.fingerhutBinding ace-jump-buffer to an unmodified single key gives me much less pressing of the control key.#2019-07-0421:46eccentric JOh awesome! Thanks for breaking it down.#2019-07-0606:39felipebarrosWhat key have you chosen to bind ace-jump-buffer to @U0CMVHBL2?#2019-07-0606:50felipebarrosJust found this reading the avy-jump-buffer README and 🤯 https://github.com/waymondo/frog-jump-buffer#2019-07-0616:58andy.fingerhutI would have normally bound it to an easily reachable function key like F1, but since I use Viper mode inside of Emacs, and the 's' key was already used to switch between buffers, I used 's'.#2019-07-0421:13eccentric J@deleted-user I have not tried it, just stumbled upon it about an hour ago though. I’ll give it a shot 🙂 That said I just found the cause! It’s the spacemacs develop branch that is causing this issue for me. The indentation is correct on master. Anyway after a git bisect journey, this is the commit that introduced the issue: https://github.com/syl20bnr/spacemacs/commit/488fc0977f0e88aefab28cfe6ba30966fc4fcdbe#2019-07-0421:18eccentric JThat may be true, but I used git bisect to do a binary search through all the commits between develop and master. The behavior is correct in the commits before it and broken from that commit until the latest develop. However, it may just be my .editorconfig.#2019-07-0421:39eccentric JAha! It was caused by my .editorconfig because of:
[*]
indent_size=2
#2019-07-0606:50felipebarrosJust found this reading the avy-jump-buffer README and 🤯 https://github.com/waymondo/frog-jump-buffer#2019-07-0606:24felipebarrosJust found clojure-align (`C-c SPC`)... I kept struggling to do that using align-regexp. I just went through all my open Clojure buffers and aligned stuff. ❤️#2019-07-0606:28theeternalpulseThere's a way to default it#2019-07-0606:29theeternalpulsewrong var#2019-07-0606:29theeternalpulsethat's for evil lispy, there's one in cider I just forget what it was#2019-07-0606:30felipebarrosclojure-align-form-automatically seems right 🙂#2019-07-0606:31theeternalpulseoh, you're using lispy?#2019-07-0606:31felipebarrosReally cool but may end up creating too much noise on commits if interacting with non-personal projects so for now I'll try do do it by hand 🙂#2019-07-0606:31felipebarrosActually no...#2019-07-0606:31theeternalpulseoh I see it's with clojure-mode.el#2019-07-0606:32theeternalpulseI'm not a fan of the style myself, but yeah, better to opt in manually. Maybe make a function to go thorugh your project files and apply/save#2019-07-0606:35felipebarrosTo me it lightens the reading experience a little bit. Creates some room by making whats happening extra obvious.#2019-07-1201:47Daoudahey Folks 🙂 I want to have a test file out of my clojure project, a file that i will use to try everything. But i want to use my project repl to run snippets code from that file. Is it possible? If yes, how can I do that please?#2019-07-1205:00hkjelsYou can send individual defns or even arbitrary selections to a repl with cider#2019-07-1205:44ag@UEA9PJ9FE you can try M-x cider-connect to the session#2019-07-1207:34practicalli-john@UEA9PJ9FE why not just put your ‘test’ file in the project and require the namespaces of the functions you want to test. Then with the REPL running you can evaluate individual expressions in your ‘test’ file that call functions from the rest of your project. You could even use clojure.test If that doesn’t fit what you are trying to do, then please share more details of what you are trying to do,#2019-07-1302:48DaoudaSorry guys for taking so long to answer you. Actually all your suggestions helped me a lot. Each of them helped me to achieve what I needed 😊#2019-07-1214:45timvisherIs there any function in any of the emacs packages (cider, clojure-mode, clj-refactor, etc.) that will modify the textual form to add defs for all the locals? i.e. if I'm here
(let [a b c d]
  <point>
  …)
I'd get:
(let [a b c d]
  (def a a)
  (def b b)
  …)
or similarly in a defn form
(defn [a b c]
  <point>
  …)
I'd get:
(defn [a b c]
  (def a a)
  (def b b)
  (def c c)
  …)
#2019-07-1215:00practicalli-john@timvisher You should not use a def expression inside another expression. def is used to define a share name throughout the namespace#2019-07-1215:01practicalli-johnThe let function creates local names, so already does what you want, you just need to use destructuring. Destructuring also works for function arguments#2019-07-1215:02practicalli-johnhttps://clojure.org/guides/destructuring#2019-07-1215:22yuhanI imagine this is just for temporary debugging purposes, not actual production code#2019-07-1216:06practicalli-johnUsing def in the wrong scope can also give you incorrect results, throwing off your debugging.#2019-07-1215:24yuhanie. evaluating subexpressions in a let block#2019-07-1215:34timvisher#2019-07-1215:34timvisher🙂#2019-07-1215:35yuhancider has a eval-up-to-point command that's useful for lots of those cases#2019-07-1215:36yuhanotherwise I tend to use the scope-capture library and stick a (sc.api/spy) around the expressions I want to debug#2019-07-1215:37kliphI've had some success using https://cider.readthedocs.io/en/latest/debugging/ lately, but I'm unaware of anything that would transform params into defs#2019-07-1215:40timvisherRight. Was looking for something that wouldn't require an extra dep.#2019-07-1215:41timvisherMakes it easier to transparently apply in prod or across whatever projects.#2019-07-1215:42timvisherAlthough I'm reminded of Hoyte's reasoning behind not using emacs in LOL which was that emacs is a time-suck that encourages you to think about how to use it to write code for you rather than using [Clojure] to write code for you. 😛#2019-07-1215:50dpsutton
(def tapped (atom ()))

(defn tapper [x]
  (swap! tapped #(take 10 (cons x %))))

(defn add-value-tap []
  (add-tap tapper))

(defn remove-value-tap []
  (remove-tap tapper))
i just keep a little rolling buffer of things
#2019-07-1216:06practicalli-johnUsing def in the wrong scope can also give you incorrect results, throwing off your debugging.#2019-07-1216:07practicalli-johncider-eval-defun-at-point is incredibly easy to use and requires no additional libraries or dependencies. You don't need to use the #dbg in your code if you just call that Emacs command on the function you want to debug. Evaluating the function again will switch of the debugging.#2019-07-1216:12dpsutton@timvisher do/can you use the emacs debugger for these? I've got a handy macro for you if so#2019-07-1216:12dpsuttonwhile running the debugger you can invoke this function:
(defun cider-debug-create-local-let (start end)
  "During debugging, grab the locally bound vars and create a let
  binding. Place this let binding in the kill ring for future use."
  (interactive "r")
  (if cider--debug-mode-response
      (nrepl-dbind-response cider--debug-mode-response (locals)
        (let* ((code (buffer-substring-no-properties start end))
               (bindings (apply #'append locals))
               (formatted-bindings (mapconcat 'identity bindings " ")))
          (kill-new (format "(let [%s]\n %s)" formatted-bindings code))
          (message "copied let form to kill ring")))
    (message "No debugging information found.")))
and it captures the locals from the debugger and emits a let binding with the region you've selected
#2019-07-1216:13dpsuttonstep through the debugger, highlight some code and then calling the above does "(let [%s]\n %s)" formatted-bindings code which makes a let form with the locals and the highlighted code into your kill ring#2019-07-1216:14practicalli-john@dpsutton interesting idea, I will have to give that a try. Thanks.#2019-07-1216:42timvisher@dpsutton Haven't ever gotten into the debugger although I've long wanted to. That's another nice thing about the textual change is that it doesn't lean on any of the middleware (not that that's a huge win. I use the middleware pretty freely anyway in prod).#2019-07-1216:43timvisherI occasionally use the tapping technique when I can't control the callers or if I'm just interested in the values over time although I usually can use tools.trace for that and/or prepl.#2019-07-1216:43timvisher(prepl being a theoretical thing. I haven't actually needed it yet.)#2019-07-1216:45timvisherThis is just an old-school LISP workflow which allows you to evaluate forms that refer to locals without editing them. Everything everyone's said so far makes sense it's just not the workflow I'm trying to support. 🙂#2019-07-1303:40yuhanLispy has this concept of "shadow locals" which I think is similar to what you're describing here - evaluate the let binding vector and it automatically injects them as locals in subsequent evals#2019-07-1216:59theeternalpulseDoes using println in a tap fn more efficient than running it in the main application thread?#2019-07-1217:15andy.fingerhutDo you mean, is the tap fn executed on a different thread, and thus the main application thread can go back to doing what it did before calling the tap fn sooner than if the main application thread had called println directly?#2019-07-1217:16andy.fingerhutBecause if the question is: "Does calling println within a tap fn take less CPU resources than calling println from a main application thread?" I am pretty sure the answer is "no, it costs the same called in either place"#2019-07-1217:18theeternalpulseThe first one, sorry for my poor wording, though I think if I elaborated I would have answered my own question lol#2019-07-1217:20andy.fingerhutThe functions tap> and add-tap are documented to behave in a way where tap> does not block, implying it is merely placed on a queue. If there are too many functions processing those objects in the queue, or they are too slow, tap> can drop objects, not placing them in the queue at all.#2019-07-1303:40yuhanLispy has this concept of "shadow locals" which I think is similar to what you're describing here - evaluate the let binding vector and it automatically injects them as locals in subsequent evals#2019-07-1314:42jjttjjI'm trying to get REBL working with Cider. I'm using https://github.com/RickMoynihan/nrebl.middleware with the following :aliases
:aliases
 
 {:rebl
  {:extra-deps
     {org.clojure/clojure         {:mvn/version "1.10.1"}
      org.clojure/core.async      {:mvn/version "0.4.490"}
      com.cognitect/rebl          {:local/root "REBL-0.9.172/REBL-0.9.172.jar"}
      org.openjfx/javafx-fxml     {:mvn/version "11.0.2"}
      org.openjfx/javafx-controls {:mvn/version "11.0.2"}
      org.openjfx/javafx-swing    {:mvn/version "11.0.2"}
      org.openjfx/javafx-base     {:mvn/version "11.0.2"}
      org.openjfx/javafx-web      {:mvn/version "11.0.2"}}
     :main-opts ["-m" "cognitect.rebl"]
   }
  :cider {:extra-deps {org.clojure/clojure {:mvn/version "1.9.0"}}
          :main-opts  ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}

  :nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.4.5"}}}}
But I'm getting
Wrong number of args (5) passed to: cognitect.rebl/-main
#2019-07-1314:54jjttjjor is there another easier way to connect to rebl via emacs? I just want to play with rebl for a bit#2019-07-1315:45vemvFor now (given my usage is unsophisticated) I just (do (require '[cognitect.rebl]) (cognitect.rebl/ui)) in the repl I have a yasnippet for that line#2019-07-1315:57jjttjjThanks! This doesn't seem to "follow" the cider repl in emacs though. The stuff I type in the emacs repl doesn't automatically show up in rebl. Does that work for you? Are you using cider/nrepl or a different repl?#2019-07-1400:37vemv> This doesn't seem to "follow" the cider repl in emacs though. yes sure, that rebl is a bare-bones one w/o CIDER integration whatsoever#2019-07-1402:59Lucas Barbosaanybody having trouble to run package-refresh-contents? I am not able to download content from elpa, receiving this error:
Error retrieving:  "incomprehensible buffer" [2 times]
#2019-07-1403:01Lucas Barbosahttps://elpa.gnu.org was not available earlier, but I can now access the website. Not sure if the problem is on their end or on mine#2019-07-1410:11dmaiocchicider#2019-07-1615:39adamfreyI'm running Emacs in daemon mode with emacs --daemon and then launching new emacs frames with emacsclient -c any time I want a new editor window. Is there a way that I could launch emacsclient in a way that would automatically open the last visited buffer instead of opening the default startup buffer? (Spacemacs landing page, in my case)#2019-07-1615:40dpsuttonif from the command line just emacsclient -c . for current working directory?#2019-07-1616:01adamfreyActually I'm getting closer to what I want with setting this in my emacs config:
(setq initial-buffer-choice '(lambda () (other-buffer (current-buffer) 1)))
#2019-07-1616:02adamfreyI'm a little confused as to which buffer it's choosing in every case, but I'm pretty close now#2019-07-1616:34dmaiocchiI have also daemon setup with eMac works pretty fine#2019-07-1616:38ag@adamfrey if you simply need Spacemacs landing page, why not call it with -e '(spacemacs/home)' ?#2019-07-1616:39adamfreyno, I don't want the Spacemacs page, that's what I get now. I want whatever the last buffer I had focused in a previous Emacs frame#2019-07-1617:10ag@adamfrey emacsclient -c -e '(spacemacs/alternate-buffer)'#2019-07-1710:00DaoudaHey Folks, I am struggling to find out the way to select a form. I need to delete only a form and don`t know how to achieve that in emacs. Any help please?#2019-07-1711:08practicalli-john@quieterkali If you are using smartparens then use the function sp-kill-sexp to kill the balanced expression following point. If point is inside an expression and there is no following expression, kill the topmost enclosing expression.#2019-07-1720:57Daoudasorry @U05254DQM for taking so long to answer your message, actually I am using paredit#2019-07-1803:37practicalli-johnparedit-kill looks like it does what you want from the paredit cheetsheet http://pub.gajendra.net/src/paredit-refcard.pdf. I haven’t used paredit in about 5 years, so can’t confirm, sorry#2019-07-1720:42agVery often I need to convert a single line string to multi-line, I’d use fill-paragraph, but that’s not enough - Clojure (sadly) doesn’t support multi-line strings, so I have to wrap it into (str ,,,). Has anyone already written a function that does that conversion (and back to single line)? e.g.:
(foo "bla-bla-bla ,,,,,,")
becomes:
(foo (str "bla-bla-bla"
           ",,,,"
           ",,,,"))
#2019-07-1720:42agelisp function I mean#2019-07-1720:58andy.fingerhutClojure does support multi-line strings. It doesn't support Python and some other language's feature of a triple-quoted string.#2019-07-1720:59andy.fingerhute.g. most doc strings are multi-line strings.#2019-07-1721:00andy.fingerhutfill-paragraph works on them, with some limitations I haven't quite figured out completely, or tried to change fill-paragraph to improve upon. When writing doc strings, I often put the leading and ending double-quote on lines of their own, which seems to avoid a behavior of fill-paragraph that it will not do anything if there is a double-quote at the beginning and end of the string on one line.#2019-07-1721:27agah, yeah, my bad… what I meant to say that :
(foo "foo bar")
and
(foo "foo
      bar")
won’t eval the same way, but
(foo (str "foo"
           "bar"))
would
#2019-07-1721:29agthat is why very often I have to convert from the first type to the last one#2019-07-1721:32agit shouldn’t be crazy difficult to write an elisp function that does that transform, that’s why I thought maybe someone already wrote one#2019-07-1722:59andy.fingerhutunderstood. makes sense. I haven't.#2019-07-1817:47andy.fingerhutI am using inf-clojure to connect via a socket REPL to a clojure process I started in a terminal outside of Emacs, using the function inf-clojure-connect. Mostly everything works very well.#2019-07-1817:48andy.fingerhutOn occasion, I see an error message like this in the buffer showing the REPL prompts and output:
Syntax error (ClassNotFoundException) compiling at (REPL:5:1).
lumo.repl
#2019-07-1817:50andy.fingerhutI can find no mention of lumo.repl in my project, nor the libraries I am using, except the inf-clojure source code itself does mention lumo.repl in several places, as an option for a type of REPL to connect to. Does anyone know if that might be an issue with inf-clojure that it might do this on its own? Or maybe I'm hitting some key combination without knowing it to trigger it? If it is doing it on its own, one possible correlation is that when I do see it, it seems only to occur when I have started a long-running expression at the REPL within Emacs, and it takes a while before the REPL appears again.#2019-07-1915:51bozhidar@andy.fingerhut Likely the code that detects the REPL type fails somewhere and tries to run some Lumo specific code.#2019-07-1915:52bozhidarMight be a good idea to file a ticket about this. Sadly I’ve had almost no time for inf-clojure in quite a while. There are still many low-hanging fruits there.#2019-07-1915:54andy.fingerhutThanks for the suggestion. Perhaps I will create an issue in case someone thinks of a possible root cause.#2019-07-1915:58bozhidarI’m 90% certain the issue is with of the call sites of https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L309#2019-07-2003:34theeternalpulseI use spacemacs at workv#2019-07-2008:13Daoudahey Folks, Is there a way to detect unused require in emacs?#2019-07-2009:18practicalli-john@quieterkali detecting unused requires is something I would use a linter for. I have clj-kondo continually running via flycheck. If that doesn't work, try joker or Eastwood https://practicalli.github.io/spacemacs/improving-code/linting/#2019-07-2009:21DaoudaI’ve picked clj-kondo and it’s working fine. Thank you very much @jr0cket 😄#2019-07-2009:46borkdudeCurrently working on this new feature: https://twitter.com/borkdude/status/1152516082630103040#2019-07-2013:25dmaiocchias newbie question to emacs/cider/lisp. So I have orignally took the env. setup from cljoure the brave and the true doc. everything works perfectly and so on.#2019-07-2013:27dmaiocchiI have only one problem from time to time with parenthesis, () like i can't delete parenthesis, is this a special config from CIDER or other emacs plugins which works on lisp? My goal would be to be able to delete parenthesis/deal with them as the current conf 😁#2019-07-2013:28bhaganyHi @darioszr I’m unfamiliar with exactly what Brave and True tells you to do, but the thing you’re describing is probably due to an emacs package called either paredit, or smartparens#2019-07-2013:29dmaiocchiah ok thx it might be true. let me check#2019-07-2013:29bhaganyThey’re editing modes specifically for lisps, and they prevent you from having unbalanced parentheses. It’s really nice when you get used to it, but it can be confusing when you’re new#2019-07-2013:29bhaganyI’d encourage you to give them a shot :)#2019-07-2013:30dmaiocchiI'm already using it, but I had no clue that I have beeing using it 😁#2019-07-2013:30dmaiocchiI mean Like months ago I downladed the preparred conf from the brave and true, so I just learned emacs from scratch.. 😁#2019-07-2013:30dmaiocchibut paraedit is a super hint#2019-07-2013:32dmaiocchinow at least I know what I'm using for () , I was thinking that CIDER did it for me 😁 , so I can look at the documenation.. yep, Initially it was kind pita to deal with ().. I find my way , but I'm missing other keyboard shortcuts imho.. thx! 😁 clojure-berlin#2019-07-2013:32bhaganyEnjoy!#2019-07-2018:11dmaiocchibtw, I disabled paradit. :face_palm: 🤓 🤪#2019-07-2018:12dmaiocchiI have interpreted the fact that in this page(referenced in many pages) https://www.emacswiki.org/emacs/PareditCheatsheet, the cheatsheet isn't there#2019-07-2018:13dmaiocchiso I interpret the fact that isn't there, it was a sign from an obscure AI which govern the world sent to me to say stop using paraedit.. I have tried it use it, but deleting paranthesis etc, was really pita more then any advantages... 😁#2019-07-2018:14dmaiocchithx anyways#2019-07-2019:34practicalli-john@darioszr BraveClojure Emacs setup is very outdated. Take a look at the excellent http://docs.cider.mx website. You will benefit from using a tool like paredit or the newer smartparens package to ensure your parentheses stay balance and donstructural editing. A missing paren will break your code. All the Clojure developers I know use some package to manage their parens#2019-07-2019:42dmaiocchithx! I will have look#2019-07-2019:42andy.fingerhutI get by with only a mode that highlights the parent/bracket/curly-brace that matches the one my cursor is on, and a keystroke to move the cursor there, but I know lots of folks really appreciate more support than that.#2019-07-2019:43andy.fingerhutoh, and auto-indenting of clojure-mode#2019-07-2020:54andy.fingerhutemacs + evil + doom. Doesn't sound ominous at all 🙂#2019-07-2022:13theeternalpulsehttps://gitlab.com/jjzmajic/hercules.el When open source competes 🙂#2019-07-2313:03tianshuwhen developing both clojure and clojurescript(they are in the same project), I'd like to open two frames. I want one frame only see clojure files(by specify file extends or directory maybe), another frame only see clojurescript files. how to do this?#2019-07-2313:17tianshualso cider will send experssion to the last repl buffer instead of to finding the buffer by langage(lj/cljs), can I change this behavior?#2019-07-2418:04yuhanAny interest in having distinct font-lock faces for the following? - regular ;; comments - #_ discard forms - (comment...) blocks#2019-07-2418:05yuhanI made some tweaks to clojure-mode locally, here's what it looks like:#2019-07-2418:05yuhan#2019-07-2514:41theeternalpulseThis is great.#2019-07-2418:07tianshuI think that #_#_#_#_ is great#2019-07-2418:07tianshuthat should be default in clojure-mode.#2019-07-2418:07yuhanyup, planning to PR that soon#2019-07-2418:08tianshuI mean, that should be merged into clojure-mode.#2019-07-2418:08yuhanthat's what I meant, I'm going to open a PR to the main clojure-mode repo#2019-07-2418:09yuhanit's just that those changes to the #_#_ behaviour are a little mixed in with the rest of the styling changes, so I wondered if that could be done at the same time#2019-07-2418:24agholy shit! That’s just amazing. Can’t wait for the PR @qythium#2019-07-2418:58bozhidar@qythium That looks pretty cool indeed! Looking forward to seeing the implementation.#2019-07-2418:59bozhidarI’ve always been on the face as to whether comment needs special font-locking, as technically it’s a regular form that returns nil, but we have some special handling for it even today.#2019-07-2420:22dmaiocchicider cider#2019-07-2501:53yuhanYeah, I thought the current implementation didn't make sense, with a variable clojure-comment-regexp treating #_ and comment in the same manner#2019-07-2501:55yuhanTo me at least they're semantically very different, I often have "rich comment forms" that extend longer than a page height and it can be easy to lose track of whether some point in the buffer is within a comment.#2019-07-2501:59yuhanWith the line-prefix font locking in the picture it makes it so much clearer at a glance! I've been using it for a few weeks now and it very quickly became an indenspensable feature#2019-07-2501:59yuhan.. though I realise this might just be a personal preference, which is why I'm asking around first 🙂#2019-07-2506:02bozhidar> Yeah, I thought the current implementation didn’t make sense, with a variable clojure-comment-regexp treating #_ and comment in the same manner#2019-07-2506:03bozhidarI think it was just the easiest thing to do. For a while there wasn’t any special support for #_ and comment, but a lot of people insisted on such being added and I obliged.#2019-07-2506:04bozhidarI do agree that they are very different and I definitely think they can be handled better (especially #_ which now doesn’t support the stacked version of itself).#2019-07-2815:33eccentric JI’m working in a different lisp language called fennel. I’ve started a fennel repl from an inferior shell, is there a way to send forms to it?#2019-07-2902:39tianshuHow can I group the buffers by which frame is used when open it. cause when deal with both frontend and backend code, some buffer may have very similar name, like utils.clj/utils.cljs. I want use two frame for frontend/backound. I checked the perspective, but looks like it did not do this kind work, when I switching buffer it will still list all the buffers. I know there's is a way to do this is using two emacs instances, but I prefer a single instance way, because I have emacs daemon running in the backgronud.#2019-07-2904:23jumarI use "perspectives" for this. Why they don't meet your expectations?#2019-07-2904:23jumar(using spacemacs)#2019-07-3112:43tianshusorry for reply so late. I want a more strict isolation. The reason why I want this is when switching buffers, there are so many similar names.#2019-07-3112:43tianshuI don't want see the buffer in other workspaces.#2019-07-3115:16jumarYou don't see buffers in other layouts/perspectives. If you are talking about workspaces that's another thing#2019-07-3115:33jumarAt least that's how it works in spacemacs when you press SPC l b or SPC b b#2019-07-2906:54bozhidar> I’m working in a different lisp language called fennel. I’ve started a fennel repl from an inferior shell, is there a way to send forms to it? You can tweak the inferior-lisp defaults and that should work. I also know that Fennel has a proper nREPL server that you can use with monroe (unfortunately CIDER’s nREPL client hardcodes some Clojure assumptions).#2019-07-2914:49eccentric JAwesome! Thanks.#2019-07-2906:54bozhidar@jayzawrotny ^^#2019-07-3017:11theeternalpulseDoes anyone use multiple eyebrowse layouts with projectile. How do you manage keeping buffers focused in a specific layout to a project. I find that sometimes I just happen to accidentally switching to a buffer outside of the intended layout's project buffers. I started working on a layer that jails projects to specific layouts, but wondered if there's a package somewhere out there.#2019-07-3017:22agyou ever tried persp-mode ?#2019-07-3017:38theeternalpulseI've never had luck with that, adding buffers individually seems tedious. I can have an eyebrowse layout, use projectile to switch to project, and then from there use projectile find file to navigate to files. It's just when I switch between project and do something like previous buffer, that then takes me to a buffer that isn't even in the intendend project. This is mainly because none of these libraries are aware of each other. I was working on a multi-layout manager that you could associate projects with each layout, but then the hard part was gluing the two concepts together. I'd probably have to override buffer navigation commands to only navigate within the current project buffer, which I stopped at.#2019-07-3017:41agyou don’t use Spacemacs, do you?#2019-07-3017:42agreason I’m asking, because I think in Spacemacs they did pretty good integration with both: persp and eyebrowse#2019-07-3017:43agI use persp (they call them Layouts in Spacemacs) to separate projects from each other, and eyebrowse (they call them workspaces) to have separate contexts of windows within a single project, e.g: set of windows for writing code, and another set of windows for running tests#2019-07-3112:48tianshuI'm facing the similar problem, I'm not using spacemacs. Can persp change the buffer list?#2019-07-3118:11agI think that’s what literally persp.el is for#2019-08-0104:41theeternalpulseI'll look deeper into persp and see what it offers. I use spacemacs at work and a personal config for perosnal stuff. I've found more problems with the spacemacs implementation over time but haven't dug very deep as I am going to transition to my personal config for work.#2019-08-0104:43agyou may want to use this: https://github.com/plexus/chemacs so you can keep two different profiles, your own and spacemacs. I never had a chance to play with that thing, but it looks cool. also you may want to consider to try Spacemacs-base, and grow your config around it, instead of wasting time trying to build your own config from scratch#2019-08-0115:53theeternalpulseOh my personal build is pretty solid, it's been months in the making lol. I only need to add some stuff for Javascript for work. But I plan on moving off spacemacs and scuttling pieces as needed which I did for a lot of my current custom config#2019-08-0221:46fabraowhat is that rainbow cat in status bar of emacs?#2019-08-0221:47fabraoThat cat#2019-08-0222:39fabraoOh, a scroller lol#2019-08-0509:11tianshuIs there a tool can help me find typos when developing clojure in emacs? especially for typo :keyword.#2019-08-0509:25bozhidar@doglooksgood This approach might work https://metaredux.com/posts/2019/05/24/eradicate-typos-in-source-code.html#2019-08-0509:25bozhidar(if integrated with flycheck mode, that is)#2019-08-0509:31tianshu@bozhidar thanks!#2019-08-0511:02dmaiocchiSeem cool thing#2019-08-0511:02dmaiocchiI might use it also 😁 I am a senior typos developer#2019-08-0513:36tianshuLooks like misspell does a good job for english words. But in my case, there are a lot variables that is not english. I hope something find the similar words those has posibility for one of them is typo. e.g. params and parmas#2019-08-0513:49vemvare you genuinely aiming to tackle typos? i.e. literally the generalised problem of typos, be it in docstrings, variable names, etc rather, you might want a two-faced solution which really isn't typo-centric: - using clojure.spec to catch bad arguments - using a specific keyword linter for ensuring consistency between the corpus of keywords within your codebase#2019-08-0514:12tianshuyeah, I think spec is good for this, but the typo problem can come at any moment.#2019-08-0518:33andy.fingerhutIt is called keyword-typos: https://github.com/jonase/eastwood#keyword-typos#2019-08-0518:34andy.fingerhutIt is disabled by default because on several Clojure projects I have run it on, it can be fairly noisy, for code written apparently as the author intended it, e.g. some Clojure authors intentionally use keywords that are similar to each other.#2019-08-0513:50vemvwith this approach, you trim down the problem domain and can forget about English language intricacies, an approach which seems bound to give false positives/negatives.#2019-08-0514:12bozhidar@vemv Often people just repeat the same typo all over the code. clojure.spec won’t help you with that. 🙂#2019-08-0514:15vemv@ both: yeah, I can see how people may genuinely care about typos#2019-08-0516:25tianshuI do not do copy/paste so much in order to find typos. But how I find it is running into some error. compiler won't tell you the keyword is wrong and keyword is so widely used in Clojure.#2019-08-0517:16alexeizanybody has a good example of how to setup emacs/cider/shadow-cljs properly? I'm not able to get repl working in emacs#2019-08-0611:26vemvhave you considering going with a starter/defaults kit for a while? e.g. https://github.com/bbatsov/prelude later you can discard it, the point is to get you up and running#2019-08-1110:30dmaiocchidoes anyone use emacs org here? I'm starting to learning it and find it really beautiful. I was interested if we have some user, what is their workflow usage for project in private and opensource and professional life#2019-08-1110:32dmaiocchiif anyone can share it somehow would be great !#2019-08-1122:04practicalli-johnI use org for my todo list, developer journal and project readme files (.org is supported by GitHub). Have also used org for presentations via org-reveal. Would like to do more literate programming with org. Maybe one day I will also use org-agenda to organise myself#2019-08-1208:59dmaiocchithx !#2019-08-1208:59dmaiocchiI think as next step with emacs, I want to read emails with emacs#2019-08-1208:59dmaiocchiI know a friend of mine does it alrady professionally with it without any problem#2019-08-1208:59dmaiocchiand I was also asking me if i could surf/navigating the web with emacs#2019-08-1209:00dmaiocchilike use emacs a minimal web-browser, i have tried lynx in past etc but didn't work well#2019-08-1211:40practicalli-johnI use the Google empire for my email as I don't want to manage email myself. There is no value for me. My use of email is mostly done on my phone these days, its just a distraction on my computer (along with twitter, slack, etc. 🙂 ) In fact I am going to turn slack off and get some work done 🙂#2019-08-1215:18dmaiocchiI tremendously agree with that#2019-08-1215:22dmaiocchiIt is indeed a good approach, perhaps having a dev machine with only Brower and nothing else a and a communication machine in different location cans also help#2019-08-1213:01mpinganyone using sayid with emacs? shortcuts dont quite work for me#2019-08-1213:04bpiel@mping I am. Possibly no one else though. Not sure#2019-08-1213:04bpielwhat's the problem?#2019-08-1213:04mping@bpiel do you have extra config? only shortcut that works is C-c s#2019-08-1213:05mpingI cant get the other ones to work, C-c s t ...#2019-08-1213:05mpingmaybe I dont quite understand how to use it#2019-08-1213:06bpielmaybe it's conflicting with something else in your config? C-c s isn't meant to do anything. It's the beginning of every sayid shortcut though#2019-08-1213:07bpielfor example, does C-c s s pop up a new buffer?#2019-08-1213:08bpielIt should pop up a new buffer with contents like this:
Traced namespaces:


Traced functions:
#2019-08-1213:08bpiel(assuming you haven't traced anything yet)#2019-08-1214:20mping@bpiel I see, but C-c s immediately opens a pane with the help, so I can't event continue the shortcuts (ie, cant type the second s)#2019-08-1214:21dpsuttonwhat is bound to C-c s. running C-h c and then C-c s will tell you what binding is there#2019-08-1214:22mping@dpsutton it says sayid-show-help#2019-08-1214:25mpingthere's probably some prefix missing#2019-08-1214:39bpielWeird. Normally you need to press C-s h to get sayid-show-help @mping Actually, I do have this in my init.el
(eval-after-load 'clojure-mode
  '(sayid-setup-package))
#2019-08-1214:39bpielThat's the only config I have for sayid though#2019-08-1214:41mpingsame here @bpiel#2019-08-1214:42mpingI'll try with a clean emacs#2019-08-1214:42bpielok. good idea#2019-08-1214:42bpielbecause I haven't heard of this issue before#2019-08-1312:20robertkrahnDunno if this if of interest, I just post it... 🙂 A visualizer for org-mode time tracking data: https://robert.kra.hn/posts/2019-08-13_org_analyzer.html Written in Clojure(Script) and uses the powerful java.time APIs.#2019-08-1615:11dmaiocchiI never did much with emacs-lisp before, time to fix the problem 🙂#2019-08-1615:12dmaiocchianyone knows a good site documentation for just reading about emacs-lisp? please don't say to me ltgoogle for you. If I'm asking here is for human experiences, if you know a site where you just read it about it. otherwise I will just search in the web 😁#2019-08-1615:20codeasone@darioszr http://nic.ferrier.me.uk/blog/2012_07/tips-and-tricks-for-emacslisp#2019-08-1616:00dmaiocchinob question in emacs: i have installed mu and mu4e. I have find out that the pkg emacs is installed here /usr/share/emacs/site-lisp/mu4e on Linux.#2019-08-1616:01dmaiocchihow can I see from where Emacs load the pkgs dirs?#2019-08-1616:01dmaiocchiI'm asking that because when I do m-x mu4e I can't find the pkg#2019-08-1616:08dmaiocchiok i solved with
(add-to-list 'load-path "/usr/share/emacs/site-lisp/")
(load "mu4e")
in my init.el. I didn't find out a cmd yet for listing my dirs of pkgs
#2019-08-1616:40dpsuttonYou should be able to just require it not load it and add it to your kid path#2019-08-1616:40dmaiocchiok thx @dpsutton I will try to require it#2019-08-1713:17bartukathe package was merged to MELPA yesterday! https://github.com/wandersoncferreira/ivy-clojuredocs it's a helper to search ClojureDocs website from emacs o/ hope its useful to some people#2019-08-1713:18bartukaany request for improvements are welcome#2019-08-1805:55bozhidar@iagwanderson Why is this coupled to ivy at all? I would have just added the ivy front-end as something optional.#2019-08-1814:43bartukaI choose ivy only because I happen to use it on my daily config. No special reasons, but as far the implementation goes, the ivy-specific portion is only 1 function to displays the options and captures the users input. I might work on that to turn it optional#2019-08-1818:11David PhamWhat are the odds we have the same debugger ability in cljs as in clj?#2019-08-1818:11David Phamwith Cider?#2019-08-1905:45bozhidar@neo2551 See https://github.com/clojure-emacs/cider/issues/1416#2019-08-1905:46David PhamNot rocket science for you :) but probably for me haha#2019-08-1905:45bozhidarIt’s not rocket science, but we need someone to do it. It’s quite unlikely I’ll get to do this in the foreseeable future.#2019-08-2219:29Quest(reposting after adding @zulip-mirror-bot): How do I popout a buffer into a separate floating window on Emacs OSX?#2019-08-2219:31cmackdepending on the definition of “popout,” Cmd-n works for many osx emacsen but C-x 5 2 works for default emacs across platforms#2019-08-2219:36QuestI confirm both of those working on OSX. Glad to finally know this after accidentally hitting it so many times... thanks!#2019-08-2219:37Quest(& for posterity, the command for this is M-x make-frame-command)#2019-08-2223:24ag> after accidentally hitting it so many times When you do something accidentally, immediately press C-h l#2019-08-2309:37practicalli-johnThats cool. It looks the same output as the command-log. Maybe that is where command-log gets the info from 🙂#2019-08-2309:37practicalli-johnThats cool. It looks the same output as the command-log. Maybe that is where command-log gets the info from 🙂#2019-08-2300:34andy.fingerhutAnd then C-h k followed by the key sequence to learn what the key sequence does.#2019-08-2317:08agrelated: https://twitter.com/iLemming/status/1164946359935356928#2019-08-2317:26ag@andy.fingerhut meaning that you may want to rebind C-h k to helpful-key#2019-08-2411:15Lone Rangergrr... learning emacs, I'm spoiled by Cursive cleaning up after me in my code (lining up keys/values in hashmaps, etc... ) how does one do that in emacs land?#2019-08-2413:48vemv(setq clojure-align-forms-automatically t)#2019-08-2417:11Lone RangerYay!#2019-08-2810:44chrisblomalso try aggresive-indent-mode#2019-08-2810:45chrisblomit reformats while you edit#2019-08-2816:45Lone Rangerthis works great, thank you!#2019-08-2411:16Lone RangerI followed this and it's indenting properly but not formatting properly#2019-08-2411:16Lone Rangerhttps://stackoverflow.com/questions/11423566/how-do-i-intelligently-re-indent-clojure-in-emacs#2019-08-2414:51bozhidarWell, that’s some ancient discussion.#2019-08-2414:51bozhidarGenerally it’s best to refer to the official docs for CIDER and clojure-mode.#2019-08-2414:52bozhidarhttps://docs.cider.mx/cider/config/indentation.html#2019-08-2414:53bozhidarThere’s also integration with cljfmt if that’s what you need, although most of the time indent-buffer is all you need.#2019-08-2423:27theeternalpulsewhat's a good library to use to do custom refactorings. Say I wanted to create shell tests based on functions I create, or move inline deftests to the appropriate file/namespace?#2019-08-2511:12Lone Rangerclj-refactor is pretty powerful if you're doing Clojure, but if you're doing a lot of cljs like me it's not as helpful 😕#2019-08-2511:11Lone Ranger^👍#2019-08-2515:25st3fanwhat is the proper way in clojure-mode to change a [1 2 3] to a #{1 2 3}? I’ve been switvhing to text-mode to be able to actually change the brackets, which is … not ideal 🙂#2019-08-2515:28bhaganyI think this is probably due to paredit or smartparens depending on which you have installed, rather than clojure-mode itself#2019-08-2515:29bhaganyif paredit, I can give you the steps I take, and I'd be happy if anyone had something better --#2019-08-2515:30st3fanoh it seems clojure-mode uses smartparens - i should google that first before asking#2019-08-2515:31bhaganyit's not quite like that -- there's probably a hook in your configuration somewhere that turns on smartparens when clojure-mode is enabled#2019-08-2515:31bhaganyanyway, here are my steps for paredit. smartparens is probably similar:#2019-08-2515:32bhaganystarting with
[1 2 3]
I put my cursor on the opening bracket and type #, leaving
#[1 2 3]
#2019-08-2515:33bhaganythen, I use paredit-wrap-curly, which I bound to M-{, which leaves me with
#{[1 2 3]}
#2019-08-2515:34bhaganyfrom there, I put my cursor on the 1, and use paredit-splice-sexp-killing-backward, bound to M-up, which leaves me at the desired result
#{1 2 3}
#2019-08-2515:36bhagany(sorry, edited that last one, I always get confused between M-up and M-r)#2019-08-2515:36st3fanthis is great - i think i need to spend a bit of time mapping some of these to keys#2019-08-2515:38st3fanOk now I also see how i can much easier change a string to a keyword with M-r#2019-08-2515:39bhaganyah, that's excellent, I don't think I've done it that way#2019-08-2515:56dpsuttonClojure mode has a cycle collection type. I’m not at a computer but it’s in there#2019-08-2516:00st3fanoh!#2019-08-2516:03dpsuttonC-c C-r # for a set, { for a map, [ for a vector and ( for a list#2019-08-2516:09bhaganyoooooooooooooo#2019-08-2516:10bhaganywell that's much better#2019-08-2516:35David PhamI learn every day :)#2019-08-2517:01dpsuttonI always forget how much nice stuff is in there#2019-08-2517:29Lone Rangertypically what I'll do to solve @st3fan’s issue is ... oh, exactly what @bhagany said#2019-08-2517:30bhaganyI've tried @dpsutton’s suggestion, and it's far superior#2019-08-2517:30dpsuttoni didn't know about M-up so i'm stoked about that one. but in this instance it looks like the clojure-mode refactorings are built to do exactly what is desired here#2019-08-2518:23st3fanI’m still a noob after 20 years of Emacs. Always something new to learn :-)#2019-08-2518:40Lone Rangerokay this is driving me bananas
(s/def ::platform 
  (s/keys 
   :req [:platform/description
         :platform/codeShortName
         :platform/searchTab
         :platform/vendorShortName
         :platform/vendor
         :platform/id]   ))
see that little whitespace at the end? I've tried TAB, clojure-align, C-M-\ ... that whitespace is very persistent
#2019-08-2518:41Lone RangerI've also done (setq clojure-align-forms-automatically t) in init.el.#2019-08-2518:41Lone Rangeranyone have any suggestions for auto-killing the whitespace?#2019-08-2604:43bozhidarProbably cider-format-buffer would kill it.#2019-08-2615:35Lone Rangerthis is AWESOME thank you!!!
#2019-08-2606:42yuhanfixup-whitespace with your cursor around the whitespace should also do it#2019-08-2615:37Lone Rangerthat's what I was using but I was hoping for something even lazier -- like cider-format-buffer 😮#2019-08-2618:30tianshuCan I do something like this? here's a minor mode B and major mode A, I want to bind a buffer local keybinding in B-mode-map on A-mode-hook.#2019-08-2619:54dmaiocchia qustion about swiper, I personally like it. I'm asking myself now How I could do search and replace with swiper#2019-08-2619:55dmaiocchiis there a way for doing with swiper or do you use other construct and use swiper only for searching?#2019-08-2622:05tianshuswiper only for searching#2019-08-2622:06tianshufor query repalce in a single buffer, use anzu or multiple-cursors#2019-08-2623:54agreally? helm-swoop does it, there’s nothing similar for swiper? in helm-swoop - you can press C-c C-e and edit all the occurrences in a single buffer.#2019-08-2707:54dmaiocchiI think perhaps yes It should be possible also in swiper#2019-08-2707:54dmaiocchiIf anyone has pointer feel free to share cider 👍#2019-08-2809:59yendaAnyone else experiencing wrong buffer-repl-type in a shadow-cljs project using spacemacs? It is working fine for my colleague with a vanilla emacs. When we use cider-connect-clojurescript, the buffers of cljs files show not connected for me because the repl buffer is of repl-type clj and doesn't switch to cljs once the cljs.user prompt appears. It does for my colleagues#2019-08-2810:03yendabtw by using cider-set-repl-type manually it works, the cljs file buffers then show connected and C-c C-z switches to repl buffer#2019-08-2810:37yenda*nrepl-messages* are pretty much the same in both#2019-08-2810:42yendaI also noticed that when I call cljr-clean-ns for instance (which doesn't work and fails with unrelated error) the repl-type switches back to clj:
Debugger entered--setting cider-repl-type in buffer *cider-repl ~/my-project:localhost:33673(cljs:shadow)* to clj: 
  debug--implement-debug-watch(cider-repl-type clj set #<buffer *cider-repl ~/my-project:localhost:33673(cljs:shadow)*>)
  cider-set-repl-type("clj")
  cider-repl--state-handler((dict "changed-namespaces" (dict) "id" "18" "repl-type" "clj" "session" "df02492d-a0c7-4553-b463-c45237d0c7c1" "status" ("state")))
  run-hook-with-args(cider-repl--state-handler (dict "changed-namespaces" (dict) "id" "18" "repl-type" "clj" "session" "df02492d-a0c7-4553-b463-c45237d0c7c1" "status" ("state")))
  nrepl-client-filter(#<process nrepl-connection> "d2:id2:182:ns17:app.camera.screen13:printed-valuei1e7:session36:df02492d-a0c7-4553-b463-c45237d0c7c15:value17:app.camera.screened2:id2:182:ns17:app.camera.screen13:printed-valuei1e7:session36:df02492d-a0c7-4553-b463-c45237d0c7c15:value17:app.camera.screened2:id2:187:session36:df02492d-a0c7-4553-b463-c45237d0c7c16:statusl4:doneeed18:changed-namespacesde2:id2:189:repl-type3:clj7:session36:df02492d-a0c7-4553-b463-c45237d0c7c16:statusl5:stateee")
#2019-08-2819:30bozhidar@yenda See the convo in #cider.#2019-08-2819:31bozhidarSeems like a regression in shadow-cljs, but we’re not sure what caused it.#2019-08-2900:43Lone Rangeranyone have a decent CSS workflow? Just trying to get some basic stuff going like looking up documentation#2019-08-2900:48Lone Rangerah okay, css-lookup-symbol. apropros is quite handy...#2019-08-2905:51bozhidarpartywombat#2019-08-2905:58bozhidarSeems there’s not much in that release, though.#2019-08-2905:59bozhidarEmacs 27.1 is where all the action is happening.#2019-08-2906:59tianshu@yenda Yes, I meet the same problem and I'm using vanilla emacs.#2019-08-2908:17yendaLook into #cider channel I found a solution#2019-08-2908:57tianshuon my machine, the clojure-mode is much slower than the emacs-lisp-mode. eventhough cider is not connected#2019-08-2908:57tianshuis there something I can disable to improve the performance?#2019-08-2909:05yuhando you have aggressive-indent enabled? I've found that slows it down a lot in large forms because of clojure-use-backtracking-indent#2019-08-2909:07tianshuno, I don't have that#2019-08-2909:07tianshuI only have clojure-mode, paredit, cider-mode#2019-08-2909:08yuhantry using the profiler to track it down#2019-08-2909:08tianshuIf I hold C-n, in emacs-lisp-mode it's very smooth, but in clojure-mode, it lags after a few lines#2019-08-2909:09yuhanM-x profiler-start, do the laggy thing, profiler-report#2019-08-2909:12tianshu
- command-execute                                                3087  96%
 - call-interactively                                            3085  96%
  - funcall-interactively                                        2535  78%
   - next-line                                                   1582  49%
    - line-move                                                  1579  49%
     - line-move-partial                                         1273  39%
      + default-line-height                                        15   0%
      + window-screen-lines                                         9   0%
        window-inside-pixel-edges                                   1   0%
       line-move-visual                                           143   4%
    + called-interactively-p                                        2   0%
   + execute-extended-command                                     621  19%
   + previous-line                                                323  10%
It's very strange that line-move-partial cost 39%, but after expand this I can't find where the 39% gone
#2019-08-2909:12tianshucould it related to font-lock stuff?#2019-08-2911:12jahsonI recently switched from PragmataPro typeface in Emacs because somehow it was causing slow drawing (?), though I don't found anything in profiler report. The other culprit is often the linum mode.#2019-08-2911:18mpenetif you're on emacs 26+ you can use display-line-numbers-mode instead#2019-08-2911:18mpenetit should be much faster#2019-08-3008:53manandearthThanks for the tip! This really does make a difference.#2019-08-2911:19jahsonI somehow got used to live without the line numbers, since vim. I know how to go to line N and there's almost always a line number in status line.#2019-08-2911:20mpenetSame, but it's a nice to have. I added it to try a few months back and now I quite like it#2019-08-2911:20tianshuinteresting, I'm using consolas font, didn't see changes after switch to another. also, I don't open line number, no modeline#2019-08-2911:23tianshuin emacs-lisp-mode, it's always fast. so I'm thinking about font-lock stuff#2019-08-2911:27tianshuit's easy to feel the differences in my case, just write about 50 lines of (def x 10). then you move up and down, compare to (setq x 10) in emacs-lisp-mode.#2019-08-2911:28yuhanyou could try toggling font-lock-mode off and see how much difference it makes?#2019-08-2911:29yuhannot sure if relevant: https://emacs.stackexchange.com/questions/28736/emacs-pointcursor-movement-lag#2019-08-2911:29tianshuyes, turn off the font-lock-mode make it fast#2019-08-2911:31tianshuwow! (setq auto-window-vscroll nil) this solve the problem for me#2019-08-2911:32tianshumake it much better#2019-08-2911:35tianshu@qythium thank you very much!#2019-08-2911:41yuhanglad i could help 🙂 I wonder why it's turned on by default for you? it isn't on my side, could be a version/distribution thing (emacs-mac 26.2)#2019-08-2911:51tianshuI'm using emacs 26.2 on linux.#2019-08-2911:51tianshuI don't know why it is turned on and what it does.#2019-08-2914:37Lone Rangersuper noob question, how does one invoke this key command? \C-cl#2019-08-2914:45Lone Rangeraha... Ctrl-C then L, got it#2019-08-3007:24tianshuIn clojure-mode, can I have entire qualified keyword(including the namespace part) using the clojure-keyword-face?#2019-08-3009:38bozhidarNo, that’s not configurable.#2019-08-3017:04tianshu@bozhidar okay, thanks.#2019-08-3018:44yuhan(it's Emacs, technically anything is configurable)#2019-08-3018:45yuhanie. search clojure-mode.el for where the face is defined (clojure-font-lock-keywords) and you can patch it however you like#2019-08-3019:04tianshu@qythium Hi, I found the face definition, it is a const, if I redefine that, it seems not work:disappointed:#2019-08-3019:20yuhan
(add-to-list 'clojure-font-lock-keywords
             `(,(concat "\\(:\\{1,2\\}\\)\\(" clojure--sym-regexp "?\\)\\(/\\)\\(" clojure--sym-regexp "\\)")
               (0 'clojure-keyword-face)))
#2019-08-3019:20yuhantry this ^#2019-08-3019:22yuhanwhich reminds me, I should clean up and submit that PR for multiple #_#_ forms I brought up a few weeks ago#2019-08-3019:24yuhanI've made so many changes to my local version of clojure-mode that it's hard to separate out the relevant bits 😅#2019-08-3019:57tianshu@qythium Great! it works, thank you very much!#2019-08-3023:44bozhidarYeah, obviously overrides are always an option, although I never recommend them unless you really know what you’re doing. 🙂#2019-08-3023:46bozhidar(they tend to break when implementation internals change, not to mention that font-locking is dependent on the order in which regexps get matched there and you can get some weird result in certain situations)#2019-08-3108:14tianshuyes, but sometimes you really want something and want it right now.😂#2019-08-3111:08bozhidarFair enough. 🙂#2019-09-0622:22st3fanI settled on Prelude - it seems to have all the things good for Clojure without needing much work from my side#2019-09-0710:05David PhamGood choice :)#2019-09-0723:50ag> without needing much work from my side It’s a trap. No matter where you start, once you get the poison of Emacs into your bloodstream you become allergic to any frustration inflicted by meaningless and repetitive tasks and would become a yak shaving addict, to reduce that frustration.#2019-09-0723:52andy.fingerhutSome yaks can be shaved by writing code in utilities outside of Emacs of course.#2019-09-0803:15kosengan👋👋Beginner here! Help required with emacs setup for 'Brave Clojure'. I'm currently stuck at installing cider. Posted the details about my problem here: https://superuser.com/questions/1480146/not-able-to-install-cider-in-emacs Please help:slightly_smiling_face:#2019-09-0803:17Zac BirHeya, if it’s a recent emacs, I had to add this to the top of my .emacs:#2019-09-0803:18Zac Bir#2019-09-0803:19kosenganwhere should I put this line?#2019-09-0803:21kosenganI don't even see cider in list-packages#2019-09-0803:23Zac BirI can’t imagine you’ll need to explicitly add the elpa packages, but if so: (add-to-list 'package-archives '("elpa" . ""))#2019-09-0803:24Zac BirI put both in my .emacs:#2019-09-0803:24Zac Bir#2019-09-0803:28kosenganwhere should I add the (setq gnutls...) line in .emacs?#2019-09-0803:28kosengananywhere?#2019-09-0803:28Zac BirI put it right at the top#2019-09-0803:29kosenganon top of everything?#2019-09-0803:29Zac BirSure. It’s the first line in my .emacs#2019-09-0803:31kosenganok. trying it out!#2019-09-0803:33kosengannot working:unamused:#2019-09-0803:33kosenganI refreshed the packages and restarted emacs#2019-09-0803:34kosenganIf you don't mind, can we do a little video call, where I can share my screen and we can fix it?#2019-09-0803:34kosenganit will be like 5 minutes#2019-09-0803:37Zac BirSure#2019-09-0803:38kosenganhttps://whereby.com/testroom#2019-09-0803:38kosenganPlease join#2019-09-1212:59Lucas BarbosaThat is fixed in Emacs 26.3, isn't it?#2019-09-1215:40Zac BirPossibly. I’m on 26.2 and needed to do it#2019-09-1518:19Lucas BarbosaI also had that problem. Updated to 26.3 and removed that line from my config file, seems to work!#2019-09-0803:18Zac BirOtherwise, it can’t find the elpa packages, which contains upstream packages that cider relies on.#2019-09-0803:18Zac BirWill answer there as well#2019-09-0803:18kosenganoh!#2019-09-0804:15Zac BirSeems not to have helped much 😕 Might be due to version (you’re using 25.x, I’m on 26.x). Hopefully someone else might be able to shed some light 😞#2019-09-1017:33theeternalpulseI'm wondering if it's midnight mode but sometimes I come to a layout and find that it's on the scratch buffer, I didn't close it manually, it just clears the buffer. If I have multiple windows viewing different buffers those get cleared out as well. It makes it frustrating returning to different workspaces after a while#2019-09-1019:43magnars@thegobinath You might just have to download the package list. Try running M-x package-list-packages, quit out of that (`q`) and try again.#2019-09-1019:43magnarswow, that was some weird business going on. Guess Slack confused me with it historical view. Sorry about the needless ping. Hope you figured it out!#2019-09-1208:31kosenganWill give it a fresh shot at sometime in future. Till then I'm going with nightcode:slightly_smiling_face:#2019-09-1100:14richiardiandreaIs anyone here developing Scala with Emacs by any chance?#2019-09-1100:33bhaganyBy happenstance, yes#2019-09-1100:33bhaganyI can’t say I’m doing it very well#2019-09-1101:20richiardiandreaI am listening though 😀#2019-09-1101:21richiardiandreaFrom what I read ensime is a bit dead, and there is an LSP server now called something with an M 😁#2019-09-1101:48bhaganyI have tried my hand at lsp-mode, and it works kind of? The problem in my case I think is that I’m also using tramp#2019-09-1103:10richiardiandreaOh that definitely adds to the pain#2019-09-1100:38dpsuttonWow. That sounds brave of you:)#2019-09-1101:01bhaganyIt wouldn’t be my first choice, but it’s better than PHP, which is the alternative at my workplace#2019-09-1101:02dpsuttonand you prefer it to using intelliJ?#2019-09-1101:22richiardiandreaI have tried the Emacs lsp plugin for Java and I have to say that it was something...different...#2019-09-1101:46bhaganyI haven’t really tried IntelliJ. Emacs has been sufficient, and in some cases superior because I’m editing remote files and tramp is great#2019-09-1101:47bhaganyAll of my coworkers have to manage two git repositories to make it work with IntelliJ #2019-09-1101:51dpsuttondocker?#2019-09-1101:53dpsutton(i mean, are you ssh'ing into a running docker image or is dev on a separate box)#2019-09-1102:22bhaganyIt’s a vm in google cloud#2019-09-1102:23bhaganyThe whole tool chain is there, and the internal github instance can only be pushed to from there, so you can’t just stop using it#2019-09-1102:24bhaganyI guess you could minimize using it, but it would be a lot of work and you have to be aware of company-wide changes and keep up#2019-09-1903:14gerredhey all, I'd love links to various inf-clojure setups. 🙂#2019-09-1903:14gerredthey're hard to find so I figured I'd just ask directly.#2019-09-1905:39andy.fingerhutI use inf-clojure, but probably in a very very basic way. All I do is bind about 3 or 4 key combos to commands that (a) start inf-clojure and connect to a socket REPL on my local machine on a particular hard-coded TCP port that I use in my projects, (b) another key to send the expression just before the cursor to the REPL and eval it, and (c) I'm not even sure I have a (c), certainly not one I use often enough to remember.#2019-09-1905:42andy.fingerhutAh, I checked my setup and there is one more I sometimes use: (c) a binding to do inf-clojure-set-ns, so that if I am in a buffer for the non-current namespace, editing a function, and I want to redefine it with the new definition in its namespace, I do not have to type (in-ns 'whatever.name.space.cursor.is.in.now), but just the key binding that does inf-clojure-set-ns, which probably somehow parses the ns form near the beginning of the file to figure it out, and send the right (in-ns ...) command and eval it for me. Then eval the function.#2019-09-2017:41nenadalmHi. I am using Cider for development. Is it possible to convince Emacs that directory outside of project is part of it? So that if I switch to the other directory I can still use repl and other features? project layout: project1/src - sources of project1 (uses Leiningen) project2/src - sources of project2 (uses Leiningen) shared/src - shared sources between project1 and project2 (no Leiningen or other dependency tool) I know that in Clojure I can cider-jack-in inside project1, then open file in shared and connect to the repl via cider-connect and that's great. Problem is with ClojureScript though. I use figwheel-main and I am not sure if it's possible to connect to the project1 repl from shared (I can connect to the Clojure repl, but not to the ClojureScript part). So I thought that maybe it's somehow possible to tell Emacs that sources of project1 are inside of project1/src and shared/src. Also that sources of project2 are inside project2/src and shared/src. I thought that maybe projectile could help but it looks like I can just mark any directory as project but cannot include any directories from outside (https://github.com/bbatsov/projectile). I've also tried symlinks but they didn't work either.#2019-09-2018:07nenadalmSo I found that after cider-connect in shared, I can run (figwheel.main.api/cljs-repl "dev") to connect to the cljs (https://figwheel.org/docs/scripting_api.html). Still - if someone knew about better way (not having to run 2 commands, but make it work somehow so that Cider would understand that shared should user repls from project1 and project2), that would be nice.#2019-09-2018:32practicalli-johnthere is a #cider channel which may offer more help#2019-09-2107:09bozhidarThere’s a way to associate this with one project, but not with two, as that would mess up the REPL lookup logic if you eval something in the shared folder. How would you know then which REPL to use? Back in the day there was an option to manually force the REPL to be used for all evaluations, but these days we try to infer all of this automatically based on the mappings that we created between project files and REPL buffers.#2019-09-2108:47nenadalmI assumed that based on https://docs.cider.mx/cider/0.22.0/usage/managing_connections.html#_current_session: > If multiple sessions are linked to a context (say, a project) then the current session is the one containing the most recently viewed REPL. If I had running repl for both projects, the one I viewed the buffer last for would be used in shared folder (and I could switch them by viewing buffer of the other repl).#2019-09-2108:50bozhidarI had forgotten about this. Yeah, then it seems the last REPL you used should determine which session the shared folder would be associated with.#2019-09-2108:51bozhidarI haven’t touched the code there in ages and it’s all starting to get blurry in my head. 🙂#2019-09-2100:15Cam SaulDoes anyone know off the top of their head if there’s an easier way to insert an em dash than C-x 8 RET em dash RET in Emacs? There’s probably another C-x 8-prefixed keyboard shortcut but I can’t seem to find it. I guess apparently you can add your own bindings to that keymap with iso-transl-define-keys but I was wondering if something like that is already there already#2019-09-2420:13Eric Ihlihttps://www.gnu.org/software/emacs/manual/html_node/elisp/Input-to-Processes.html > Some operating systems have limited space for buffered input in a pty. On these systems, Emacs sends an EOF periodically amidst the other characters, to force them through. For most programs, these EOFs do no harm. I have a feeling I’m running into an issue with a comint mode and a process’s input buffer size. I’m sending a really big string to process-send-string and it’s getting truncated in the comint buffer. I see in process.c that the string might be sent in several bunches.
DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string,
       2, 2, 0,
       doc: /* Send PROCESS the contents of STRING as input.
PROCESS may be a process, a buffer, the name of a process or buffer, or
nil, indicating the current buffer's process.
If STRING is larger than the input buffer of the process (the length
of which depends on the process connection type and the operating
system), it is sent in several bunches.  This may happen even for
shorter strings.  Output from processes can arrive in between bunches.

If PROCESS is a non-blocking network process that hasn't been fully
set up yet, this function will block until socket setup has completed.  */)
If I have some elisp code that calls process-send-string with a big string, is there a way for my elisp code to know when the process has received all the bunches? I’m relying on the process having received all of those bunches before I continue. (I think.)
#2019-09-2518:31Eric IhliI dug in a little more and I’m pretty confident now that the input buffer size is actually the issue. I found a workaround but I really still want to get a fix that works regardless of input buffer size. Here’s the details and steps to reproduce. https://github.com/jorgenschaefer/elpy/pull/1671#2019-09-2701:44MitchHi all, I'm not getting syntax highlighting on interop (and likely elsewhere). I've checked the cider and clojure-mode readme's and don't see much beyond the cider-font-lock-dynamically var. Does anyone have any info on how I might track down the cause of the problem? Much appreciated!#2019-09-2705:46bozhidar@mitchell_clojure Can you share some example? There’s no syntax highlighting for interop forms (static or dynamic).#2019-10-0308:47andrea.crottiquite often I want to do a projectile action on another project from the one I'm on#2019-10-0308:48andrea.crottifor example search a string, and at the moment I always have to - switch project with projectile-switch-project - call the desired projectile action#2019-10-0308:49andrea.crottiI wonder if I could merge the two things, I could just redefine other key-strokes merging the switch and the actual action I need#2019-10-0308:49andrea.crottianyone has a better solution though? Anyone else has the same "problem"?#2019-10-0311:10jumarI don't know but for "projects" I use often (meaning leiningen/git projects) I just defined a single projectile project by putting them into a single directory and creating .projectile#2019-10-0312:16mpenetI have a macro that handles a special form inside its body and I would like to have a style/indent for it, can I do that knowing it is not defed anywhere and I would like to avoid to bake it inside my emacs config and make it project wide?#2019-10-0312:18mpenetbasically if I can fake a :style/indent somehow for it that would be perfect#2019-10-0313:54practicalli-john@andrea.crotti do you have layouts installed (its part of Spacemacs by default). You can have a layout for each project and use SPC l to switch between them, or if you have just two projects SPC l TAB will switch between them. Then you can call a project specific action. As @jumar mentioned, I sometimes create a blank .projectile file in the root of all my projects and then I can run searches through them. Then just delete that file when I am done to go back to specific git projects.#2019-10-0420:15mafcocincoRandom newb question (not sure if this is the right place): I'm getting the following error when launching a CLJS project using Shadow-CLJS (both from CIDER and from the CLI): No Clojure project was detected. The refactor-nrepl middleware was not enabled. Got some help from the #shadow-cljs folks and tracked it down (I think) to this line in refactor-nrepl: https://github.com/clojure-emacs/refactor-nrepl/blob/master/src/refactor_nrepl/core.clj#L65. Obviously, looks like Shadow-CLJS is not a supported project type (i.e. shodow-cljs.edn). The thing that confused me is there is an issue (resolved) in the refactor-nrepl issues list referring to Shadow-CLJS (specifically about using strings within the require form) so it appears folks are using shadow with refactor-nrepl. Does refactor-nrepl expect the shadow project file to be named something else or am I missing something?#2019-10-0420:16dpsuttonone thing you could do is put a project.clj file in the project. just leave it empty#2019-10-0420:17dpsuttonand see if shadow works#2019-10-0420:17dpsuttonjust any build file will make it stop complaining and just see what happens#2019-10-0420:17mafcocincotrue true.#2019-10-0420:24mafcocincoBetter way (and the reason that a shadow-cljs issue probably exists) is deps.edn. I'll move to that. Seems like the best path forward.#2019-10-0604:26hendore👋 I’m having trouble interacting with repl after starting a ring server, everything works as expected up until I start the server from the repl by running my -main function. I’m using cider-jack-in to start the repl, could someone please explain how they get around this so they can still keep interactive development whilst working on a running web app?#2019-10-0604:47hendoreFound a join? option I can set to false to prevent the server blocking https://ring-clojure.github.io/ring/ring.adapter.jetty.html is this an ok solution?#2019-10-0610:18bozhidar@matt.henley What goes wrong when you start the web application?#2019-10-0613:03hendoreAfter starting the server from the repl the function never finished executing so I didn’t get control over the repl again, the server was running just fine but blocked any more interactions with the repl. Setting join? to false lets me continue using the repl after starting the server, it now doesn’t hang and allows me to change request handlers without restarting the repl and server :thumbsup:#2019-10-0611:25simonkatz@matt.henley Yes, that’s the right thing to do.#2019-10-0714:29sonnytocan anyone help with this https://groups.google.com/forum/#!topic/clojure/GzgGmV9XJzY#2019-10-0715:24prncthat’s an interesting one… did you manage to solve it? Does your friends terminal emacs work fine locally on his machine? Asking because I guess the the ssh keystrokes /-codes are determined by the ssh client, no?#2019-10-0715:31sonnytohaven't been able to solve it. his bindings work locally but not remotely on my linux box.#2019-10-0717:23andy.fingerhutI have recently often been using a Clojure socket REPL and connecting to that via the Emacs inf-clojure package. One thing that I wished it did is, when using inf-clojure-eval-last-sexp, it would echo the expression being evaluated in the inf-clojure buffer, so when one looked back through the history of REPL interaction, you could see the expressions being evaluated. I did a very basic copy-and-paste of a few functions from the inf-clojure package and comint package to create a function inf-clojure-echo-and-eval-last-exp that you can get here if you are interested: https://github.com/jafingerhut/dotfiles/commit/f3f3052513dd853f3eac91c48d0b4ec4c04785ca#2019-10-0717:50deletedwhat's the "do" macro in elisp?#2019-10-0718:31yuhanhere's a useful translation guide: http://hyperpolyglot.org/lisp#2019-10-0718:31yuhanhere's a useful translation guide: http://hyperpolyglot.org/lisp#2019-10-0817:41tianshuHow can I disable message like "XXX mode enabled" or "XXX mode disabled".#2019-10-0911:09bozhidarI think that’s an Emacs built-in and I’m not sure if it can be disabled.#2019-10-0918:26theeternalpulseI've noticed when I'm using magit/evil, when I move the cursor down to "unstaged" in the status buffer I get long pauses, especialy for annoyingly long diffs like a package-lock.json file. The diff is automatically expanded when I go to the magit status buffer, and even before opening the file, if I move the cursor down to "unstaged" it just pauses for a long time#2019-10-1006:08Suvrat Aptemagit-section-forward is the function that gets called on pressing n (i.e. cursor down in magit). If you want to find out which function is called on a particular key press, you can press: C-h k and then press the key/keys you want to know about.#2019-10-1006:11Suvrat ApteIf you want to see what magit-section-forward is doing, you can put a debugger on it by pressing C-u C-M-x on that function. After that, when you press n in magit status buffer, you will be able to step through in magit-section-forward.#2019-10-1018:15theeternalpulseC-h k with evil only shows evil-next-visual-line#2019-10-1018:16theeternalpulseso I'm guessing magit-section-forward is attached via advice or some other hook#2019-10-1110:19Suvrat ApteMaybe. I’m not very familiar with evil. I use normal Emacs.#2019-10-1117:12theeternalpulseyeah, evil has plugins for other special modes to allow evil motion keys across the board, so not sure how it re-routes the movement keys to the evil commands, or where to even find them#2019-10-1204:40Suvrat ApteAh, I see.#2019-10-0918:27theeternalpulseHow can I find out what magit is even doing when the cursor hits the unstaged changes#2019-10-1222:01tianshu@bozhidar thanks! I finally found a solution by using advice, get the answer from reddit.
(defun user/make-silent (func &rest args)
  (cl-letf (((symbol-function 'message)
             (lambda (&rest args) nil)))
    (apply func args)))
#2019-10-1409:36romainI have a 3 projects within a project, when I open the main project, projectile can search accross all directory, but if I open a file in a sub-project, the root becomes the sub-project. Can I lock it to the main project?#2019-10-1413:02bozhidarIf a recall correctly putting .projectile in the top dir will solve this.#2019-10-1413:18romainthanks, I'll try this 🙂#2019-10-1415:36Lucas BarbosaIs it possible to connect cider to a running cljs repl and evaluate code inline (as with normal Clojure)? I am currently able to connect to the cljs repl and evaluate code at the repl buffer, but I can’t evaluate code while in the cljs files (Eval last sexp). Also, when I try to switch to the repl buffer from the cljs file, I get an error saying something like “no available cljs repl session” #2019-10-1418:18Lucas BarbosaWell, I ended up finding out that I needed cider-nrepl middleware and I have no idea on how to set that up using boot. I just went to shadow-cljs and it worked#2019-10-1507:25bozhidarFYI - the official docs have a section on middleware setup https://docs.cider.mx/cider/basics/middleware_setup.html#2019-10-1610:35CarlaDI having trouble installing 'cider' via package-install in emacs 26.3. Does anyone know of any issues with this? I've followed instructions from the https://melpa.org/#/cider page but cant find 'cider' in the package list (after update-package-contents)...#2019-10-1610:41pwojnowskiWhat is contents of package-archives var?#2019-10-1610:41pwojnowskiMy is:
(("melpa-stable" . "")
 ("gnu" . "")
 ("melpa" . ""))
#2019-10-1611:35CarlaDI've solved it. Thanks!#2019-10-1801:19tianshuhi, how can I get a key string, like "C-c C-c" or "C-M-f" when I iterate the keymap with map-keymap.#2019-10-1801:19tianshuthe function map-keymap will give me a event, can I translate it to string?#2019-10-1812:44jjttjjDoes anyone have an example of using the window-purpose library with cider? All I want is for my repl to always open up in a full height buffer to the right of the clojure file I cider-jack-in from. I've taken a few stabs at this in the past but haven't got anywhere#2019-10-1909:35David PhamHow can I get the project manager on the left of this picture with emacs prelude?#2019-10-1909:35David Phamhttps://raw.githubusercontent.com/hlissner/doom-emacs/screenshots/main.png#2019-10-1909:52Alexander Heldti don’t have a complete answer for you, but i know that is either https://github.com/Alexander-Miller/treemacs or https://github.com/jaypei/emacs-neotree (you can choose in emacs-doom)#2019-10-1909:53Alexander Heldtyou could look at how emacs-doom does it for inspiration: https://github.com/hlissner/doom-emacs/tree/develop/modules/ui/treemacs and https://github.com/hlissner/doom-emacs/tree/develop/modules/ui/neotree#2019-10-1912:03David PhamThanks!#2019-10-1915:56bozhidarI’d suggest using treemacs. Probably we should add some module for it in Prelude. I just don’t use file managers myself, that’s why I never got to doing this myself.#2019-10-1917:10David PhamHaha. What are the policies for contributing to prelude? I created a module for R/ESS but not sure if it production quality :) on an other note, how can you make cider works with Rebl?#2019-10-2004:36bozhidarJust file a PR and I’ll provide you feedback there. The structure of modules in Prelude is pretty basic so contributing is easy.#2019-10-2004:36bozhidarAs for REBL - you need to setup the nrebl middleware to be able to it is.#2019-10-2004:38bozhidarSee https://github.com/RickMoynihan/nrebl.middleware#2019-10-1920:25papachan@neo2551 Its pretty similar with dired-sidebar#2019-10-1920:29papachanoh it seems to be neo tree https://github.com/hlissner/doom-emacs/blob/44eb11c028b9372e6f121639cea538da5b8d23b7/modules/ui/neotree/config.el#2019-10-1923:17agpersonally, I find both neotree and treemacs to be quite cumbersome and “clunky”. I use “direx” - it is simple, clean, easily extendible.#2019-10-2004:43bozhidarThere’s no sidebar in diredx I think. Seems to me you’re using dired-sidebar. 🙂#2019-10-2005:23agwhat’s a sidebar? it’s just another buffer. What I have in the gif is direx. I haven’t even heard about dired-sidebar until this moment. Will try it, thanks!#2019-10-2008:01tianshuLooks like this is popwin + direx?#2019-10-2017:54theeternalpulseis that a mouse moving in emacs I see 😉#2019-10-2018:32agYeah, the mouse is to stop gif recording, it's outside I don't use mouse in Emacs#2019-10-2002:47yuhanDoes anyone have a good workflow for autocompleting file names relative to the project root folder?#2019-10-2002:48yuhanI use company-files but it only suggests paths relative to the current file, which is not how things work in Clojure#2019-10-2003:08vemvmaybe you can research/tweak how company-files determines the "root node"#2019-10-2102:14yuhanYeah I tried for a bit and gave up, just found it strange that there isn't an existing solution for this 😕#2019-10-2102:15yuhangiven that other editors like VS Code have this functionality built in#2019-10-2400:07futuroI use ivy and projectile, and there’s a command to choose a file in the project with ivy. I can copy the path of some file I find this way, and that’s how I’ve accomplished this in the past. #2019-10-2400:07futuroHelm has something similar#2019-10-2400:08futuroI’m not at my laptop atm, but if you look through the ivy docs, you’re looking for one of the minibuffer commands. #2019-10-2002:52yuhaneg. I'm in my-project/src/foo/bar.clj and I want to get to (io/file "resources/images/a489967e.jpg") without opening a file manager or prefixing the file name with some number of ../../ to delete afterwards#2019-10-2005:24aghave you tried find-file-at-point?#2019-10-2008:01tianshuHow can I create a minor mode that will enable in every buffer except the minibuffer?#2019-10-2122:05vaer-kAt the cider repl in emacs, with evil mode on, can I somehow cycle through and run previous commands?#2019-10-2206:00tvirolaiC-<up> / C-<down> are the defaults for this#2019-10-2217:12vaer-kAh, thank you. Mac OS defaults were getting in the way#2019-10-2204:12David PhamI would look at the command associated to M-p and M-n in normal emacs mode and check their in evil mode to get the shortcut#2019-10-2815:39orestisIs clj-kondo supposed to work in combination with Joker, or should I remove Joker entirely?#2019-10-2913:09practicalli-johnI am living a joker free life now and havent missed it. One less binary to install and update. I sometimes run Kibit before I do a commit, but that rarely suggests anything now I use clj-kondo - or maybe I am just getting better at idiomatic Clojure 🙂#2019-10-2815:40borkdude@orestis you can use them both. see the docs of flycheck-clj-kondo#2019-10-2815:40borkdudethey both have the same output format so in theory you could even write a script that concats the output 🙂#2019-10-2815:40orestisI guess I'm just wondering if clj-kondo is a superset of Joker -- would I see two warnings about an unused variable then?#2019-10-2815:41borkdudeyes, sometimes you would see two warnings. to solve that I've made a wrapper script which greps out certain warnings#2019-10-2815:41borkdudeThis is my joker wrapper script:
#!/usr/bin/env bash

## turn off some joker features, so I can test clj-kondo better

/usr/local/bin/joker "
#2019-10-2815:42borkdudeI've placed that in some directory on the path which has priority over /usr/local/bin#2019-10-2815:42orestisAlso anotther Q since I have you here -- can a library vendor supply clj-kondo linting rules? So if a library has a macro that should be linted as defn, is that what :clj-kondo/config in the namespace metadata refers to?#2019-10-2815:44borkdudeI've just answered a question about that here: https://github.com/borkdude/clj-kondo.lsp/issues/2#issuecomment-546999812#2019-10-2815:44borkdudePutting config in .clj-kondo/config.edn is the preferred location#2019-10-2815:44borkdudeoh sorry, misread#2019-10-2815:45borkdudeno, a library can not supply clj-kondo config. that's a nice feature to have for sure#2019-10-2815:45borkdudefor now it's best if the library makes a section in the README about this probably#2019-10-2815:47orestisOK. I remember from somewhere that you would also accept PRs for commonly used macros, is that so?#2019-10-2815:47borkdudeor maybe there should be a central location in the clj-kondo repo that lists all kinds of macros and config that people can opt in to#2019-10-2815:48borkdude@orestis sure, after some agreement on "commonly used" 🙂#2019-10-2815:48orestisHehe that's the crux I guess. But would be nice if a library author could provide some metadata directly in the defmacro that clj-kondo could pick up.#2019-10-2815:49borkdudetechnically that's a bit challenging, since the rule has to be known at the time of use and the order in which these things are linted is not predictable#2019-10-2815:50borkdudeit's probably more robust if the macro author makes a clj-kondo PR with config for his/her macro#2019-10-2815:51borkdudeif it's just config, I'd be happy to support it. if there is custom analyzing needed beyond the config, then we have to make the trade-off if this is worth the time and energy#2019-10-2815:53borkdudemaybe it makes sense to have a third-party.edn config file that people can optionally turn on and where macro authors can supply their PR#2019-10-2815:53orestisFWIW, here's an issue: https://github.com/borkdude/clj-kondo/issues/559 -- but I can't make a compelling argument whether the library is "commonly used", so feel free to just ignore. Thanks for creating this!#2019-10-2815:58borkdudeok thanks#2019-10-2819:26Eric IhliWhat's a good way to jump-to-definition without Cider?#2019-10-2819:29LuDumb-jump?#2019-10-2819:30LuGuesses pretty accurately #2019-10-2819:33Eric IhliLooks like that will work. Thanks!#2019-10-2819:37LuNo prob :)#2019-10-2819:45dpsuttonlsp mode can provider this as well#2019-10-2822:22sogaiu@ericihli fwiw, it's still a bit early, but i've written something that produces a TAGS file that tries to cover one's project as well as its dependencies. using this TAGS file, one can do jump to definition with emacs' built-in xref-find-defiintions (M-.). it uses cl-kondo in the hopes of doing a decent job of static analysis.#2019-10-2907:36Eric IhliIs it published anywhere?#2019-10-2913:53sogaiuyes, hope to post more when i'm not struggling with mobile input :)#2019-10-2907:36bozhidarSounds cool!#2019-10-2907:37bozhidarI want to get CIDER itself to play with the new Emacs xref framework, but it’s probably too early for this, as we still have to support Emacs 25.#2019-10-2914:26sogaiuthe xref stuff does sound interesting -- i got the impression that one can (or will be able to) get more out of it other than jumping to definitions (e.g. renaming?).#2019-10-2914:28sogaiu@ericihli here's are some links: instructions for indexing: https://gist.github.com/sogaiu/6cb947b00ae13d00d4ae16ab7aaf97e4 repository (not much to see there apart from the code atm): https://github.com/sogaiu/alc.index-defs if you try it out, please let me know how it goes. although i've found it useful, it's definitely far from perfect.#2019-10-2915:21sogaiu@bozhidar ah, i didn't know that emacs 25 was where xref got added initially. i guess (eventually?) one is supposed to be able to apply xref stuff to search+replace as well as completion -- sounds pretty nice, though i'm clueless how usable that is atm.#2019-10-2915:57bozhidarWell, the xrefs in Emacs are just a generic framework that everyone has to implement themselves. Dmitry Gutov has been adding a few such frameworks in recent versions, but I haven’t had much time to explore them. Generally like everything new there are many rough edges and opportunities for improvement.#2019-10-2916:05sogaiui guess it can pay to play around a bit but hold off on really working things in -- thanks for the info.#2019-10-3108:51MacrozA question for the emacs gurus, why is it that forward-sexp is different in grep buffer vs. e.g. clojure-mode buffer? Former does not go over question mark in foobar?and latter does.#2019-10-3108:51Macrozit makes using wrgrep buffers and multiple cursors difficult in e.g. Clojure#2019-10-3108:51Macrozhow would one go about and remedy this?#2019-10-3108:53Macrozemacs is telling me both keybinds point to the same forward-sexp function in lisp.el#2019-10-3108:54Macrozmaybe different modes have different implementation of forward-sexp-function?#2019-11-0119:11futuroMight be a different definition of word boundaries?#2019-11-0119:11futuroOr sexp boundaries perhaps?#2019-11-0119:14futuroNvm, I see now that it was answered in channel#2019-10-3109:38bozhidarEach major mode has its own notion of a sexp, that’s defined by its syntax table.#2019-10-3110:24MacrozI see that C-M-<right> is bound to forward-sexp in all the cases, I wonder how it ends up doing a different thing. I can see in clojure-mode.el the function that does a different thing but I can't see where forward-sexp-function is defined to be different#2019-10-3110:27Macrozclojure-mode.el is careful to use the original forward-sexp in its implementation and sets forward-sexp-function as nil. Is that only for safety and the real difference is actually in the syntax table?#2019-10-3110:29MacrozIt's easy to jump to definition of forward-sexp but seems that e.g. xref-find-references doesn't find any. Google and GitHub search were most useful in this. I wonder if there is any "Emacs, please search every module you know for any reference of this"#2019-10-3110:35MacrozThanks @bozhidar for the tip. Much appreciated! I made this small hack for myself
(add-hook 'grep-mode-hook (lambda () (set-syntax-table clojure-mode-syntax-table)))
#2019-10-3110:42bozhidarYou’re welcome!#2019-11-0118:26Eric IhliIs it possible to get autocomplete through a socket repl? I'm connecting to a socket repl with (inf-clojure '(host . port)) because I was tired of fighting with Cider. But now I miss things like autocomplete.#2019-11-0209:09bozhidarCompletion is missing for the socket REPL mostly because you need some completion library for it. CIDER bundles this, but inf-clojure can’t.#2019-11-0209:10bozhidarSome work started in the past to check for compliment and use it if available, but we never finished this. These days all my efforts are focused on CIDER and inf-clojure is kind of stuck. There are plenty of things to improve there, but I simply don’t have time for it.#2019-11-0209:11bozhidarIt’s a pity to hear you’ve been struggling with CIDER - IMO it’s orders of magnitudes better than inf-clojure, but I’m obviously biased. 🙂#2019-11-0209:29bozhidarMy bad - there’s actually support the older clojure-complete library https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L951 I totally forgot about this. This should work out-of-the-box if the repl you’re connecting two was created using lein repl or boot repl.#2019-11-0118:35sogaiu@ericihli it's not perfect but i tend to use M-/ (as well as company, but not sure if company is actually helping). in the future, the indexing thing (TAGS) i mentioned before might be able to be used for completion using xref in emacs. if there is interest, i can investigate getting the TAGS info used for completion. (fwiw, i'm using a custom socket repl)#2019-11-0118:42Eric IhliOh sick. That's my first introduction to dabbrev. I'm seeing there's a helm-dabbrev too but it's giving me "No expansion found" even though dabbrev is finding and cycling through many expansions. This will solve a lot of my problems. Thanks again!#2019-11-0118:46sogaiui went many years without dabbrev -- it was a nice find 🙂 hope things improve for you!#2019-11-0118:48andy.fingerhutYeah, seems like dabbrev in Emacs should somehow be more prominent in the docs, e.g. the start tutorial, but I guess there is so much that is cool about Emacs that you can't put it all in a tutorial.#2019-11-0118:57sogaiui guess that's why there's that weird diagram of the emacs learning curve? 🙂#2019-11-0406:20agI just installed lsp and lsp-ui and have a few questions, hope someone can help me here: - I can’t find a way to change foreground color for lsp-ui-doc frame. When Setting lsp-ui-doc-background face I can change the background, it still doesn’t affect color of the text, for some reason. - with lsp-ui-sideline turned on I see “add-missing-libspec” message, what the heck does this mean?#2019-11-0406:41sogaiuthis is not really an answer to your question, but as far as adding a missing libspect is concerned, may be the following will help shed some light on the meaning of that phrase: https://github.com/clojure-emacs/clj-refactor.el#user-content-clj-refactorel#2019-11-0406:49agah, but here’s the thing - it shows that for everything…#2019-11-0406:53agcould it be because it also shows this: “Warning (lsp-mode): Unable to calculate the languageId for current buffer. Take a look at lsp-language-id-configuration” when I open .clj files?#2019-11-0406:57sogaiusorry, don't think i'll be of any help -- i only just got lsp stuff working with clojure the other day -- total novice here 🙂#2019-11-0407:00agah, that message seems due to improper documentation for clojure-lsp. I fixed that, but I’m still seeing add-missing-libspec ;(#2019-11-0515:02yyoncho@ag - add missing libspec is code action that the server can execute on this position. Apparently, it shows it always, no matter whether the action can be executed or not.#2019-11-0515:03yyonchoAbout the color of the background - I think it comes from markdown-mode.#2019-11-0515:04yyonchoYou could try to click on it and then do M-x describe-face#2019-11-0521:02agit disappears though when I do M-x#2019-11-0520:32fabraoHello ALL, is there any way to open more than one instance of Emacs?#2019-11-0520:33andy.fingerhutDo you mean multiple windows (also called frames in Emacs terminology) for the same Emacs process? C-x 5 f or C-x 5 b with default key bindings can do that.#2019-11-0520:34andy.fingerhutIf you mean a completely separate process, typically invoking 'emacs` from a terminal window on Mac and Linux machines will start a separate emacs process, unless that command has somehow been aliased with additional options, or made an alias for a similar command called 'emacsclient' that creates a new window for an existing emacs process.#2019-11-0520:35andy.fingerhutComparing the buffer lists produced from typing C-x C-b between two windows can help confirm whether they are the same or different emacs processes (same buffer list always if same process, but can differ if different processes)
#2019-11-0521:00sogaiuto add to these good tips, i do C-x 5 2 to get another frame. i also use multiple emacs instances and use the buffer list technique described. although it can be convenient and more robust sometimes, consistency / up-to-dateness of information in things such as recently used files and such can suffer.#2019-11-0600:01fabraoNo Window, open other instance of Emacs, to use with other cider#2019-11-0619:09vemvwhich OS? on Mac, all apps can be open multiple times with the open command (can be googled)#2019-11-0620:17fabraoIt is for Windows#2019-11-0621:45theeternalpulseDoes anyone remember the name of the hydra alternative. I remember seeing it a while back and wanted to try it out, it is hosted on bitbucket#2019-11-0621:48theeternalpulsefound it! https://gitlab.com/jjzmajic/hercules.el#2019-11-0621:49theeternalpulseit was actually gitlab, that's why I couldn't find it in my bitbucket account lol#2019-11-1008:36David PhamAnyone knows if we can do the same with Cider?#2019-11-1008:36David Phamhttps://i.redd.it/sgef9jhbiax31.gif#2019-11-1014:13JcawThere's semantic-stickyfunc, but it only works with function definitions, not the current expression.#2019-11-1014:14Jcawhttps://github.com/tuhdo/semantic-stickyfunc-enhance#2019-11-1014:38JcawIt should be fairly easy to whip something up like this.#2019-11-1014:38Jcaw
(defun my-clojure-get-current-expression ()
  (or (save-excursion
        (ignore-errors
          ;; Find outside of surrounding expression
          (while (and (not (looking-at "(")) (looking-back "'"))
            (unless (sp-backward-up-sexp)
              (error "No enclosing expression")))
          ;; Jump to first symbol
          (forward-symbol 1)
          (symbol-at-point)))
      ""))
#2019-11-1014:39Jcaw^ Just wrote that, it'll get the current expression. (Requires smartparens)#2019-11-1014:42JcawThen all you need to do is put that into the header line, or a popup, etc.#2019-11-1014:45Jcaw(E.g. hook an idle timer to cursor movement in clojure-mode)#2019-11-1015:00JcawOop - forgot smartparens doesn't throw errors. Fixed.#2019-11-1210:46Lutfar Rahman NirjharHi#2019-11-1420:00andrea.crottitiny helper but incredibly useful for me
(require 'dumb-jump)

(defun cider-or-dumb-jump ()
  (interactive)
  (if (cider-connected-p)
      (cider-find-var)
    (dumb-jump-go)))

(add-hook 'clojure-mode-hook
          (lambda ()
            (local-set-key (kbd "M-.") 'cider-or-dumb-jump)))
#2019-11-1420:01andrea.crottiFalls back to the dumb jump library if cider is connecter#2019-11-1420:01andrea.crottiI heard that spacemacs does this by default, I should steal more from them#2019-11-1422:20JcawIt does but honestly their system is pretty dodgy.#2019-11-1422:21JcawIIRC there's a package, smart-jump, that takes this approach for all modes. Might be worth making a PR.#2019-11-1422:21Jcawhttps://github.com/jojojames/smart-jump#2019-11-1422:22JcawIt's integrated already: https://github.com/jojojames/smart-jump/blob/master/smart-jump-clojure-mode.el#L45#2019-11-1420:17sogaiudoes dumb-jump work with one's dependencies?#2019-11-1420:20andrea.crottiWell probably not it just jump around your local code#2019-11-1420:21andrea.crottiIt's not the same as the cider option of course, but useful on big projects you're just browsing when you don't want a repl#2019-11-1420:26dpsuttonlsp can serve the same benefit if you're interested in setting that up#2019-11-1421:23sogaiui've tried lsp, but am not big on the having to run additional servers approach. i didn't have success with dump-jump for working with identifiers in dependencies and wrote something that uses clj-kondo to create TAGS files -- it covers the project as well as the dependencies. it's taking a bit longer than i was hoping in order to handle namespace and alias prefixes, but a friend and i are finding it to be useful.#2019-11-1421:24sogaiuwanted to know though if someone did get dump-jump working, because it would be less work 🙂#2019-11-1421:40andrea.crottiAh nice, can you share some code @sogaiu?#2019-11-1421:53sogaiu@andrea.crotti if you don't mind some rough edges: https://gist.github.com/sogaiu/6cb947b00ae13d00d4ae16ab7aaf97e4 -- if you try it out, i'd be interested in hearing about your experience. working on improving it, but it's a bit slow-going 🙂#2019-11-1421:58sogaiu(on a side note, with the advent of clindex, i wonder whether that couldn't be used to create TAGS/tags)#2019-11-1422:21JcawIIRC there's a package, smart-jump, that takes this approach for all modes. Might be worth making a PR.#2019-11-1422:21Jcawhttps://github.com/jojojames/smart-jump#2019-11-1422:22JcawIt's integrated already: https://github.com/jojojames/smart-jump/blob/master/smart-jump-clojure-mode.el#L45#2019-11-1512:39etiagoMy emacs randomly keeps showing "Mark set" in the minibuffer :thinking_face: anyone got any ideas why this might be? Doesn't seem normal.#2019-11-1512:52yuhantry setting the variable debug-on-message to get a stacktrace when it happens#2019-11-1512:53etiagothanks#2019-11-1723:19sogaiuis there something like mr. anderson for emacs lisp?#2019-11-2008:05chrisblomwhat is a good emacs package to view a directory tree?#2019-11-2008:05chrisblomi've tried neotree, but didn't find it that useful#2019-11-2008:05chrisblomis there one with nice navigation functionality?#2019-11-2009:04mccraigmccraignot a directory tree browser, but for navigation within a project i find helm-projectile-find-file rather quicker than a tree browser#2019-11-2009:05lvguoweiTreemacs?#2019-11-2016:29practicalli-johnRanger is nice and lightweight to run and can preview files too. For a graphical file manager, Treemacs seems to be the latest favourite (replacing neotree). dird is the classic Emacs view of a directory, but doesn’t list nested directories without navigating to a new buffer. You could also open eshell and use the unix CLI command called tree#2019-11-2102:12solfI personally use just the built-in dired with dired-subtree, which allows me to see subtree by pressing tab#2019-11-2102:12solf
(use-package dired-subtree
  :ensure t
  :after dired
  :config
  (bind-key "<tab>" 'dired-subtree-toggle dired-mode-map))
#2019-11-2102:19sogaiuthat's pretty interesting -- the default binding is 'i', but i guess '<tab>' is more intuitive#2019-11-2102:23solfOh yeah, I think i stands for insert, as in it inserts the subtree in the buffer. It makes sense, but every other directory tree uses tab so I went with it 😛#2019-11-2102:24solfI wish I had re-binded other common shortcuts in emacs to their modern standards, back when I first started using it.#2019-11-2102:25solfIt took me a long time to stop mistakenly close browser tabs with C-w#2019-11-2102:57sogaiuusually i have a hard time remembering custom keybindings so i've pretty much stopped for the most part. if all custom keybindings could automatically show up in a menu so i could look them up easily, i might start again.#2019-11-2103:06futurowhich-key might help you @sogaiu #2019-11-2103:08sogaiu@futuro i've used that a bit in doom-emacs happily -- does it somehow have a view of just your custom keybindings?#2019-11-2103:14solf@sogaiu if you want to have a list of only the keybindings you changed, bind-key does that for you, with the caveat that you then need to use it instead of define-key or other built-in ways of changing keybindings.#2019-11-2103:14solfbind-key comes with describe-personal-keybindings (https://github.com/jwiegley/use-package/blob/master/bind-key.el#L92)#2019-11-2103:14sogaiu@dromar56 oh, that's interesting -- going to take a look now 🙂 thanks!#2019-11-2103:25sogaiuoh, use-package, how did i live without you for so long#2019-11-2103:29solfI like bbatsovs personal config, it's very simple and pretty much only uses use-package to provide structure#2019-11-2103:29solfhttps://github.com/bbatsov/emacs.d/blob/master/init.el#2019-11-2103:30sogaiuwill take a look -- thanks!#2019-11-2105:08Questcompletely different take on use-package (and maybe a tangent) -- https://github.com/raxod502/straight.el#2019-11-2105:09QuestI switched to straight.el after a couple years. The switch was straightforward & found it was much better to manage package versions.#2019-11-2105:17sogaiufwiw, from a quick peek, it looks like doom-emacs uses both straight and use-package.#2019-11-2617:07j0nistraight provides a use-package backend so if you set a straight config var it will monkey patch all your use-packages and 99% "just work" with your existing use-package based config#2019-11-2617:07j0niiirc there may be options you need to remove, like :ensure#2019-11-2617:16sogaiuneat -- thanks for the info#2019-11-2619:56sogaiui see some details regarding straight and use-package at: https://github.com/raxod502/straight.el#integration-with-use-package https://github.com/raxod502/straight.el#integration-with-use-package-1#2019-11-2321:39piyerdoes anyone use xah-fly-keys ?#2019-11-2413:47simonkatzTIL that memoize doesn’t memoize when the memoized function returns nil.#2019-11-2415:31andy.fingerhutMight be worth creating an issue for that behavior, if there isn't already one.#2019-11-2416:02yiorgosIs anyone using lipsy? When I am typing and I want to create a function, when I press [ it jumps to the beginning of the expression#2019-11-2421:51simonkatzI will report that memoize issue. Looks like I’m supposed to do that at https://debbugs.gnu.org/ , but that seems to be down.#2019-11-2500:10andy.fingerhutI think http://ask.clojure.org is the recommended place to create questions, which if the maintainers agree is an issue, then gets tracked in a JIRA bug tracker.#2019-11-2500:40sogaiu@nomiskatz this memoize is clojure's and not the following, right? https://github.com/skeeto/emacs-memoize#2019-11-2510:43simonkatzSorry for two counts of confusion about memoize. (1) I mean in Emacs, not Clojure. (2) I mean https://github.com/skeeto/emacs-memoize. (I had assumed this was built in to Emacs, but it’s being brought in as a transitive dependency.) There’s already a PR to fix this.#2019-11-2523:17lambduhhhDoes anyone know of a slack workspace similar to this one for emacs users? I am interested in some sort of real-time chat option like this slack that is more generally focused on emacs and emacs workflow (as I am a beginner). Any insight is appreciated. Thank you#2019-11-2523:43practicalli-john@lorilynjmiller I assume people use the Emacs channels on IRC https://www.emacswiki.org/emacs/EmacsChannel#2019-11-2523:45lambduhhh@jr0cket Thank you!#2019-11-2609:47JcawDoom has a Discord and Spacemacs has a Gitter. Both are pretty active.#2019-11-2609:52JcawThe /r/emacs subreddit is the de-facto social hub for Emacs. Its pretty good but users can be a mixed bag. Some will give you measured advice, some are zealous to a particular approach.#2019-11-2609:57JcawIf you want to see a bunch of different workflows, look at Sacha Chua's Emacs Chats. She interviews a few famous names from the diaspora and they break down how they use Emacs. Steve Purcell is a good one to start with - he's the guy in charge of MELPA. https://pages.sachachua.com/emacs-chats/#2019-11-2614:27Lucas BarbosaHey, with Cursive I am able to know which symbols in a namespace are not being used in the project. The symbols are kind of faded/gray. Is there a way to have that information in Emacs?#2019-11-2614:30dpsuttonlsp can provide this information#2019-11-2614:31Lucas Barbosa~Is there a known way to do it? I'm using Cider but I'm not sure if this is available~ Wait, that seems to be a completely different thing. I'll try it out! Thanks#2019-11-2615:34practicalli-john@lvbarbosa 'clj-kondo' will highlight unused symbols in the namespace as you are typing, includes ns requres too. Just need to install its binary and add flycheck-clj-kondo for Emacs...#2019-11-2615:36practicalli-johnhttps://github.com/borkdude/clj-kondo/blob/master/doc/editor-integration.md#2019-11-2615:45Lucas Barbosa@jr0cket I am using it already, but what I need is unused symbols across the entire project.. something like static analysis.. It seems that lsp is what I need #2019-11-2615:45borkdude@lvbarbosa Do you mean unused vars in the entire project?#2019-11-2615:48borkdude(a symbol is not always a var, that's why I'm asking)#2019-11-2615:51Lucas BarbosaYes! Unused vars. What I am actually doing is: I have a project that depends on an internal lib, but that lib has been deprecated. I am “slurping” into my project the pieces of that library that I need. The process is: I copy the namespace from the deprecated library into my project and delete what I don’t need. In Cursive, I easily know what is not being used, since the editor highlights the vars that are not being used. In emacs I don’t have that ability. It looks like lsp makes that work. What do you think? @borkdude #2019-11-2615:52borkdude@lvbarbosa Clj-kondo can do that too, but it doesn't do it while linting, since the user might not have linted the entire project yet (kind of an open world assumption) But it can be done using the analysis output: https://github.com/borkdude/clj-kondo/tree/master/analysis#unused-vars#2019-11-2615:53borkdudeSo that would not be an in-editor kind of feedback, but data you use for whatever purpose you want#2019-11-2620:26Lucas BarbosaIs there any possibility of getting that into the editor? :thinking_face: I have no idea of how difficult that would be#2019-11-2620:26Lucas BarbosaI love the way Cursive does it.. I am currently using it to perform this sort of task#2019-11-2621:06borkdude@lvbarbosa The reason clj-kondo doesn't do this is that in the editor it lints only one single file at a time and fetches information it needs additionally from the cache. But to know if a var is used in some other namespace, it would have to lint all the other files and/or read the entire cache, which is not good for performance#2019-11-2621:07Lucas BarbosaThat makes sense. Is lsp the "standard" way to perform analysis across a whole project?#2019-11-2621:08borkdudeLSP is just a protocol. clj-kondo has an lsp server too btw, which is used for VSCode. See https://github.com/borkdude/clj-kondo.lsp But in general clj-kondo has no idea about what your project looks like unless you instruct it to, e.g. lint the entire classpath#2019-11-2621:09borkdudeBut IDEs like Cursive do, that's why they grab information using a project file like project.clj and then give you that information#2019-11-2621:09borkdudeyou could say that IDEs are actively doing stuff, while clj-kondo is passively doing stuff, only linting what you tell it to#2019-11-2621:10borkdudeIn theory you could use the analysis information provided by clj-kondo and then write a small flycheck plugin that provides this information#2019-11-2621:10borkdudeor maybe as a cider-nrepl plugin#2019-11-2621:13Lucas BarbosaI see, that makes total sense#2019-11-2621:16borkdudeMaybe you could look at https://github.com/clojure-emacs/squiggly-clojure for some inspiration as well#2019-11-2615:55borkdudeso this would be the script you would write, using clj-kondo as a library: https://github.com/borkdude/clj-kondo/blob/master/analysis/src/clj_kondo/tools/unused_vars.clj#2019-11-2615:57practicalli-johnVery interesting, will have to give this a try too. Thanks.#2019-11-2615:58borkdude@UG1C3AD5Z is working on emacs TAGS generation using this#2019-11-2616:00practicalli-johnAh, TAGS is something else I think I should have but never figured out what it was... I read the ctags docs and it never really said what it was or give examples of use. Maybe I read the wrong docs...#2019-11-2616:00borkdudeSame here 😅#2019-11-2616:01borkdudeI use cider for navigation#2019-11-2616:01practicalli-johnIts good to hear I am not alone ...#2019-11-2616:02practicalli-johnI am always looking for ways to navigate code and projects... got this so far https://practicalli.github.io/spacemacs/navigating-code/#2019-11-2616:07borkdudeI'm doing a lot of rg and C-x f, I'm pretty basic I guess 😉#2019-11-2616:14borkdudeI bet you can write a small cider middleware that invokes clj-kondo and then highlights the relevant symbol? I've never done this kind of thing before though#2019-11-2616:37sogaiuif anyone wants to give it a try, here are some instructions for generating clj-kondo-powered TAGS files (including what to do in emacs to use the results): https://gist.github.com/sogaiu/6cb947b00ae13d00d4ae16ab7aaf97e4#2019-11-2616:57borkdudeThat's interesting! Maybe also relevant for your blog @jr0cket?#2019-11-2617:07practicalli-johnI will have a look, then I may find out what I can do with TAGS 🙂 Thanks.#2019-11-2617:08sogaiu@jr0cket please don't hestitate to provide feedback of any kind 🙂#2019-11-2617:08borkdude I am always looking for ways to navigate code and projectsI think TAGS are relevant tot that!#2019-11-2617:12practicalli-johnI think I'll add this to the advent of parens blog posts I am doing over December, along with Lambda Island...#2019-11-2617:13practicalli-johnthanks for the info, much appreciated.#2019-11-2617:22borkdudemaybe you have enough for three days now 😉#2019-11-2617:40sogaiua couple of related bits: TAGS files are basically just index files -- it turns out that it may be possible to leverage them in emacs for things other than navigation (e.g. completion as well as query-replace) https://github.com/company-mode/company-mode/blob/master/company-etags.el https://github.com/syohex/emacs-ac-etags#2019-11-2615:57practicalli-john@lvbarbosa if you are successful with lsp, I would be very interested to know how you are using it. lsp is a layer in Spacemacs now, so was going to give it a try once I had figured out what I could use it for 🙂#2019-11-2617:51respatialized👋 hello #emacs! I've been thwarted all day by a problem that some of you may have dealt with: getting my cider-launched REPL to fetch my environment variables. I would really like to use aero to load my config. But all my tests fail because the JVM Clojure process CIDER launches doesn't inherit the env vars that I use aero's syntax to fetch. I have (exec-path-from-shell-initialize) in my config. exec-path-from-shell-copy-env works for individual values, but I'd rather not have to enumerate all of them every time I add new ones. The variables are found successfully when I run boot from a regular shell, so I still can run tests, but I would prefer to not have this weird drift between my development environment and other contexts in which my code gets run. Here are some potentially confounding factors: • I'm on spacemacs • I usually run a daemonized emacs (though even fresh instances have this problem) • The daemonized process launches from my i3wm config. Sorry for the long question! I will gladly write up whatever solution is identified for anyone who wants documentation on it.#2019-11-2617:58practicalli-johnAre you using Spacemacs develop or master ? I am assuming Linux as you are using i3wm. Do you have the same issue when running Emacs from a terminal window? It could also be the version of Emacs you are using#2019-11-2618:07respatializedThanks for the quick response! I am on develop. I just launched a fresh CIDER repl from a terminal emacsclient and confirmed the same issue crops up there, but it does not if I launch a separate emacs instance with emacs --no-window-system. Guess I can make do with terminal emacs until I fully identify the source of the problem.#2019-11-2618:13respatializedI'm using emacs 26.3.#2019-11-2618:23respatializedActually, the terminal is less than ideal, as I'd have to restart emacs entirely any time an env var gets added or changed because the shell process it's running in hasn't yet picked up that change.#2019-11-2620:59practicalli-johnMy guess is that what ever shell you are using to run Emacs from does not have the environment variables. Assuming you are using Bash shell on Linux, perhaps your environment variables are in your .bashrc file and not your .profiles file. That seems to tie up with your testing, as emacsclient will use the environment variables from the daemnon process. If you stop the daemon process, you should be able to run emacs command in a terminal to start the graphical Emacs version and pick up the environment variables set in .bashrc (assuming that is the case). If that works then you just need to figure out how to get your daemon process to pick up environment variables (which narrows the scope of the question down considerably)#2019-11-2621:00practicalli-johnIf you run the Emacs daemon process under your own user account, then configuring your accounts .profile to read the .bashrc environment variables may be a simple solution, eg. adding this code to your .profile
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi
#2019-11-2712:09Jcaw@UFTRLDZEW if practicalli's solutions work, let us know. If not, I've had similar issues so I can dig into my config and figure out how I solved them.#2019-11-2712:11JcawSpacemacs has its own methods for handling env vars, supposedly more efficient than exec-path-from-shell#2019-11-2920:26respatialized@jack.crawley92 @jr0cket Unfortunately, this didn't work for me. Regardless of whether the vars were set in .bash_profile or in .bashrc, they're not getting picked up. If I can fix this with a Spacemacs built-in, all to the better. (sorry for not responding sooner. I ended up punting on this and deferring to aero to manage the config data I was hoping to pull from env vars).#2019-11-2921:37jahsonCan it be something with ~/.spacemacs.env? https://develop.spacemacs.org/doc/DOCUMENTATION.html#environment-variables-and-path#2019-11-2922:10JcawThat's the one. If you're using an old init.el , it might not have a spacemacs/user-env section. I remember there being no fallback behaviour if the declaration is missing.#2019-11-2922:10JcawThis is the defun you need to add to your init.el.
(defun dotspacemacs/user-env ()
  "Environment variables setup.
This function defines the environment variables for your Emacs session. By
default it calls `spacemacs/load-spacemacs-env' which loads the environment
variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
See the header of this file for more information."
  ;; Comment this out if you want to explicitly use
  ;; `exec-path-from-shell-initialize'
  (spacemacs/load-spacemacs-env)
  )
#2019-11-2922:12JcawMake sure there's an explicit call to (spacemacs/load-spacemacs-env). I don't think this method tracks environment variable changes, although you should be able to manually reload.#2019-12-0413:09onetomim an intellij/cursive user, but an ex-colleague of mine was a long-time emacs user and on his setup using direnv seemed to work perfectly with emacs, even using the emacs server/client setup. https://direnv.net/#2019-12-0413:10onetomin fact, im using direnv together with intellij too, since that's also started once but the different run configurations might run with completely different environment variables.#2019-12-0413:13onetomi just commit a .envrc into my projects which usually contain a [ -f .env ] && dotenv line, which is a simple direnv builtin, which sources the .env file if it exists#2019-12-0413:14onetomi also use nix to manage project dependencies, so i also have a use nix in my .envrc files.#2019-12-0413:20onetomto make it work almost instantenously, i also put a custom version of that use_nix function into my ~/.direnvrc as documented in the wiki: https://github.com/direnv/direnv/wiki/Nix#using-a-global-use_nix-with-garbage-collection-prevention so it caches the env vars produced by my per-project nix-shell environment into ./.direnv/cache-* files#2019-11-2617:52Lucas Barbosa@jr0cket It seems to work well. However, I am failing to configure it to recognize symbols defined by my custom macros. I tried to add a .lsp/config.edn and a .lsp/settings.json with "macro-defs" as the docs specify, with no success. Maybe @snoe can shine some light on this for us#2019-11-2617:55Lucas BarbosaI am trying, for instance, to make it recognize schema.core/defschema as a macro that defines a symbol in the current namespace#2019-11-2619:05Lucas BarbosaI would also like to hear what @bozhidar has to say about static clojure code analysis on Emacs :thinking_face:#2019-11-2621:13borkdude@lvbarbosa btw, clj-kondo does support schema#2019-11-2920:26respatialized@jack.crawley92 @jr0cket Unfortunately, this didn't work for me. Regardless of whether the vars were set in .bash_profile or in .bashrc, they're not getting picked up. If I can fix this with a Spacemacs built-in, all to the better. (sorry for not responding sooner. I ended up punting on this and deferring to aero to manage the config data I was hoping to pull from env vars).#2019-11-2715:37bozhidar@lvbarbosa Well, it’s certainly doable as evidenced by the tools that exist. I think today you have 3 options - clj-kondo, clojure-lsp and clj-refactor. I like kondo, as it doesn’t require any extra setup from me, but I’ve heard good things about clojure-lsp and clj-refactor. Unused vars are not hard to implement in CIDER itself, I just never had the time for this.#2019-11-2715:39borkdudeMight be a nice experiment. bozhidar: do you think it's possible without any additional elisp? I looked at squiggly-clojure and it provides an elisp package#2019-11-2809:26bozhidarWe’ll also need a bit of Elisp for the UI, but that should be trivial. It’d be really great if we had something like squiggly-clojure for kondo, that’s using middleware instead of just evaluating code, so it would return data that’s optimized for the Elisp clients. That can expand the usefulness of kondo to more than linting - e.g. you can directly expose the data needing for find-usages, bake project integration, etc.#2019-11-2716:05Lucas BarbosaGotcha... I am scheduling some time for myself in the future to study Clojure tooling internals. I might be able to contribute afterward#2019-11-2720:08didibusCouldn't we make clj-kondo in Emacs rely on projectile's notion of projects to perform linting? Or maybe make clj-kondo project.clj aware?#2019-11-2720:10didibusHow slow is it to have clj-kondo do full project linting? We talking unbearably slow? Or, won't really notice slow?#2019-11-2720:11borkdudeDepends on how large your classpath is. Clj-kondo lints some projects in CI: clojure itself, clojurescript itself + some libs, this takes about 10 seconds#2019-11-2720:54didibusHum.. does IntelliJ and co achieve better speed by being long lived process? As I understand, kondo would do a full lint all the time. But I think IntelliJ for example keeps a full AST of Java at all times and as things are changed, it partially update that AST and only perform analysis related to the changes.#2019-11-2721:40borkdudeyes, it's the difference between a server that can accumulate state and a binary which is invoked once and lives very shortly.#2019-11-2721:40borkdudebut if clj-kondo is invoked as a library in a cider middleware you could achieve the same effect probably#2019-11-2723:08didibusThanks for the info!!#2019-11-2816:10Lucas BarbosaGreat info!#2019-12-0117:50royalaidHey all, I am just curious if there is refactor support for CLJS in someway? Poking around it doesn't seem like that is the case.#2019-12-0117:52royalaidI found https://github.com/clojure-emacs/refactor-nrepl/issues/195 but because the issue is somewhat old and the with the recent releases adding better CLJS support I was curious if this may have changed#2019-12-0202:26Lucas BarbosaAnybody had issues with font lock on big clojure files before? My emacs is hanging when I open a 6k lines cljs file (an edn i18n dictionary). I profiled it and looks like font-lock is the culprit :thinking_face:#2019-12-0516:30codeasoneLucas, I recently introduced the following into my config for large files, whilst it won't address the initial loading issue, it may help for general navigation with any large file (not just Clojure code)
(use-package fast-scroll
  :ensure t
  :init
  (add-hook 'fast-scroll-start (lambda () (flycheck-mode -1)))
  (add-hook 'fast-scroll-end   (lambda () (flycheck-mode 1)))
  :config
  (fast-scroll-config)
  (fast-scroll-mode 1))
#2019-12-0614:52Lucas BarbosaI'll give it a try! Thanks#2019-12-0202:38royalaidI think is a general emacs issue unfortunately#2019-12-0202:39royalaidYou can see it happen with any large file and font-lock, or if the file is large enough emacs just grinds to a halt#2019-12-0202:39royalaidbut I also would be interested in a solution#2019-12-0202:43sogaiuwaiting for tree sitter support 🙂#2019-12-0202:43sogaiuturning off the highlighting at least allows one to get things done, iirc#2019-12-0208:41bozhidarYep. The current font-locking engine is based on regular expressions, which results in pretty poor performance in certain cases.#2019-12-0208:41bozhidarI’m pretty sure we can improve the existing regular expressions, but I never found the time to profile and tweak them.#2019-12-0211:57Lucas BarbosaYeah, if I open the file literally, it is very fast @royalaid#2019-12-0212:01Lucas BarbosaWell, it actually opens the file and I am able to navigate (slowly, but doable)#2019-12-0212:02Lucas BarbosaBut it hangs for a while when I ask it to open the file :thinking_face: not a deal breaker, definitely#2019-12-0212:38yuhanI noticed major slowdowns too when the file is basically a single huge sexp, in the case of edn data#2019-12-0212:41yuhanmade a lightweight edn-mode based on text-mode to get around this - not sure if that would be something generally useful to people?
(defvar edn-font-lock-keywords
  `((,(rx (group (repeat 1 2 ":"))
          (group (+ (or (syntax word) (syntax symbol))))
          (group "/")
          (group (+ (or (syntax word) (syntax symbol)))))
     (1 'clojure-keyword-face)
     (2 font-lock-type-face)
     (3 'default)
     (4 'clojure-keyword-face))
    (,(rx (group (repeat 1 2 ":"))
          (group (+ (or (syntax word) (syntax symbol)))))
     (1 'clojure-keyword-face)
     (2 'clojure-keyword-face))))

(define-derived-mode edn-mode text-mode "EDN"
  "Major mode for editing Extensible Data Notation files"
  (set-syntax-table clojure-mode-syntax-table)
  (setq-local tab-width 2)
  (setq-local comment-start ";")
  (setq-local comment-start-skip ";+ *")
  (setq-local comment-add 1)
  (setq-local font-lock-defaults '(edn-font-lock-keywords nil)))

(add-hook 'edn-mode-hook 'rainbow-delimiters-mode)

(with-eval-after-load 'clojure-mode
  (add-to-list 'auto-mode-alist '("\\.edn\\'" . edn-mode))
  (add-to-list 'auto-mode-alist '("deps.edn\\'" . clojure-mode))
  (add-to-list 'auto-mode-alist '("shadow-cljs.edn\\'" . clojure-mode))
  (add-to-list 'auto-mode-alist '("config.edn" . clojure-mode)))
#2019-12-0212:43yuhanthe last part is basically a whitelist of edn config files like "deps.edn" where you still want prog-mode commands like structural editing#2019-12-0214:43sogaiui use the joe editor for huge edn :)#2019-12-0214:44sogaiustill cumbersome, but can at least search without terrible responsiveness#2019-12-0222:07borkdudeWhat is the emacs command for indenting the contents of a string like:
(deftest redefine-var-test
  (eval* "(def ^:redef x 10)
        (defn foo [] x)
     (def x 11)
   (println (foo))
"))
#2019-12-0222:07borkdudeI found indent-relative works, but not for multiple lines at once#2019-12-0222:08sogaiui select the region and use indent-region#2019-12-0222:08sogaiuC-M-\#2019-12-0222:08borkdudethat doesn't work for a string#2019-12-0222:08sogaiuah, just the string part...#2019-12-0222:08borkdudeyes#2019-12-0222:08sogaiuno idea -- though you could indent the string when it's a form first and then paste?#2019-12-0222:09sogaiumay be narrow-to-region first?#2019-12-0222:09borkdudethat also doesn't work very well#2019-12-0222:10sogaiui guess ending the line with the eval on it at the double quote and then starting the form on the next line is not to your taste?#2019-12-0222:11borkdudeyeah, that works 🙂#2019-12-0413:29onetomim revisiting emacs from time to time, but i keep hitting roadblocks. is there an equivalent of the language syntax/scope based extend/shrink selection solution for emacs? here is some example screenshots how intellij does this: https://blog.jetbrains.com/dotnet/2008/01/25/extendshrink-selection/ i use it all the time with cursive and without it, i just feel im moving like a sloth...#2019-12-0418:48agThat is why my personal recommendation for beginners is to use one of the community edition distributions - Spacemacs, Doom, etc. They help you at least to learn the ecosystem of existing packages and features and possibilities. Using a tool like https://github.com/plexus/chemacs one can even experiment with different configurations.#2019-12-0413:34onetomatom has 2 plugins for this feature: • https://atom.io/packages/expand-regionhttps://atom.io/packages/expand-selection if there is an even better way of selecting expressions than this, im keen on learning about it. i also use ctrl-k then cmd-z then cmd-v to kill expressions until end of line then undo and paste, but that only works in limited situations#2019-12-0413:42yuhanhave you seen https://github.com/magnars/expand-region.el ?#2019-12-0415:39bozhidarOne more vote for expand-region - it’s one of my favourite packages.#2019-12-0415:39bozhidarThere’s also easy-kill .#2019-12-0419:05practicalli-johnIn Spaacemacs Evil normal state it’s just v to keep expanding and V to shrink. With SPC v to initially select on a word or syntax expression.#2019-12-0518:18Suvrat ApteI’ve written a 3 part series on Configuring Emacs from Scratch Part 1: https://medium.com/@suvratapte/configuring-emacs-from-scratch-use-package-c30382297877 Part 2: https://medium.com/@suvratapte/configuring-emacs-from-scratch-packages-220bbc5e55b7 Part 3: https://medium.com/@suvratapte/configuring-emacs-from-scratch-use-package-c30382297877 I would love if some of you could review and suggest improvements. Thanks! 🙂#2019-12-0608:21hkjelslink 1 & 3 are the same#2019-12-0608:30hkjelsSince you’re using use-package I think it would be cleaner to use the :custom keyword#2019-12-0518:30papachan@suvratapte so useful. thats nice !#2019-12-0518:40Suvrat ApteThanks @papachan! I'm glad you found it useful 😄#2019-12-0518:45sogaiua minor note: it appears that the link above to part 1 sends me to part 3#2019-12-0520:41sogaiure: part 1 - generally, i found the selection of what was covered to be useful. summarizing the tutorial seemed like a good idea. some specific minor points: * how about headings for some of the subsections (e.g. within the tutorial summary)? * may be you meant "advise" not "advice" -- at least in the version of english i'm used to that's what i'd say, but may be in other versions it's different? * "Use C-x o to move across windows" -> "Use C-x o to move among windows" seems a bit clearer to me * may be mention that one confirms the killing of a buffer (there is no mention in "Press C-x k to kill a buffer.") * worth mentioning that point actually represents something between characters, not on a character? * although i don't use the toolbar, i wonder whether it's such a great idea to disable the menu bar, especially for folks who are unfamiliar with emacs in any case, overall, nice work :thumbsup:#2019-12-0606:30Suvrat ApteThank you so much for this careful review! I will make the changes. 🙂#2019-12-0619:14theeternalpulseis there an evil-mode way of turning a yank line y y to be inserted at the cursor when p rather than newline?#2019-12-0619:42agI don’t get the question, I feel what you’re looking for is P#2019-12-0619:45theeternalpulsewell, p just inserts it in the lines above. Basically when you do yy it yanks the line but p and P never insert at cursor, but below or above where the cursor is#2019-12-0619:46agdo you want to replace the existing stuff with yanked stuff? I don’t get it#2019-12-0619:47theeternalpulseI want to insert a yanked line at the cursor without the newline#2019-12-0619:51agIf you killed a line, you’d yank a line. I suppose you can write advising function that taps into evil-yank-characters or evil-yank-line and modify kill-ring content, but I feel you’re trying to solve a problem which is not a problem :)#2019-12-0619:53agI often get that urge to “fix” something, would spend hours trying to write lots of emacs-lisp only at the end to realize that I don’t have the problem to begin with. Emacs is weird, it makes you do weird stuff - just because you can.#2019-12-0620:07yuhanI believe that's the reason for evil-textobj-line - ie. using yal instead of yy to begin with#2019-12-0620:08yuhanI have a habit of using 0Y quite often#2019-12-0622:55theeternalpulse@UCPS050BV yil actually worked nicely#2019-12-0622:55theeternalpulseyal copies the whitespace, yil seems to ignore it#2019-12-0622:56theeternalpulseI actually never think of l as a text object lol,#2019-12-0716:13pesterhazyI guess you could use i ^R " instead of p?#2019-12-0619:15theeternalpulsebasically pased ignoring the newlines at the beginning and end of the yanked text#2019-12-0723:26lilactowndoes anyone know why my indentation would show up fine in my buffer, but in Vim/github it looks like garbage?#2019-12-0723:28lilactown#2019-12-0723:28lilactownrepo is here: https://github.com/Lokeh/helix-todo-mvc/#2019-12-0723:29lilactownit initially had an .editor_config file at the root of the project but I deleted it and restarted emacs#2019-12-0723:32lilactownOK, going into each buffer and running cider-format-buffer seems to have fixed it#2019-12-0723:32lilactownfrustrating that Emacs won't show me the correct indentation#2019-12-0723:45dpsuttonPossible there are tab widths involved?#2019-12-0723:46lilactownmy guess is that the .editor_config had forced my buffer to write in tabs yeah#2019-12-0723:46lilactownirritating#2019-12-0723:47dpsuttonThen both editors were correct#2019-12-0818:03luizmineoHi, can I use clj-refactor with shadow-cljs projects?#2019-12-0818:03luizmineoI'm trying to enable it in a project created with the default re-frame template#2019-12-0818:04luizmineobut the repl complains that nrepl-refactor is missing#2019-12-0818:04luizmineoWARNING: clj-refactor and refactor-nrepl are out of sync. Their versions are 2.5.0-SNAPSHOT (package: 20190618.716) and n/a, respectively.#2019-12-0818:05luizmineoAlready tried to add it as a dependency, on both project.clj and shadow-cljs.edn#2019-12-0920:28dotemacs@UREHT6UJC From the error message it seems that they are not the compatible with each other. Try to install the latest stable versions. Looking at the repo for clj-refactor the latest is at 2.4.0 so try to install that version. I’m guessing that in your emacs config you’ve declared the MELPA repo somewhere. If that is the case, try to declare and use MELPA stable . This is just a guess, since I don’t know how you’ve configured your emacs…#2019-12-0923:06luizmineo@U3SG7RX7A Thanks for the hints. I was able to solve this issue by configuring the refactor-nrepl middleware in shadow-cljs.edn
:nrepl {:port 8777
         :middleware [refactor-nrepl.middleware/wrap-refactor]}
Also, I removed the clj-refactor and refactor-nrepl dependencies from project.clj. It seems that cider can inject the correct versions when repl starts, we just have to manually configuring the middleware in shadow-cljs
#2019-12-1018:16Lone Rangersometimes some things work if you switch to clojure-mode but most feature do not 😕#2019-12-1018:19dpsuttonwhat do you mean @goomba?#2019-12-1018:21Lone RangerI mean sometimes when I'm editing clojurescript I'll switch to clojure major mode to take advantage of certain CIDER features that sometimes work in clojure mode but don't work in clojurescript mode, and IIRC some clj-refactor stuff falls into that category. However, any features that require parsing don't work b/c of the whole javascript thing#2019-12-1018:22Lone RangerIf you're gonna press me for the exact differences I'll have to admit I'm not sure off the top of my head#2019-12-1018:22dpsuttoni didn't understand what you meant. but now i see you were talking about clj-refactor. Just seeing if i could help in any way 🙂#2019-12-1018:25Lone RangerOh wow that comment was two days ago.#2019-12-1018:26Lone Ranger#2019-12-1021:58lilactowndoes anyone understand how clojure(script)-modes indentation specifications work?#2019-12-1021:58lilactownI have this in my library:
(defmacro defcomponent
  "Defines a React class component."
  {:style/indent [1 :form [1]]}
  [display-name & spec]
  ...)
#2019-12-1021:58lilactownbut clojurescript-mode still indents it like this:
(defcomponent ErrorBoundary
  (render [this props state]
          "foo"))
#2019-12-1022:06dpsutton@lilactown https://github.com/clojure-emacs/clojure-mode#indentation-of-macro-forms#2019-12-1022:07dpsuttonoh i'm sorry. i just put together your question#2019-12-1107:20bozhidar@lilactown This works only when CIDER is running, clojure-mode itself doesn’t understand metadata.#2019-12-1115:16lilactownI am connected via CIDER to a shadow-cljs process#2019-12-1115:17lilactownI often switch between CLJ and CLJS in the REPL buffer though.#2019-12-1107:32David PhamIs CLJ-refactor compatible with the newest Cider version?#2019-12-1109:16bozhidarThe master should be compatible. Not sure about the latest stable version.#2019-12-1112:16ziltiDoes anyone else have the problem that there seems to be some auto-formatting going on now in clojure-mode buffers? As in, when I make a newline, it will almost immediately get deleted again, spaces I make get auto-deleted, etc...#2019-12-1112:23dpsuttonthat sounds like you have an autosave with a hook to clean up whitespace on save#2019-12-1112:59ziltiHm, my auto-save-hook is empty, and it only affects Clojure buffers#2019-12-1113:02dpsuttonany chance you have some kind of clean up buffer run on a timer?#2019-12-1113:28yuhanmaybe it's clojure-align-forms-automatically, also check your post-command-hook for anything suspicious#2019-12-1113:59zilticlojure-align-forms-automatically is set to nil. Hm, that's so weird... The only automatic thing running in the background is that magit auto-revert thing, but that only gets triggered on manual save#2019-12-1114:32JcawIs it putting cider-format-buffer on an idle timer in post-command-hook?#2019-12-1114:34JcawTurn debug on entry on in cider-format-buffer, run-with-idle-timer and maybe run-with-timer, then trigger the behaviour. See if any ping.#2019-12-1114:51ziltiMust be cider, yes. As soon as I quit cider, it stops happening#2019-12-1115:00bozhidarThere has never been auto-formatting in CIDER. It must be some hook in your local setup, as suggested above.#2019-12-1115:00bozhidarFYI - https://metaredux.com/posts/2019/12/11/hard-cider-find-usages.html#2019-12-1115:49zilticider-format-buffer didn't get triggered when I turned on debug-on-entry, but run-with-idle-timer did, but that one only calls eldoc#2019-12-1120:04JcawMaybe try cider--format-region (private version, two dashes)?#2019-12-1120:06Chaseany of you folks use this version of parinfer-rust: https://github.com/justinbarclay/parinfer-rust-mode It seems to be a fork of https://github.com/eraserhd/parinfer-rust which I love for vim because it "just works" in smart mode. I've never cared for the non "smart" mode versions of parinfer that I've tried before but hoping this works. But I can't get it to work...#2019-12-1217:57didibusNope, never used it. I'm a happy smartparens user#2019-12-1809:56LuCider question! Is there a way to pprint to buffer with nice formatting? This is what I am trying to see in a readable manner:
(["2020-01-02T12:00:00Z" {:total-precipitation 0.08385746509713285, :temperature 287.9938916973039}] ["2020-01-07T00:00:00Z" {:total-precipitation 0.09868490622908462, :temperature 289.68302887561276}] ["2020-01-25T18:00:00Z" {:total-precipitation 0.16854437338370903, :temperature 295.7740885416667}] ["2020-01-15T06:00:00Z" {:total-precipitation 0.12877143130582921, :temperature 288.2908193550858}] ["2020-01-12T00:00:00Z" {:total-precipitation 0.11650203847709824, :temperature 289.78164253982845}] ["2020-01-26T06:00:00Z" {:total-precipitation 0.17125286424861236, :temperature 288.5767415364583}] ["2019-12-31T06:00:00Z" {:total-precipitation 0.07543482708142084, :temperature 288.6598259420956}] ["2020-01-29T00:00:00Z" {:total-precipitation 0.18237000879119425, :temperature 290.36369293811276}] ["2019-12-19T18:00:00Z" {:total-precipitation 0.012206793018598474, :temperature 295.0340408624387}] ["2019-12-20T18:00:00Z" {:total-precipitation 0.01632653268547181, :temperature 295.13471296721815}] ["2020-01-27T18:00:00Z" {:total-precipitation 0.17602475075160756, :temperature 295.6355842141544}] ["2020-01-28T18:00:00Z" {:total-precipitation 0.18001714509491826, :temperature 295.7472091375613}])
#2019-12-1809:58LuI am using C-c C-p#2019-12-1810:05solfYou can always use C-u C-c C-p (`C-u` means invoke the next command with a flag), it pprints to the same buffer#2019-12-1810:06solfalthough the result is commented, but then you can just uncomment it#2019-12-1810:07LuI just did a couple of tests and realized that when invoked from a .clj file the formatting works, while from a .cljs file no chance 😄#2019-12-1810:08solfI haven't done enough clojurescript to help for that, but you should ask in the #cider channel#2019-12-1813:22sogaiunot tied to cider, but zprint-mode can be handy sometimes#2019-12-1818:12lilactown@lucio you need to be connected to a CLJS REPL in order to invoke from a .cljs file#2019-12-1818:14LuI have a cljs repl on :) .. it’s just that I get the whole result in one line, when from a clj repl I get it nicely formatted @lilactown #2019-12-1818:18LuI ended up writing the logic in a .clj file and moving it over once I was done not the most ideal thing, but better than freezing emacs with those endless one line results #2019-12-2320:26Nir RubinsteinCider and Doom Emacs question - anyone have any idea how to set the doom cider repl location? It's currently at the bottom (some kind of magic buffer) and I want it to open, by default, to the right. Anyone have any idea how to accomplish this in doom?#2019-12-2320:40yuhanCheck out the call to set-popup-rules! in modules/lang/clojure/config.el#2019-12-2320:47Nir RubinsteinI see this there: https://github.com/hlissner/doom-emacs/blob/5dacbb7cb1c6ac246a9ccd15e6c4290def67757c/modules/lang/clojure/config.el#L38 is this what you mean?#2019-12-2321:16yuhanThat links to a 2-year old revision of the file, are you on an outdated version of Doom?#2019-12-2321:16yuhanhttps://github.com/hlissner/doom-emacs/blob/59152248e646a0e81dbb08f1094b0823e4974274/modules/lang/clojure/config.el#L34#2019-12-2405:12Nir RubinsteinThanks!#2019-12-2511:35plexusI just upgraded spacemacs-develop and all installed packages, and now some paredit (?) thing broke. When deleting the opening parenthesis of a pair like () it used to delete the full pair, now it just deletes that opening parenthesis. Any idea where to start looking for this?#2019-12-2607:31practicalli-johnJust checking, did you update the .spacemacs config file, e.g SPC f e D to edif your .spacemacs config file against the new spacemacs-template. Also check in .spacemacs for the setting dotspacemacs-smartparens-strict-mode t #2019-12-2607:33practicalli-johnIf you are using Evil (Vim style) editing, then enable safe structured editing https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html#2019-12-2607:39practicalli-johnIf you restart Emacs and it’s still not working, perhaps there is a bug in the newest smartparens package. You could try pinning that package to a previous version of smartparens, e.g http://jr0cket.co.uk/2017/03/spacemacs-managing-broken-emacs-packages.html Or if your previous package update was not to long ago, rollback your package update, freeze smartparens and then do a package update.#2019-12-2815:40Kari MarttilaIs there some example how to minimally configure Emacs for Clojure, paredit, rainbow parenthesis etc. I have some issues to make paredit work automatically in Clojure mode when I open some .clj file. I tried emacs-live (https://github.com/overtone/emacs-live) and it seems to be really great but it also takes quite a lot of time to start Emacs with all those configurations...#2019-12-2818:55vemvI started with emacs-live ~7 years ago, used it for a few months, and then simply forked it. I gradually removed stuff and eventually had everything written by me You could do that with a modern alternative such as prelude. But yes, I recall some blog post explaining how to setup these from scratch. It's certainly possible, if you can't find out how I'd say that your time is better spent in using these "frameworks" Btw, under many workflows, an Emacs session lasts days. So startup time has a very relative cost#2019-12-2819:07iammilesNot sure what you mean by example but here’s my init.el file https://github.com/iammiles/cautious-guacamole/blob/master/init.el It has a few more packages but you can choose to not install them / remove their setup. For info on using paredit, I learned what little I know from https://www.braveclojure.com/basic-emacs/#Paredit#2019-12-2819:12iammilesI think the key word was minimally 😛#2019-12-2819:17andy.fingerhutIf you start out with vanilla GNU Emacs, then use M-x package-list-packages, mark the packages you want to install with the "I" key (I think), then apply those, then it is mostly a matter of picking which packages you want, and in some cases, adding a new repository of Emacs packages to retrieve packages from, and in some cases then configuring those packages to your liking.#2019-12-2819:18andy.fingerhutInstalling the clojure-mode package, IIRC, is pretty darned straightforward.#2019-12-2819:18andy.fingerhutI haven't installed paredit, rainbow parens, etc., because I haven't wanted to use them.#2019-12-2819:20dpsuttona simple init would be
(package-initialize)

(when (not package-archive-contents)
  (package-refresh-contents))

(when (not (package-installed-p 'use-package))
  (package-install 'use-package))

(require 'use-package)
(use-package cider)
#2020-12-2912:41Nir Rubinsteinusing cider and doom-emacs. If I use cider-find-var, it works for fn names. If I try to use it for symbols inside a let statement, it doesn’t jump to the symbol in the let statement (instead - it opens up a Symbol: dialog at the bottom). Any idea what I’m doing wrong?#2020-12-3003:08practicalli-john@nirrub I believe that cider-find-var only works when the REPL is running and the code you are trying to find is evaluated. I rarely use this function myself as it doesn’t feel very reliable. I use symbol highlighting (a Spacemacs transient state, not sure if it’s in Doom, sorry). Or I use helm-ag or swoop to jump to symbol locations in a buffer or project, using narrowing to a function if relevant. There are quite a few Emacs approaches to finding things. To refactor a local binding name, I use iedit and narrowing if the local binding name is not unique to the function in that namespace. Here are various ways I have learned to navigate code https://practicalli.github.io/spacemacs/navigating-code/ I haven’t used Doom, but assume if the same packages are installed then you can do the same things as I do in Spacemacs.#2020-12-3008:28Jcawdumb-jump provides a nice heuristic for jumping to definitions using grep (or ag, rg, etc.). Spacemacs glues that to most modes as a fallback if the intelligent jump functions fail.#2020-12-3008:29Jcawsmart-jump is a standalone package that takes a similar approach - tries to be smart, falls back to dumb-jump. I haven't used it but it looks slightly better than Spacemacs' approach. Doom might have something like it already.#2020-12-3112:33dazldI'm using parinfer, and really enjoying it - there's some behaviour i miss from the cursive implementation though#2020-12-3112:34dazldfor example..
(s/def ::foo {::baz 2
              ::bar 1})
#2020-12-3112:35dazldif i make ::foo shorter or longer, then in cursive the map and its indentation will move around too#2020-12-3112:35dazldis this electric ?#2020-12-3112:37dazldor.. if i realise (like now) that s/def is not what I wanted and actually it is s/explain then the rest of the expression including on the next lines would move around too#2020-12-3112:37dazldsomething like this#2020-12-3112:37dazldany ideas?#2020-12-3113:19dazldthat might be the trick#2020-12-3115:04yuhanI use both aggressive-indent and adjust-parens, together they provide all the convenience of parinfer without the surprising behavior that can happen with giving up control of paren structure#2020-01-0100:34didibusHum, adjust-parens looks pretty great, I'll try it!#2020-01-0100:40didibusSeems there is sp-indent-adjust-sexp on smartparens as well, not sure if it is as good#2020-01-0101:29yuhanif I recall the difference is in fallback behaviour - adjust-parens only works at the beginning of lines and falls back to regular TAB completion otherwise#2020-01-0101:31yuhansp-indent-adjust-sexp does some unintuitive slurping/barfing when called in the middle of a line#2020-01-0102:01didibusCool, good to know thx#2020-12-3116:21onetom@dazld parinfer has 2 modes, paren and indent mode. the demo animation on the parinfer mode site shows the behaviour you are talking about: https://github.com/DogLooksGood/parinfer-mode the parinfer layer docs (https://develop.spacemacs.org/layers/+misc/parinfer/README.html) mentions how to switch between the 2 modes: > SPC t P Toggle between parinfer indent and paren mode#2020-12-3116:58cullanHi everyone. I am using Cider and figwheel-main with a clojurescript project. When I try to evaluate an infinite sequence like (repeat 1) I expected it to truncate the result and print it out but I get an error:
Eval timed out!
No stacktrace available.
My browser also complains that the web page is slowing down my browser and I have to kill it and restart. I tried changing cider-print-quota to a much smaller value and adjusting length in cider-print-options but that did not fix the problem. Can anyone here help me out?
#2020-12-3117:00yuhanHave you tried setting *print-length* directly? I'm not entirely sure if that works in Clojurescript#2020-12-3117:01yuhanie. eval (set! **print-length** 100) in the CLJS repl, not elisp#2020-12-3117:01cullanaha! if I do (set! *print-length* 1024) it does truncate the output. Thank you.#2020-12-3117:01cullanDo you know where to save that so it automatically happens in a new repl?#2020-12-3117:02yuhanI have it set in cider-repl-init-code#2020-12-3117:03cullanNice. I will try to adjust that. Thanks again!#2020-01-0102:21didibusAnyone knows if there's an emacs config manager? I'm looking for something say a bit like Spacemacs or doom-emacs in that it helps organize configuration more cleanly and provides package management and update/rollback, but that would be all, otherwise it would be a plain Emacs starter config?#2020-01-0102:41didibusHum, that does seem nice for package management#2020-01-0102:41didibusNow anything for config management?#2020-01-0102:42didibusLike init.el management?#2020-01-0102:43didibusLike doom-emacs lists as features:
A modular architecture for a more organized Emacs configuration.
A custom elisp library to help you simplify your config.
A declarative package management system (powered by straight.el) with a command line interface. Install packages from anywhere, not just (M)ELPA.
#2020-01-0102:43didibusI want only that!#2020-01-0102:48didibusHum... I guess I can start with a classic emacs config and see how things go.#2020-01-0102:49didibusYa, straight.el does seem like it would help a lot, the package management stuff is the hardest to put together on my own#2020-01-0103:29andy.fingerhutI have had my .emacs.d directory under git version control for a while now, kept in a public Github repo, which gives me the ability to roll back if I mess up something, and also easily copy the files to a new machine if I want to use the same Emacs setup on it.#2020-01-0220:07j0nihey @U0CMVHBL2 do you connect to repls from emacs, and if so (and you don't mind me asking!) how?#2020-01-0220:10andy.fingerhutI connect to socket REPLs from emacs. I know many people use Cider and unrepl, but I haven't used that.#2020-01-0220:10andy.fingerhutI use inf-clojure to connect to a socket REPL. Perhaps I should write up the steps somewhere and publish them, rather than recording them in this ephemeral place.#2020-01-0221:40j0nithat would be cool - I've only had partial success getting inf-clojure to work#2020-01-0221:40j0nido you have a working jump-do-definition function? That would do it for me I think 🙂#2020-01-0221:45andy.fingerhutI believe Cider can provide that, and some other things, but I don't have one in my setup right now.#2020-01-0321:06j0niyeah I currently use cider for most work, but I barely use a fraction of its capabilities, and it's very complex. Thanks for answering.#2020-01-0321:20andy.fingerhutEh, if you can make good use of the fraction you care about, and if the parts you do not use are not causing you problems, you should be good. Granted it is entirely possible that parts you do not use may sometimes be causing you problems.#2020-01-0321:46j0niI'm not miserable 🙂 Just always interested in simplification - I just tried out clojure-lsp in combination with inf-clojure, and that's actually looking quite usable.#2020-01-0321:55andy.fingerhutI've heard of clojure-lsp but never tried it out before. Were the instructions you found for setting it up, and using jump-to-definition, straightforward?#2020-01-0322:05j0niIt looked like it was pretty straightforward from the README - I saw it was already supported by lsp-mode which I already use elsewhere. So I installed the clojure-lsp binary and started lsp in a buffer and it just started working 🙂#2020-01-0322:06j0nithe README was pretty clear, and looked like it would work out of the box for someone who did not already have lsp-mode installed#2020-01-0322:06j0niand I was fortunate that there is a maintained arch linux user repo for it, so installing it was a 1-liner#2020-01-0322:10j0ni(it can't jump into sql using hugsql understandings though, which cider can, which always filled me with wonder - a real "it just works" moment ❤️ so we'll see how long I last and if the new things make it worthwhile (linting...hmm))#2020-01-0414:36sogaiure: jump-to-definition - if you don't mind re-indexing manually from time-to-time, i have some code that generates a TAGS file for a project and its dependencies. this then works with built-in emacs commands for navigating code: https://gist.github.com/sogaiu/6cb947b00ae13d00d4ae16ab7aaf97e4#2020-01-0405:00theeternalpulseIs there already a package that will grep text in a buffer and allow you to display a unicode character instead?#2020-01-0405:26andy.fingerhutIt is not clear to me what you mean by "instead". Instead of what?#2020-01-0405:28theeternalpulseinstead of the grepped text.#2020-01-0405:41andy.fingerhutSo for example you want to search for the string "favorite-string", and for every on which it is found, show the line with "favorite-string" replaced with some other character in its place?#2020-01-0405:42andy.fingerhutbut not actually do the replacement? That is, you only want to see the matching lines, without modifying the text of the buffer?#2020-01-0405:59theeternalpulseyes#2020-01-0405:59theeternalpulsekind of like a font face that translates to a unicode character#2020-01-0406:05theeternalpulseI guess I can look into how emojify does it#2020-01-0419:32Jcaw@theeternalpulse Guessing you want prettify-symbols-mode#2020-01-0419:32Jcawhttps://www.reddit.com/r/emacs/comments/brt0sk/prettifysymbolsmode_is_so_cool/ https://emacs.stackexchange.com/questions/46529/configuring-prettify-symbols-mode#2020-01-0419:34JcawAre you looking to display ligatures? There's an implementation using prettify-symbols for Fira Code.#2020-01-0420:19theeternalpulseYes this is what I'm looking for. Not exactly sure what ligatures are outside of the reference to fira code, but I don't particularly like that font set.#2020-01-0420:19theeternalpulseit's also not necessarily for code, mainly various text and org things I am thinking of testing out#2020-01-0502:05didibusTo whoever suggested the combination of aggressive-parens-mode and adjust-parens! Thank you! It's a game changer for me#2020-01-0615:17dazldI remember this chat! we were talking about parinfer#2020-01-0615:17dazldwhat’s your setup now?#2020-01-0615:18dazld(not my suggestion re aggressive parens etc, was someone else)#2020-01-0615:26dazldaggressive-indent and adjust-parens ?#2020-01-0619:48didibusYa pretty much, and I use smartparens as well.#2020-01-0619:49didibusI tried parinfer before, but the problem is that it works 85% of the time. If you paste in some badly indented code, or checkout a codebase with bad indentation and open it with pareinfer, it will break the code because it will automatically recompute the parenthesis based on the indentation, and since the indent is wrong, it will do the wrong thing.#2020-01-0619:50didibusIt also frustrated me that with parinfer, I can no longer auto-indent.#2020-01-0619:51didibusTo remediate that, parinfer assumes you will switch between parens mode and indent mode accordingly. So like siwtch to parens mode before pasting, and then switch back to indent mode, for example.#2020-01-0619:52didibusBut this got tedious, and I'd always forget to do so. And then it has smart mode, but in Emacs, that's on a branch, and I didn't try it. They seem to think its not fully working yet. Smart mode is basically parinfer trying to auto switch between indent and parens mode for you. But there's so many things that can modify the buffer that it needs to hook into to be smart, that's why smart mode is hard to implement and get working with everything.#2020-01-0619:55didibusAdjust-parens is like parinfer, but on demand and local to the form you call it on. By pressing TAB or S-TAB when the cursor is at the start of a form, you can basically alter the nesting of the form to its surrounding form. And aggressive-indent-mode means everything is always auto-indented in a smart way. So for example, if you backspace, instead of breaking indent, it will move the line up.#2020-01-0619:55didibusIts really nice, like the best of parinfer and smartparent (which is same as paredit).#2020-01-0619:49agEldoc hint is too short, it shows, but disappears almost immediately, this is sooo annoying, anyone experiencing this?#2020-01-0620:53vemvdoes it disappear if you don't move the mouse?#2020-01-0620:58vemvanyway, (setq cider-use-tooltips nil) might help given https://github.com/clojure-emacs/cider/pull/2688/files I don't use eldoc tbh, so I'm not sure if the suggestion makes sense#2020-01-0702:01agTurned out to be I had to disable lsp-eldoc-enable-hover#2020-01-0713:51Robert A. RandolphI'm looking to see if anyone has a working emacs daemon/client setup on macOS using a GUI-based emacs, and if so I'd like to know your setup. Everything I've found online does not seem to work properly (extra windows, frames not recognized by window manager, extra terminal windows etc..)#2020-01-0714:27Nir Rubinstein@audiolabs - can you please explain what is the purpose of the deamon/client? I'm running a regular doom-emacs distro (gui) and it opens up in no-time on my macOS#2020-01-0714:33Robert A. Randolph@nirrub emacs does not open quickly on my system, it does not seem possible to optimize package loading because I use desktop mode (many buffers load on start) that end up loading all of my packages anyway. I'm on a 2019 mbp i9, and emacs takes about 16 seconds to load.#2020-01-0714:34Robert A. RandolphI would like to be running a daemon, and connect to it from an GUI instance when necessary.#2020-01-0714:39Nir Rubinstein@audiolabs - Wow - 16 secs is ages!!!! OTOH, my config only load the welcome screen and basic (non-lang specific) packages - it opens in 1.5 secs. Sorry I can't be more help with this issue.#2020-01-0714:40Robert A. RandolphYeah, my package configuration is a bit heavy because I have to switch languages frequently.#2020-01-0718:04andy.fingerhutIf merely doing a quick test that M-x server-start in my initial Emacs window, followed by emacsclient filename from a terminal does not start up a new window, but uses the existing one, is sufficient evidence for you, I got that result on macOS 10.14 with GNU Emacs 26.3 binary downloaded from here: https://emacsformacosx.com#2020-01-0718:05andy.fingerhutI don't have much in the way of add-on packages, but a few from MELPA.#2020-01-0718:05andy.fingerhutand you have to add a couple of directories in /Applications/Emacs.app to you shell's command path to have reasonably short commands to type, but that is one time setup#2020-01-0718:06andy.fingerhutNot clear to me whether it suffers from any of the issues you mention, though.#2020-01-0822:39ddellacostaI'm having a terrible time trying to get cider going for a cljs repo. I'm trying to start up a figwheel-main session but keep getting error in process filter: Figwheel-main is not available. I've gone so far as to put the library in my main dependencies in the project.clj but it's not working. Here's the command that is starting up the repl:
[nREPL] Starting server via /nix/store/rdxrnh3w290hdc8gj4zmcbgg5b7q2iri-leiningen-2.9.1/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :dependencies conj \[cider/piggieback\ \"0.4.2\"\] -- update-\
in :plugins conj \[cider/cider-nrepl\ \"0.23.0-SNAPSHOT\"\] -- with-profile +cider,+test,+dev,+user repl :headless :host ::
[nREPL] server started on 50397
[nREPL] Establishing direct connection to localhost:50397 ...
[nREPL] Direct connection to localhost:50397 established
error in process filter: user-error: Figwheel-main is not available.  Please check  for details
error in process filter: Figwheel-main is not available.  Please check  for details
Anyone have any advice as to how I can figure out what I'm missing?
#2020-01-0822:43dpsuttoncopy that startup command and paste it in a command line#2020-01-0822:45dpsuttoni thought figwheel-main with lein required a plugin?#2020-01-0822:46ddellacosta¯\(ツ)/¯#2020-01-0822:46ddellacostathe docs say > This setup is only necessary if cider-inject-dependencies-at-jack-in has been changed from its default setting of enabled, as described more fully above. #2020-01-0822:47ddellacostaso I'm not even clear on why I have to configure anything#2020-01-0822:47ddellacostaalso pasted that line into my command line and ran it there and got the same thing I've been getting, so not sure what I can learn from that#2020-01-0822:48dpsuttonyou ran the startup command in the command line and received an error?#2020-01-0822:50dpsuttonif so, to me it demonstrates that your project doesn't work so CIDER couldn't possibly start it up#2020-01-0822:50ddellacostaweird since we've been running it in production for a while#2020-01-0822:50ddellacostaanyways, thanks, will keep poking at it#2020-01-0822:51dpsuttontry running /nix/store/rdxrnh3w290hdc8gj4zmcbgg5b7q2iri-leiningen-2.9.1/bin/lein update-in :dependencies conj -- with-profile +cider,+test,+dev,+user repl :headless :host :: so that there's no CIDER anywhere#2020-01-0822:51dpsuttoner, get rid of the +cider#2020-01-0910:15joelkuiperThis was probably asked before, but I can no longer find it ... how do you prevent cider from stealing focus from the repl when an exception occurs?#2020-01-0910:16joelkuipernow when I make a mistake (which I sometimes do :p) my whole window layout changes and the focus is on the stack trace buffer, which kinda breaks the flow of things#2020-01-0911:32practicalli-johnAre you aware that pressing q closes the stack trace buffer and restores your window layout (I dont know how to prevent the stack trace popup. I like to know when there are errors :))#2020-01-0911:34practicalli-johnThere are details you ask in the docs https://docs.cider.mx/cider/usage/navigating_stacktraces.html#2020-01-0911:45joelkuiperI don't mind the popup, it's just the focus stealing that I'd like to prevent. But yeah q works, or wind-move back 🙂#2020-01-0911:45joelkuiperI'll take a look at the docs! thanks#2020-01-0911:46joelkuiper
(setq cider-auto-select-error-buffer nil)
seems promising
#2020-01-0911:48joelkuiperyep that did the trick, cool. Much better!#2020-01-0916:35ddellacostaI'm still struggling with getting a CLJS repl going in cider with leiningen, unfortunately. I've removed everything in my .dir-locals and commented out all dependencies relating to cider (piggieback, figwheel-main, etc.) in my .lein/profiles.clj to try to get my setup up as "vanilla" as possible to match the docs. I can confirm that dependencies are getting injected per cider-inject-dependencies-at-jack-in. What I'm seeing is trying to load Clojure dependencies when I run cider-jack-in-cljs in my ~`*Messages*`~ nrepl log in emacs:
#error {
 :cause Could not locate myapp/core__init.class or myapp/core.clj on classpath.
 :via
 [{:type .FileNotFoundException
   :message Could not locate myapp/core__init.class or myapp/core.clj on classpath.
   :at [clojure.lang.RT load RT.java 463]}]
 :trace
 [[clojure.lang.RT load RT.java 463]
...
...and then I see (in *Messages*)
error in process filter: user-error: No figwheel-main build files (<build-id>.cljs.edn) were found
error in process filter: No figwheel-main build files (<build-id>.cljs.edn) were found
I get a Clojure repl started up for some reason but no CLJS repl. I'm really confused as to what I'm doing wrong at this point. If anyone has any suggestions I'd appreciate it.
#2020-01-0916:36ddellacostaoh versions are: cider-20200101.839, nrepl 0.6.0 (via injection), piggieback 0.4.2 (injected), cider-nrepl 0.23.0-SNAPSHOT (injected)#2020-01-0916:38ddellacostaI'm guessing at this point that there's something in this old, crufty project.clj that's interfering with cider's repl startup somehow, I'm just not sure where to start to figure out what that may be#2020-01-0917:27bozhidar@ddellacosta Could it be that you’re starting the right profile and that’s why some things are missing for you?#2020-01-0917:28bozhidarAlso - what’s your version of figwheel-main?#2020-01-0918:00ddellacosta@bozhidar It may be that I haven't configured figwheel-main correctly--I assumed also that it would get loaded in by default. Do I need to set that up explicitly? Does the version of figwheel set up in my project.clj for unrelated dev purposes determine that, or am I offbase? Apologies for what may be stupid questions#2020-01-0918:02ddellacostaI've just added [com.bhauman/figwheel-main "0.2.3"] to my :dependencies in the user profile in ~/.lein/profiles.clj and nothing changed, fwiw#2020-01-0918:32bozhidar@ddellacosta Well, if it’s on your classpath after cider-jack-in then it should work. I’m assuming that you’ve also added figwheel-sidecar or whatever the nREPL integration package was named.#2020-01-0918:32ddellacostalet me confirm#2020-01-0918:33ddellacostaadded [figwheel-sidecar "0.5.18"] to my user profile, trying again now#2020-01-0918:33bozhidarOr perhaps this was needed only with the old figwheel. I haven’t tried it in a while and I don’t remember the details. @manuel wrote this article with some info a while ago https://manuel-uberti.github.io/programming/2018/08/03/figwheel-main/#2020-01-0918:34ddellacostaokay, will check it out#2020-01-0918:34ddellacostayeah that doesn't help. Anyways maybe that article has the secret sauce#2020-01-0918:37bozhidarAs for those build files - I assume you have to have them. That error is coming from a check in CIDER.#2020-01-0918:38bozhidarI’m not sure if they are mandatory or not, but it seems we’ve made them required in CIDER. I’m not very familiar with figwheel, I just accepted a PR implementing parsing the build files to provide the users with a list of target builds.#2020-01-0918:45ddellacostaOkay. Yeah I think the CLJS documentation may not be clear enough for how to get this going--reading it it sounds like cider will do most of the work for you if you simply run cider-jack-in-cljs, but it seems like that's not the case. Hopefully I get this working and I can suggest some doc changes, assuming I determine I'm not just doing something stupid#2020-01-1016:46bozhidarSorry about the confusion. I’ll try to clarify the documentation on subject.#2020-01-1017:34ddellacostaThanks, I appreciate it! Will update if/when I figure anything out on my end#2020-01-0918:50dpsuttoncan i suggest again that you get this running completely independently of CIDER and only then attempt with CIDER?#2020-01-1009:05bozhidarI think he’s running in the problem we’ve discussed a while ago that it was a bad idea to make the existence of figwheel build files mandatory. Guess there should be some fallback in case there are no of those.#2020-01-0918:57ddellacostaI'm not sure what you're suggesting. I can get a figwheel repl running with this project just fine. Is there something else I'm missing here?#2020-01-1000:36practicalli-john@ddellacosta https://github.com/practicalli/practicalli-landing-page is a leiningen configured figwheel-main project that runs inside CIDER (0.24) . Start the project with M-x cider-jack-in-cljs , select figwheel-main and enter dev as the build. There are other builds configured in project.clj . There is very little difference in the build configuration. As this definately works, its another way to test your Emacs setup.#2020-01-1001:20ddellacostaThanks, I'll review this to see if I can learn anything about how to configure the repo I'm working with#2020-01-1022:23papachanhttps://cestlaz.github.io/post/using-emacs-63-clojurescript/#2020-01-1314:17Juliano Pereira LimaHi folks. Has anyone used Spacemacs? have any feedback?#2020-01-1314:47practicalli-johnYes, I have used Spacemacs for Clojure development for over 3 years now. It's really increased my productivity. It also stopped me wasting days and weeks (years) massaging my init.el file. There is very little config needed thanks to the layers, actually you can get Spacemacs to do it all as it will prompt you to add layers when you open certain file types. You can of course customise Spacemacs as much as you want. Another great thing is the community of contributors to Spacemacs (I am one too). As it's a community effort, then you get to use lots of other people's skills. I have used one person's config previously, but that does risk them abandoning the project. There is also a #spacemacs channel here and I also am writing a book (with Screencasts) on Clojure development with Spacemacs https://practicalli.github.io/spacemacs/ The most important advice, use the Spacemacs develop branch rather than the default master branch. develop is very stable and has been for the last 2 years or more.#2020-01-1314:38lispyclouds@deleted-user Do you use paredit when editing lispy stuff with Doom? I couldnt get it to work as nicely as spacemacs and still using it as I found doing clojure on spacemacs involves less config than Doom.#2020-01-1314:39lispycloudsCan you share your clojure config maybe? I can give Doom another try then! 😄#2020-01-1314:40lispycloudsI do wanna switch for the reasons you mentioned above#2020-01-1314:42lispycloudsits just that the keybindings are more semantic and i guess im too used to them#2020-01-1314:43Nir RubinsteinIsn’t slurp/barf just < or > on the opening /closing? Or is it evil-cleverparens?#2020-01-1314:46lispycloudslooks like it is cleverparens: https://github.com/luxbock/evil-cleverparens#slurping-and-barfing#2020-01-1314:47Nir RubinsteinI have both enabled, but I guess I’m only using the cleverparens bindings (also using doom emacs myself)#2020-01-1314:44lispycloudsI've used more of evil-smartparens which is default in spacemacs i guess#2020-01-1314:47practicalli-johnYes, I have used Spacemacs for Clojure development for over 3 years now. It's really increased my productivity. It also stopped me wasting days and weeks (years) massaging my init.el file. There is very little config needed thanks to the layers, actually you can get Spacemacs to do it all as it will prompt you to add layers when you open certain file types. You can of course customise Spacemacs as much as you want. Another great thing is the community of contributors to Spacemacs (I am one too). As it's a community effort, then you get to use lots of other people's skills. I have used one person's config previously, but that does risk them abandoning the project. There is also a #spacemacs channel here and I also am writing a book (with Screencasts) on Clojure development with Spacemacs https://practicalli.github.io/spacemacs/ The most important advice, use the Spacemacs develop branch rather than the default master branch. develop is very stable and has been for the last 2 years or more.#2020-01-1318:31ag> it’s good but doom emacs is better imo Spacemacs community is huge (in relative terms). And they keep adding/improving things all the time. That means that things do break from time to time. But that doesn’t mean that Spacemacs is unstable. You absolutely can make your config stable and solid and upgrade with no fear. You just need to follow a few rules, the rules you should follow with any kind of configuration, be that Prelude, Doom, Spacemacs or anything else - you need to be cognizant about what you’re adding to it. Don’t add layers and packages without first studying them, learn what layer includes, see if you need those packages, ignore those that you won’t be using, avoid the bloat, minimize conflicts. I currently have over 300 packages installed. In the past three years I had only two or three times when after pulling the latest of Spacemacs things broke and it took me longer than ten minutes to figure out what the heck. Most of the time things break because of some upstream change - when a package that has some tighter integration gets an update. That’s not Spacemacs’s fault, but it needs to be fixed for that package. Exactly because of that it is recommended to use develop branch of Spacemacs, because things like that get fixed very fast. If you’re not using Spacemacs, you may feel FOMOed. With Spacemacs sometimes you may feel overwhelmed.#2020-01-1318:35agOverall - I’d recommend anyone (beginner or an Emacs-Jedi) to at least try Spacemacs. For a beginner it increases visibility of things - hidden gems of Emacs are there on the surface, waiting for you to be discovered. For a seasoned Emacsen it offers a lot of good stuff as well.#2020-01-1319:41sogaiui haven't used doom emacs as much as Nate Sutton, but so far my experience has been similar (i tried spacemacs first -- more than once). the doom maintainer was also helpful when i got stuck initially. i agree in general it's worth trying both though. what i did find helpful was plexus' chemacs -- that allowed me to use more than one version of emacs, so i could fall back on what i was more comfortable with.#2020-01-1320:00JcawDoom seems significantly better written than Spacemacs.#2020-01-1320:02JcawSpacemacs is horribly bloated with weird abstractions and indirections, and it's concrete.#2020-01-1320:02JcawI think the long-term prognosis for Doom is way better.#2020-01-1320:10deletedI do think that spacemacs has better mnemonics, though#2020-01-1320:20JcawDo you know how good the Spacemacs keybind ports are?#2020-01-1320:20JcawI'm definitely tempted to just wipe all the keybinds full stop and only bind commands I use often, but I don't want to lose the discoverability#2020-01-1320:22JcawYeah that's the issue. I'd like to discard the cruft so I can make everything shorter and reduce the surface area I have to think about, but I don't want to have to chase rabbits.#2020-01-1320:14JcawThis is the diff I needed to expose the 'visual line numbers option that was added to native Emacs. In a normal init file, this would be one line, (setq display-line-numbers 'visual), I had to navigate through 4-5 levels of indirection and basically restate Emacs' own documentation to get it merged. Totalled +58 -15 https://github.com/jcaw/spacemacs/commit/8cda80854948d888958f7742adb029973ba34775?diff=split#2020-01-1320:14JcawSo... I think Spacemacs is doomed#2020-01-1320:14JcawNo pun intended#2020-01-1320:16JcawI say this while still using Spacemacs lol. I'd like to switch to Doom at some point.#2020-01-1407:53jumarDoes anybody has this issue with Emacs on Mac OS X where you open (double click) a file which is associated with Emacs but it's opened in a completely new window? I'd like to open it in the existing frame. I tried (setq ns-pop-up-frames nil) but didn't work. I'm using 25.3#2020-01-1511:06yuhanDoesn't happen for me, I'm using emacs-mac distribution, 26.3#2020-01-1516:17bozhidarOver the weekend I’ve started working on https://docs.cider.mx/cider/cljs/overview.html (a dedicated section in the user manual for ClojureScript). It’s still in its early stages, but I’ll certainly appreciate any input and contributions from CIDER’s users, who are into ClojureScript development.#2020-01-1610:32yuhanhmm, does anyone else on the latest clojure-mode get a font lock bug with the following:
;; #_ #_
foo bar
where foo is wrongly given the commented face
#2020-01-1610:32yuhanI can't reproduce it with buttercup + make test#2020-01-1614:30j0nican't repro on a recent build of emacs master @qythium#2020-01-1614:33flefikHey, I’m using quelpa to fetch a package from a github repo. Like so: (recipe :fetcher github :repo "foo/bar") However the *.el files aren’t actually in the root of this repo, but in a subfolder. How can I pass an argument to the github fetcher to direct it where to look for the files?#2020-01-1618:02agmaybe try :path key ?#2020-01-1620:56flefikthanks!#2020-01-1621:19practicalli-johnIt's :file if it's the same as melpa, which it probably is. See my answer in #spacemacs#2020-01-1621:50flefikthanks :file did the trick#2020-01-1716:54Ian Fernandezwhats the variable that makes cider-repl does not pop after jack-in?#2020-01-1717:19practicalli-john@d.ian.b cider-repl-pop-to-buffer-on-connect#2020-01-1717:19Ian Fernandezthanks!#2020-01-1717:20practicalli-johnThank Spacemacs, that's where I found it 😁#2020-01-1808:49bozhidarBtw, that’s the very first topic in the REPL’s configuration guide https://docs.cider.mx/cider/repl/configuration.html 🙂#2020-01-3006:42solfAnyone using emacs from docker?#2020-01-3006:42solfI haven't given much thought, but I guess terminal emacs should be straightforward, gui emacs much harder#2020-01-3007:36solfActually I found this https://github.com/Silex/docker-emacs#2020-01-3007:37solfI haven't had the time to try it yet, but even in gui mode it seems straightforward to use#2020-01-3007:37solf
xhost +local:root # WARN: this comes with security issues
docker run -it --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix silex/emacs
#2020-01-3007:53solfJust tested it, I only played with it for 5 minutes but it seems to work flawlessly in GUI mode#2020-01-3011:12onetomthis seems like a good place to ask: how can you do remote pair-programming with emacs? I went thru https://www.emacswiki.org/emacs/CollaborativeEditing but nothing is very modern there... in the past i did quite a lot of pairing over the built-in VNC support of macOS, but that's often not feasible because of bandwidth constraints. (btw, i can highly recommend using https://www.zerotier.com/ to extremely easily put the pairing workstations on the same virtual subnet, so u can just connect to them with open when the Remote Management is turned on in System Preferences / Sharing and you set the Anyone may request permission to control screen option under the Computer Settings... dialog)#2020-01-3011:14onetoma colleague of mine mentioned that he heard in some podcast that TRAMP mode can help somehow with remote pairing too, but i suspect that's also some clunky, non-realtime solution... i made the lockstep module work once, btw. that was very promising, but then it stopped working... it's just too finicky#2020-01-3012:16practicalli-john@onetom I keep meaning to try the floobits layer for Spacemacs for collaborative editing. The package itself is at https://github.com/Floobits/floobits-emacs and I would be interested to know the experiences of anyone who has tried this.#2020-01-3012:17onetomi tried floobits a few years back when it came out, but what was off-putting for me is that i had to upload my source code to their servers to be able to collaborate on it#2020-01-3012:19onetomon top of that it meant i had no latest version available locally, which i could run. now this all might have changed since, but i doubt, since that would require to change the fundamentals of their idea#2020-01-3012:27onetomah, i remember now, what was my biggest grief. even though we could collaborate on editing the source code files, floobits doesn't help with sharing the experience of running it and interacting with the program.#2020-01-3012:29onetomas i see now, they have some supporting software to ease these pain-points: • https://floobits.com/help/floomatichttps://floobits.com/help/flootty#2020-01-3012:44onetom@U05254DQM you have great content, btw! i've just discovered it recently. i think it will help tremendously to get my colleagues into clojure easier and quicker.#2020-01-3012:45practicalli-johnThanks for the feedback, very helpful. It would be great to have a simple to use, editor to editor(s) collaboration tool that you can use with any editor. I tried the Atom Teletype (from Atom to Atom) and that worked okay, so long as you didnt switch files... so not great for a project.#2020-01-3012:45practicalli-johnOh, thanks for the comment about my content. There is so much more to do, so thanks for keeping me motivated 🙂#2020-01-3012:49onetomwe just dialled down our expectations and currently trying to use the terminal version of emacs within tmux (but via https://byobu.org/ for easy configuration, but of course it also has some issues under macOS). nothing is as well-polished as jetbrains ides 😞#2020-01-3104:03onetomi tried tmate before. not too bad indeed. i will keep it in mind, thanks!#2020-01-3014:37onetomim not sure how to google for this: i would like the point to move from the beginning of a line to the end of the previous line, when i press the left arrow, or h in evil mode. how can i configure spacemacs to behave like this?#2020-01-3018:08agwhy not just k and then $?#2020-01-3014:44dpsuttonwhat is the current behavior? hitting left error does precisely that for me#2020-01-3014:45kliph@onetom have a look at customizing Evil Cross Lines and check out the docs for evil-backward-char#2020-01-3021:16Eric IhliDamn this has me confused and I can't find anything online to help. (some-fn some-args) prints out the expected string in the mini-buffer. (with-current-buffer (get-buffer-create "foo") (insert (some-fn some-args))) only inserts about half of the expected string. Anyone have any idea why? Do I need to flush something? Possible encoding issue?#2020-01-3021:37Eric IhliAh. Hm. So. My function calls shell-command-to-string. I just saved the result off and ran the with-current-buffer again and it worked. So it must be something with stdout.#2020-02-0116:32Adrian Smith#2020-02-0208:43David PhamDid you try CLJ-kondo on the terminal to check if that works?#2020-02-0609:52tianshu@onetom what's your solution for now, I'm trying to find a way for remote pair-programming.#2020-02-0609:58onetomi still don't have a good solution. what i do have is all the pairing parties being on the same https://zerotier.com network, have their built-in mac remote management turned on with the "anyone can request permission" option and no password specified. that way u can just open and u see the same screen. it's very network intensive, but quite usable at lower screen resolutions. it also consumes less bandwidth, if the viewer scales down it's window. ah, and of course u have to enable the Control checkbox in the Options... dialog of the System Preference / Sharing / Remote Managment form.#2020-02-0610:03onetomwhat i also looked into just last night is to setup a nixos machine, because it can be configured declaratively, very concisely. then enable the per-user emacs daemon support in it. brew cask install xquartz start a bigger xterm with xterm -fa Mono enable middle click emulation with opt-click. ssh -Y nixos-host run emacseditor which is a wrapper script which connects to the running daemon. then u can use the make-display-frame or what, which everyone refers to; i haven't actually tried this step yet.#2020-02-0610:05onetomif u dont use the per-user emacs daemon support and start emacs via a remote desktop interface, then emacsclient -c will have X11 authorization errors, when u want to create a new frame via ssh.#2020-02-0610:06onetomi tried this locally using the latest nixos virtualbox appliance. this is how my /etc/nixos/configuration.nix looks like:
{ config, pkgs, ... }:

{
  imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix> ];

  # Let demo build as a trusted user.
nix.trustedUsers = [ "demo" ];
nix.binaryCaches = [  ""];
services.openssh.enable = true;
services.openssh.forwardX11 = true;
services.emacs.enable = true;
programs.ssh.startAgent = true;
programs.x2goserver.enable = true;
services.xrdp.enable = true;
services.xrdp.defaultWindowManager = "${pkgs.icewm}/bin/icewm";
# networking.firewall.allowedTCPPorts = [ 3389 ];
networking.firewall.enable = false;
}
#2020-02-0610:07onetomas u can see i've also tried the built-in RDP and x2go support they work too, but they were slow, even locally#2020-02-0610:31tianshuemmm, I'm using linux and my partner using mac. I think he won't install xquartz, it is a heavy stuff.#2020-02-0610:31tianshuwe all use emacs#2020-02-0610:34tianshuI think we can have per user emacs daemon, but that will be two instances, if we use the same daemon, we can't have different configuration.#2020-02-0611:06onetom80M /Users/onetom/Library/Caches/Homebrew/downloads/91b9d0c82398ac57be33a52922d5ed21ddf4b747516e70738f5ec6a2a9944d0c--XQuartz-2.7.11.dmg#2020-02-0611:07onetomi don't think it's an acceptable excuse that it's heavy... we can agree it's quite stupid to have these hefty dependencies, but there are a lot of more serious things which one should worry about...#2020-02-0611:09onetomand yes, that's correct, you can't have different configurations, just like u can't have different configs when u r physically sharing a monitor. but this is a social problem, which is independent from whether u r remote or local pairing.#2020-02-0611:10tianshuWe've tried use a remote server and tmux.#2020-02-0611:10tianshuit's pretty basic, we only have a shared repository. nothing more.#2020-02-0611:12tianshuBut I think almost every Emacs user have their own config, how do you solve this problem?#2020-02-0616:39onetomim an intellij+cursive user and im learning emacs, just so i can teach clojure to my colleagues easier... compared to that, having different emacs configs is a lot smaller problem :) cross-editor collaboration is very hard solve, but https://floobits.com/ seems very promising. i haven't tried it again since it was released, though, so i cant give my blessing.#2020-02-0616:56onetombut i agree, that the character based emacs is quite an eye-sore and behaves slightly different way than the graphical one, that's why i was looking into a solution which works with the graphical one. ssh -Y + XQuartz + make-frame-on-display might solve this quite well, i hope#2020-02-0618:25tianshuIs this solution work for Linux?#2020-02-0715:59onetomoh course, that's where is works the best#2020-02-1016:04tianshuHey, we finally decided to just use mosh + tmux + emacs, and use same one linux user but different .emacs.d folders. After some little tweaks to make our emacs configs work well in terminal, we enjoy our solution for now for backend development. mosh provide a very smooth typing experience.#2020-02-1114:00onetomdifferent .emacs.d folders sound like a good idea, but how does that work for emacs --daemon mode? can 2 differently configured emacs-es connect to the same daemon somehow?#2020-02-1114:08tianshuNo, you can. But in terminal mode, you can just press C-z /`fg` to switch between shell and emacs, so we don't need emacsclient on remote server.#2020-02-1114:14tianshusorry, you can't use emacsclient, typo#2020-02-0618:15iammilesDoes anyone have any experience using paredit with emacs-doom? I just installed doom, like it a lot, but I want to swap out smartparens for paredit (which I'm more familiar with)#2020-02-0619:05agM-x sp-use-paredit-bindings#2020-02-0619:57iammilesThat works great. Thanks, @U0G75ARHC!#2020-02-0908:02hkjelsSo, I have this regex that works when I use re-search-forward interactively, but not as a function in elisp. Any ideas as to why? The regex in question is: "^#\+include:\s-*\"\([^\"]+\)\"[^\n]*$"#2020-02-0908:16hkjelsSo, I found that backslashes must be double-quoted, but it still fails#2020-02-0908:49sogaiumay be this is of some help? https://emacs.stackexchange.com/questions/5568/why-do-regular-expressions-created-with-the-regex-builder-use-syntax-different-f#2020-02-0910:05hkjels@sogaiu wow! I’m now realizing that regex in emacs is way more complex than I thought Thanks though. This probably explains why it fails. Just need to grasp it first 🙂#2020-02-0910:06sogaiugood luck! i remember struggling with this, but all i remember is that it is tricky.#2020-02-1009:58tianshuIs there a multiple backends searching plugin(like helm or ivy) in Emacs? I'm looking for something works like IntelliJ's search everywhere.#2020-02-1009:59tianshuI want to have a switch to file in project, switch to existing buffer, M-x in one command.#2020-02-1107:59baptiste-from-paris@doglooksgood have you tried projectile ?#2020-02-1107:59baptiste-from-parisThere is a switch to project command 🙂#2020-02-1108:01tianshu@baptiste-from-paris I'm already using projectile, I want to combine multiple command into one command.#2020-02-1108:01baptiste-from-parisbut you can exactly do that with projectile#2020-02-1108:03bozhidarYeah, I guess you can just wrap the two things you need into one command.#2020-02-1108:03bozhidarThat should be pretty simple.#2020-02-1108:05tianshuemmm, I want something like
--Projectile Buffer--
src/a.clj
src/b.clj
--External Command--
cider-jack-in
--Buffers--
c.clj
*scratch*
#2020-02-1108:06tianshucombine these backend(or sources?) in one command.#2020-02-1108:07baptiste-from-paristhen I suggest you to read this 😄 https://github.com/alphapapa/emacs-package-dev-handbook#2020-02-1108:42hkjels@doglooksgood https://github.com/manateelazycat/snails I haven’t tried it myself, but it looks quite easy to combine multiple back-ends with it#2020-02-1110:12tianshu@hkjels yes, the behavior is what I'm looking for. but this won't works well on tilling window manager and emacsclient. @baptiste-from-paris @hkjels @bozhidar thanks for all the help.#2020-02-1123:24agIvy users, has anyone experienced the following bug? https://github.com/abo-abo/swiper/issues/2454#2020-02-1208:27EmmanuelOgaI just want to say... thank god for winner-mode 🙂 . winner-undo is a must for not missing minutes and hours of shuffling windows around.#2020-02-1208:52sogaiunever used it before -- do you have some favorite commands from it to recommend?#2020-02-1208:53sogaiuapart from winner-undo, that is 🙂#2020-02-1208:54sogaiuah, the only other command is winner-redo#2020-02-1209:26EmmanuelOgaindeed, minimalism is one of the features haha. Only redo and undo is available#2020-02-1209:28EmmanuelOgawhen it comes to windows there's also the rotate package that helps move windows between frames and change layouts. Still learning how to use it#2020-02-1209:40sogaiui appreciate there only being a few commands -- am more likely to try it out 🙂#2020-02-1210:39Piotr BrzezińskiHey! I’m trying to make emacs my main editor (switching from vsc). At work I currently use JS/typescript so I wanted to setup some syntax highlighting etc. I found that there are supposed to be packages like company-mode and typescrip-mode that I should install, but when I M-x and package-install or packages-list, these packages aren’t available to be installed. Why could that be? My init has these ->
(require 'package)
(add-to-list 'package-archives
             '("tromey" . "") t)
(add-to-list 'package-archives
             '("melpa" . "") t)
(add-to-list 'package-archives
             '("melpa-stable" . "") t)

(add-to-list 'package-archives
             '("marmalade" . "") t)
(add-to-list 'package-archives
             '("melpa2" . "") t)

(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
(add-to-list 'package-pinned-packages '(magit . "melpa-stable") t)
(package-initialize)
#2020-02-1212:02sogaiuso did you do 'U' (M-x package-menu-mark-upgrades) in the *Packages* buffer?#2020-02-1212:03sogaiufwiw, typescript-mode and company show up here in at least melpa and melpa-stable#2020-02-1212:04Piotr Brzeziński:thinking_face: I didn’t do the step you mentioned, let me see.#2020-02-1212:06sogaiufwiw, when i first to M-x package-list-packages, the list of things doesn't appear to fully populate immediately.#2020-02-1212:06Piotr BrzezińskiAh…I shouldn’t have looked for typescript-mode but just typescript instead?#2020-02-1212:07sogaiuhere there is a typescript-mode -- i don't see something that is just typescript#2020-02-1212:08Piotr BrzezińskiSuper weird.#2020-02-1212:08sogaiubtw, what is your emacs version?#2020-02-1212:09Piotr Brzeziński26.3 (I’m on osx)#2020-02-1212:09sogaiuok, that's the same -- i asked because typescript-mode has a requires here of emacs-24.3#2020-02-1212:10Piotr BrzezińskiDo you mind sharing your packages setup from init?#2020-02-1212:10sogaiujust a moment#2020-02-1212:10Piotr BrzezińskiMaybe there’s something messed up in my config.#2020-02-1212:11sogaiui have the following defined in my init.el and i call it in the same file#2020-02-1212:11sogaiuhttps://pastebin.com/84jp4zN9#2020-02-1212:15sogaiufwiw: https://stackoverflow.com/questions/24833964/package-listed-in-melpa-but-not-found-in-package-install#2020-02-1212:15sogaiualso: https://emacs.stackexchange.com/questions/2490/package-install-reports-no-match#2020-02-1212:16Piotr BrzezińskiI tried the code snippet you sent but am getting an error Invalid read syntax: . in wrong context#2020-02-1212:17sogaiuhmm...i'll double-check in the mean time, the last answer at the emacs stackexchange link might be worth a look#2020-02-1212:19sogaiui copy-pasted:
(defun package-settings ()
  (use-package package
    :config
    (package-initialize) ; XXX: wasn't getting full list of packages otherwise
    (add-to-list 'package-archives
      '("melpa" . ""))
    (add-to-list 'package-archives
      '("lambdaisland" . "") t)
    (add-to-list 'package-archives
      '("melpa-stable" . ""))
    (add-to-list 'package-archives
      '("replique" .
         "") t)))
evaluated the defun and then called the function. seemed to work here...
#2020-02-1212:21sogaiuah, if you don't have use-package, i guess it might not work#2020-02-1212:22sogaiuin any case, if you just use the parts after :config (with some suitable delimiter removal at the end) it should work.#2020-02-1212:22Piotr Brzeziński👍 working on it#2020-02-1212:22sogaiu
(package-initialize) ; XXX: wasn't getting full list of packages otherwise
    (add-to-list 'package-archives
      '("melpa" . ""))
    (add-to-list 'package-archives
      '("lambdaisland" . "") t)
    (add-to-list 'package-archives
      '("melpa-stable" . ""))
    (add-to-list 'package-archives
      '("replique" .
	"") t)
#2020-02-1212:23sogaiufwiw, that worked here via emacs -q#2020-02-1212:24sogaiubbiab#2020-02-1212:32Piotr BrzezińskiDunno lol, I copied your config, I went through the advices in link you posted and still can’t get the correct results.#2020-02-1212:33Piotr BrzezińskiNevermind, I will try and dig into it more later. Thank you for your assistance anyway @sogaiu#2020-02-1212:37sogaiu@peb.brzezinski hope it can work out for you before long#2020-02-1301:00practicalli-john@peb.brzezinski have you looked at Spacemacs? All you need to do is add the word typescript to your config or open a typescript file and it loads all the packages for you, along with any configuration ypuay need https://develop.spacemacs.org/layers/+lang/typescript/README.html#2020-02-1301:01practicalli-johnIf you try Spacemacs, checkout the develop branch, it's quite stable and has the most features.#2020-02-1307:54Piotr BrzezińskiThat’s nice. Thanks a lot, I’ll try spacemacs out 🙂#2020-02-1311:06Piotr BrzezińskiI installed spacemacs and got things to work, one question though - how do I set the indentation size in files?#2020-02-1312:05sogaiu@peb.brzezinski i am not a spacemacs user, but may be this will help? https://emacs.stackexchange.com/questions/37757/how-to-change-indent-size-for-typescript-layer-in-spacemacs -- i think it may depend on the major mode you are trying to change the indentation for.#2020-02-1312:06Piotr BrzezińskiThanks! I already managed to figure it out. I was able to set default indent size to 2 spaces, but I have like 978 other issues that I’ll have to figure out. Like auto formatting .js .ts .tsx files on save for example.#2020-02-1312:06Piotr BrzezińskiBut I’ll manage (hopefuly)#2020-02-1312:07sogaiuif you haven't already seen @jr0cket's material, may be you'll find this helpful: https://practicalli.github.io/spacemacs/#2020-02-1321:12Piotr BrzezińskiOk, let me give it a look 😄#2020-02-1321:12Piotr BrzezińskiI tried integrating clojure in vscode, but it was a pain 😕#2020-02-1409:15practicalli-johnhttps://calva.readthedocs.io/en/latest/ is an excellent extension for Clojure on VSCode#2020-02-1322:54Piotr BrzezińskiA we so me. Doom turned out to be my saviour. Everything works fine and I can 100% move to emacs.#2020-02-1323:46sogaiu(the doom emacs maintainer is great -- it was worth joining the doom emacs discord server for the support. thanks to Nate Sutton for the original suggestion :thumbsup: )#2020-02-1402:05agdoes anyone know what ivy uses for CIDER commands, i.e. when you press in , in cider repl buffer, I want things to be sorted, but I don’t know what key to use in ivy-re-builders-alist#2020-02-1405:07bozhidar@ag I assume ivy by default just displays the collections without reordering them. Probably the shortcut commands are not sorted internally.#2020-02-1405:10agnah… I think when I was using Helm it was fine (?) I don’t really remember now. But this is bugging me. For example I start typing cle and it shows:
clear-help-banner
clear-banners
clear
clear-output
what the heck? clearly, clear option, should be the first thing in the list
#2020-02-1405:24agyup, that’s totally on Ivy’s side. When I have this: (setq ivy-re-builders-alist '((t . ivy--regex-fuzzy))) - it works as expected. The problem with that - it affects every Ivy popup: counsel, swiper, counsel-M-x, etc. And I don’t like that.
#2020-02-1405:27agCurrently I have it like this:
(setq ivy-re-builders-alist '((counsel-projectile-find-file . ivy--regex-fuzzy)
                              (counsel-projectile-find-dir . ivy--regex-fuzzy)
                              (ivy-switch-buffer . ivy--regex-fuzzy)
                              (t . ivy--regex-plus)))
and this works for me. But I can’t figure out which one drives cider-repl shortcuts
#2020-02-1405:29agHoly cow… I found it. This works:
(setq ivy-re-builders-alist '((cider-repl-handle-shortcut . ivy--regex-fuzzy)
                              (t . ivy--regex-plus)))
#2020-02-1405:33agMagic of @bbatsov. Your mere presence straightens up my emacs-fu @bozhidar#2020-02-1405:40bozhidar😄#2020-02-1405:41bozhidarHappy to help with my magic presence! This might be some useful addition to the documentation. 🙂#2020-02-1610:57tvirolaiI’m having trouble getting Emacs to fetch packages. During startup, I get this:
Contacting host: 
Failed to download 'gnu' archive.
Package refresh done
Failed to download 'melpa' archive.
When starting the Emacs the --debug-init option, I get this:
Debugger entered--Lisp error: (file-error "make client process failed" "Permission denied" :name "" :buffer #<killed buffer> :host "" :service 443 :nowait nil :tls-parameters nil)
  signal(file-error ("make client process failed" "Permission denied" :name "" :buffer #<killed buffer> :host "" :service 443 :nowait nil :tls-parameters nil))
  package--download-one-archive(("gnu" . "") "archive-contents" nil)
  package--download-and-read-archives(nil)
  package-refresh-contents()
  (if (prelude-packages-installed-p) nil (message "%s" "Emacs Prelude is now refreshing its package database...") (package-refresh-contents) (message "%s" " done.") (prelude-require-packages prelude-packages))
  prelude-install-packages()
  eval-buffer(#<buffer  *load*-376635> nil "/Users/tuomo.virolainen/.emacs.d/core/prelude-packages.el" nil t)  ; Reading at buffer position 3589
  load-with-code-conversion("/Users/tuomo.virolainen/.emacs.d/core/prelude-packages.el" "/Users/tuomo.virolainen/.emacs.d/core/prelude-packages.el" nil t)
  require(prelude-packages)
  eval-buffer(#<buffer  *load*> nil "/Users/tuomo.virolainen/.emacs.d/init.el" nil t)  ; Reading at buffer position 4655
  load-with-code-conversion("/Users/tuomo.virolainen/.emacs.d/init.el" "/Users/tuomo.virolainen/.emacs.d/init.el" t t)
  load("/Users/tuomo.virolainen/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x400d1a6d>)()
  command-line()
  normal-top-level()
Any ideas where the issue might lie?
#2020-02-1611:03sogaiuare you able to connect to https://elpa.gnu.org using a web browser?#2020-02-1611:03sogaiuspecifically using https://elpa.gnu.org ?#2020-02-1611:04sogaiuor wget#2020-02-1611:06tvirolaiYes, the browser works#2020-02-1611:06tvirolaiAnd ping too#2020-02-1611:08sogaiui hesitate to suggest using http over https, but does anything change if you use http instead of https for the urls for packages?#2020-02-1611:11tvirolaiSadly, no#2020-02-1611:12sogaiui take it that this is not a fresh installation or ugprade of emacs -- and that things worked not that long ago#2020-02-1611:16tvirolaiThis is a fresh installation on a new machine. But a strange thing is that I already managed to get it working once, but after running into other issues I did a reinstall and now there’s this. Now I’ve tried installing different versions from different sources and different settings packages (like Prelude and Spacemacs, and a fresh init.el too) but nothing seems to help.#2020-02-1611:17sogaiulong shot: saw this recently: https://emacs.stackexchange.com/a/33083#2020-02-1611:17tvirolaiThanks, I’ll try that#2020-02-1611:33tvirolaiIt seems that those install options are deprecated. But it might be related to my problem. I tried compiling Emacs from source, and the configure script gave the following error:
configure: error: The following required libraries were not found:
     gnutls
Maybe some development libraries/packages are missing?
If you don't want to link with them give
     --with-gnutls=no
as options to configure
#2020-02-1611:35tvirolaiAlthough Homebrew says that gnutls is installed and up-to-date…#2020-02-1611:46sogaiuhmm...i haven't used macos recently so i'm not sure what the recommendations are these days regarding emacs, but may be the following could help? https://emacsformacosx.com/#2020-02-1612:12tvirolaiThanks, but doesn’t work either 😞 But I tried installing something called emacs-plus and that seems to work!#2020-02-1612:18sogaiuah, congratulations!#2020-02-1612:20tvirolaiThanks for the help!#2020-02-1614:01practicalli-john@tvirolai there is an issue in Emacs 25 with certificates which maybe the cause. If you are not using Emacs 26.3 or higher, I suggest getting a newer version.#2020-02-1723:21vemvI think a couple years ago I had a git diff setup such that it displayed the diffs inline, within the current buffer (as opposed to allocating a distinct buffer just for the diffs) Maybe it was magit-based. The result looked similar to when one resolves merge conflicts with vc mode: some lines would be applied a green background, others a red one. Anyone has a such a setup? Can't find a satisfactory answer#2020-02-1723:28vemvMaybe I abandoned the idea back then because clojure-mode coloring wouldn't play nicely with git diff coloring... eg. syntax would look broken#2020-02-1723:32vemvAh yes now I'm remembering better... for the following screenshot (very similar to what I had in mind), if both red and green lines start with ( but don't close with a ), that would screw things:#2020-02-1723:32vemv#2020-02-1808:51practicalli-johnI only use that view in Magit status, especially when staging specific lines of a change. For the source file buffer, I have marks in the right hand fringe which shows the lines that have changed, but not the diffs. I use vc-ediff if I want to compare the working copy to the HEAD commit. That seems to cover everything for me.#2020-02-1813:17ak-coramI also use diff-hl in combination with magit: https://github.com/dgutov/diff-hl#2020-02-2012:34vemvhey guys, I had forgotten about this one sorry looks like you both use a "fringe-based" approach. how well does it work for you? I recall giving a serious try to https://github.com/syohex/emacs-git-gutter but I had to desist as I found out it's an unmaintained program with some several flaws (things could easily fall out of sync, etc) Now I'd be a bit afraid of investing time in integrating a new lib again...#2020-02-2016:27practicalli-johnThis is my config, works really well for me. https://practicalli.github.io/spacemacs/source-control/add-layers.html I use fringe as an indicator of change. To stage, commit or push I use magit status#2020-02-1813:51joost-diepenmaatHi, I’m working on some code for my own use which I’d like to run from the CIDER repl. It needs to ask for user input and I’d like to provide an editable string (prefilled answer) and in other places a list editable items#2020-02-1813:51joost-diepenmaatsimilar to ido-completing-read.#2020-02-1813:52joost-diepenmaatis there anything available that would let me hook into that emacs functionality from CIDER/clojure?#2020-02-1911:20Piotr BrzezińskiHey! Did anyone here manage to get syntax highlighting in .tsx files working? I’m using doom emacs and it works almost fine.#2020-02-1911:21Piotr BrzezińskiThis is the only part I’m missing. The TSX part isn’t highlighted (components structure), but everything else in the file is, like ->#2020-02-1920:46David SchmidtIf you figure this out, please let me know. I’m working on trying to get the same thing set up (but in spacemacs). Also, does your indentation get totally messed up when you do a newline inside of actual tsx tags?#2020-02-2013:01Piotr Brzeziński@UR070V08P I just noticed your message. It doesn’t get totally messed up but it’s acting super random for some reason. An answer I got from the creator of doom emacs yesterday:
By default, we use web-mode for tsx files, since typescript-mode has no support for them (last I checked). You can force it to use it anyway with (add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)) in your config.el. Completion may work then, but you may have other issues that way
so I’m not sure if there’s a reliable way of working with tsx. I’m about to check if that change works.
#2020-02-2013:03Piotr Brzeziński(No luck unfortunately)#2020-02-2013:08Piotr BrzezińskiAnyway, if you find an answer to this, please do share it. I think I’m giving up on the highlighting in tsx for now ¯\(ツ)/¯#2020-02-2012:25orestisI thought I liked swiper, but turns out I don’t — I hate it that I have to retype my search all the time, and that search results are not highlighted in the buffer. I think that Vim’s plain old * is a much better experience, or a list of results in some different buffer. Any packages that do that?#2020-02-2120:54tianshuivy has a command ivy-resume, if I remeber correctly. You can use it to resume the previous popup, including swiper. It also has a ivy-occur, bound to C-c C-o in the minibuffer.#2020-02-2218:07gonewest818with swiper you can repeat your most recent search by typing C-s a second time, at the Swiper: prompt in the minibuffer.#2020-02-2218:11gonewest818note the ivy-occur binding C-c C-o is active in the swiper minibuffert.#2020-02-2014:22ziltievil has it#2020-02-2015:07mpenetmore likely an issue with your theme for highlighting#2020-02-2015:08mpenetworks on my machine©#2020-02-2015:08mpenetfor retyping it's just a different keybind than with isearch, you just M-p to get to the last one#2020-02-2113:14MarisDoes clj-refactor work with cider 24 ?#2020-02-2113:14MarisDebugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "edn") require(edn) eval-buffer(#<buffer load-214271> nil "/Users/maris/.emacs.d/elpa/clj-refactor-20200219.1038/clj-refactor.el" nil t) ; Reading at buffer position 1902 load-with-code-conversion("/Users/maris/.emacs.d/elpa/clj-refactor-20200219.1038/clj-refactor.el" "/Users/maris/.emacs.d/elpa/clj-refactor-20200219.1038/clj-refactor.el" nil t) (cljr--inject-jack-in-dependencies) (lambda nil (cljr--inject-jack-in-dependencies))() eval-after-load-helper("/Users/maris/.emacs.d/elpa/cider-0.24.0/cider.elc")#2020-02-2113:39Marishttps://github.com/clojure-emacs/clj-refactor.el/pull/463/commits/954446bd74e19649f4c58a349f235f7e667f4f24 👍#2020-02-2115:56bozhidar@maris.orbidans This was fixed a couple of hours ago.#2020-02-2115:57bozhidarI had made a silly mistake - updated the code usages, but forgot about the require. Funny enough all the tests passed. 😄#2020-02-2117:13Maristhank you#2020-02-2201:11richiardiandreaI there, I have a colleague which is trying to move to emacs and he is using Spacemacs#2020-02-2202:16agC-o is a default keybinding used in Evil. it’s bound to evil-jump-backward#2020-02-2201:11richiardiandreahe is missing the back to file functionality on Intellij and I was wondering if somebody has a way to jump back and forth to buffers#2020-02-2201:11richiardiandreawe found https://github.com/rolandwalker/back-button#2020-02-2201:12richiardiandreabut unfortunately it does not work in Spacemacs#2020-02-2202:09deletedit miiiiight be this one https://github.com/gilbertw1/better-jumper/blob/master/Readme.md#2020-02-2202:12richiardiandreaOh thanks this looks cool#2020-02-2202:12richiardiandreaWill try it out#2020-02-2207:46practicalli-john@richiardiandrea SPC TABtoggles to the previous buffer, allowing you to switch to the previous file you were editing. The cursor should be on the same place as when you left SPC p atoggles between source and test code, SPC s a toggles between repl and source code. The first two come with Spacemacs by default, the third is Clojure specific. There are some other ideas at https://practicalli.github.io/spacemacs/working-with-projects/ We also recommend using the Spacemacs develop branch at the moment. Feel free to join the #spacemacs channel for Spacemacs specific questions#2020-02-2207:55practicalli-johnYour colleague may also find markers useful for jumping around https://practicalli.github.io/spacemacs/navigating-code/markers.html#2020-02-2217:07richiardiandreaThanks for answering! Does it work only in the current buffer or across buffers?#2020-02-2418:14practicalli-johnMarkers seem to only work in a single buffer.#2020-02-2301:34EmmanuelOgaHello! I'm trying to open java files directly from an exception stacktrace. It seems like I'm missing some source files. Example: *messages* logs Unexpected archive: /usr/lib/jvm/openjdk-8/src.zip [4 times] when I try to open some of the entries#2020-02-2301:34EmmanuelOgaI'm guessing there must be some sort of way to setup the search path for these files#2020-02-2301:35EmmanuelOgaoh! does this also come down to the classpath?#2020-02-2301:35EmmanuelOgaI'm confused why /usr/lib/jvm/... is being search if I'm using windows#2020-02-2302:02EmmanuelOgaI'm gonna experiment with adding paths to :extra-paths in deps.edn#2020-02-2302:02EmmanuelOgahttps://clojure.org/reference/deps_and_cli#_make_classpath#2020-02-2302:06EmmanuelOgaSomeone reported my exact problem here#2020-02-2302:06EmmanuelOgahttps://github.com/clojure-emacs/cider/issues/2745#2020-02-2302:08EmmanuelOgaso maybe an issue in this file:#2020-02-2302:08EmmanuelOgahttps://github.com/clojure-emacs/cider/blob/6ad997e7f35a303757d15d5498e567182678163c/cider-util.el#L780-L799#2020-02-2302:31EmmanuelOgagod working with paths on windows... the pain#2020-02-2302:31EmmanuelOgathis is most likely the fix to my problem:#2020-02-2302:31EmmanuelOgahttps://docs.cider.mx/cider/config/basic_config.html#_use_a_local_copy_of_the_java_source_code#2020-02-2302:32EmmanuelOgabut setting a simple path on that list variable is an ordeal#2020-02-2303:07EmmanuelOgadamn it, I solved my own problem#2020-02-2303:07EmmanuelOgatears of joy 😛#2020-02-2303:07EmmanuelOgagonna document on that issue#2020-02-2303:26EmmanuelOgahttps://github.com/clojure-emacs/cider/issues/2745#issuecomment-590022133#2020-02-2303:26EmmanuelOgahttps://github.com/clojure-emacs/cider/issues/2745#issuecomment-590022133#2020-02-2303:27EmmanuelOgaalso experimenting a bit with usage patterns of slack. Sorry if I annoy ppl a lil or a lot 🙂#2020-02-2303:27EmmanuelOgaoh! talking about annoying ppl. I'm not sure but I may be talking to myself in the wrong channel. Cider seems a lot more appropriate for this issue.#2020-02-2306:22vinnyataidehello! how can I send a (go) command to my repl when I save a clj file?#2020-02-2306:23vinnyataideor it could be a shortcut on my keyboard that I could do after I save the buffer#2020-02-2306:27dpsuttonWrite a function that saves the buffer and sends a command to be evaluated. I doubt you’d want to get wrapped up in a saved hook#2020-02-2306:51dpsutton
(defun save-and-send-thing ()
  (interactive)
  (save-buffer)
  ;; will eval
  (cider-interactive-eval "(prn \"hi\")")
  ;; will put in repl and eval
  (cider-insert-in-repl "(prn \"hi\")" t))
#2020-02-2307:00vinnyataide@dpsutton thanks! yeah that would be a very icky false positive situation#2020-02-2307:14tianshuCan I make an overlay actually hold a position not floating on a point?#2020-02-2315:30zilvinasuHey folks, any ideas how to avoid having add-missing-libspec show up on every single line on ?#2020-02-2315:44dpsuttoncan you explain what you mean?#2020-02-2318:38Nir RubinsteinHi guys - anyone using doom emacs? Latest update broke company mode for clojure - can't select options with arrows for some reason. Any idea how to get over it?#2020-02-2318:51ericdallo@nirrub, I upgraded too but for me its working well using clojure-lsp#2020-02-2318:59Nir RubinsteinHmm... Using vanilla Cider with company mode and it fails to work. I'll try and dig deeper#2020-02-2319:08Nir Rubinstein@deleted-user - thanks! tried the discord channel but no response yet. I’ll try reverting for now and see if a fix will come later. :thumbsup:#2020-02-2319:13dpsuttoncan you try M-x company-complete-common?#2020-02-2319:35zilvinasu@dpsutton it just shows up as some sort of linting error, give me a sec will make a screenshot, it comes form clojure-lsp#2020-02-2319:36zilvinasu#2020-02-2319:37dpsuttonoh yeah i remember trying out that lsp-hud (or whatever its called) and abandoned it.#2020-02-2319:37zilvinasu@dpsutton without that, refactoring capabilities are kind of broken, can’t rename .symbols and etc, do you use emacs ?#2020-02-2319:38dpsuttonyeah i use emacs. I don't have the lsp-hud enabled just lsp-mode#2020-02-2319:39zilvinasuI don’t know what is lsp hud 😕#2020-02-2319:39zilvinasuor how to disable it#2020-02-2319:41dpsuttoni think its https://github.com/emacs-lsp/lsp-ui lsp-ui i was thinking of. do you use that?#2020-02-2319:44zilvinasuI don’t think so, I just had it auto enabled by doom emacs#2020-02-2319:45dpsuttoni'll put my lsp-config here if it helps you. no idea what doom does though.
(use-package lsp-mode
  :init
  (setq lsp-clojure-server-command '("bash" "-c" "cd ~/projects/clojure/clojure-lsp && lein run"))
  (setq lsp-enable-indentation nil)
  (setq lsp-enable-completion-at-point nil)
  ;; (setq indent-region-function #'clojure-indent-function)
  (add-hook 'clojure-mode-hook #'lsp)
  (add-hook 'clojurec-mode-hook #'lsp)
  (add-hook 'clojurescript-mode-hook #'lsp)
  :config
  (require 'lsp-clojure)
  (add-to-list 'lsp-language-id-configuration '(clojure-mode . "clojure"))
  (add-to-list 'lsp-language-id-configuration '(clojurec-mode . "clojure"))
  (add-to-list 'lsp-language-id-configuration '(clojurescript-mode . "clojurescript")))
#2020-02-2319:45dpsuttonyou can go compare to what doom is doing and see if anything sticks out#2020-02-2319:57zilvinasuthanks, will check#2020-02-2321:36ericdalloYeah, this is clojure-lsp with lsp-ui .#2020-02-2321:36ericdalloI have mine configured here if it helps: https://github.com/ericdallo/dotfiles/blob/master/emacs/.doom.d/config.el#L216#2020-02-2321:51zilvinasu@ericdallo thanks, will check!
(setq
 lsp-diagnostic-package :none
 lsp-ui-sideline-show-code-actions nil)
this seem to have helped to avoid the issue
#2020-02-2403:05agSo, I’ve been trying to use lsp for a few weeks now. My main struggle with it - the speed. For a bunch of reasons connecting to a lsp server would make things laggy. Sometimes it would be just a bit slow, at times it would be totally awful. After a bunch of different attempts I was able to make it somewhat manageable. Here are my suggestions: - Use latest Emacs version >= 27, with jansson support - Try tweaking gc-cons-threshold - Follow tips listed in https://github.com/emacs-lsp/lsp-mode#performance - Try to minimize things, if you’re using Spacemacs, avoid official lsp layer (it includes too much stuff) - Don’t use lsp-ui - Disable everything you don’t need, here are my values:
(setq lsp-eldoc-enable-hover nil
          company-lsp-cache-candidates 'auto
          lsp-after-open-hook nil
          company-lsp-enable-snippet nil
          lsp-enable-symbol-highlighting nil
          company-lsp-enable-recompletion nil
          lsp-prefer-capf t
          doom-modeline-lsp nil)
Hope this helps
#2020-02-2403:35solfWhat languages/backends do you use with lsp?#2020-02-2405:38agI use it only for clojure right now#2020-02-2404:29EmmanuelOgaprobably not, there's not even a release candidate for 27 tagged yet: https://git.savannah.gnu.org/cgit/emacs.git/refs/tags#2020-02-2405:37agIt’s not, but afaik 26 can’t be patched to support jansson. Jansson is a C library for encoding, decoding and manipulating JSON. lsp with jansson is much more faster.#2020-02-2405:42ag@yyoncho reports that elisp native compilation makes it even more faster (like 300% more). I can’t wait for it to be released. Sadly, it would probably take at least another year or so.#2020-02-2411:57practicalli-johnI believe that elips native compilation is a branch off Emacs 28 at the moment, so yes, a little while before that is generally available.#2020-02-2411:39ziltiElisp native compilation? Are they finally migrating over to Guile? 😛#2020-02-2518:19aghttps://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00225.html#2020-02-2416:58codeasone@deleted-user I've been using GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2020-02-22 (updating from HEAD) weekly for months now without issues - using cider and clojure-mode pinned to MELPA stable#2020-02-2416:58codeasoneMy cider particulars are:
;; Connected to nREPL server - 
;; CIDER 0.24.0 (India), nREPL 0.6.0
;; Clojure 1.10.1, Java 11.0.5
;;     Docs: (doc function-name)
;;           (find-doc part-of-name)
;;   Source: (source function-name)
;;  Javadoc: (javadoc java-object-or-class)
;;     Exit: <C-c C-q>
;;  Results: Stored in vars *1, *2, *3, an exception in *e;
;;  Startup: /usr/local/bin/clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/piggieback {:mvn/version "0.4.2"} refactor-nrepl {:mvn/version "2.4.0"} cider/cider-nrepl {:mvn/version "0.24.0"}}}' -A:dev:test:system-test:backend:frontend -m nrepl.cmdline --middleware '["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"]'
;;
;; ClojureScript REPL type: figwheel-main
#2020-02-2417:07deletedI'll bet I can get emacs-plus head from homebrew#2020-02-2418:28agbrew install emacs-plus --HEAD --verbose --with-jansson --with-xwidgets#2020-02-2418:16practicalli-johnThe Emacs team are working on a release for Emacs 27 and started discussing that back in November 2019. Not sure how long it will take (not as long as Emacs 21).#2020-02-2418:22practicalli-johnIf you use Ubuntu Linux you can get nightly builds of Emacs 28 as via the emacs-snapshot package by adding the Ubuntu Emacs Lisp private package archive https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa I have been running Emacs 27 snapshot from there for a while. As it called a different name, you can have both Emacs stable and snapshot installed an run which ever version you want.#2020-02-2418:38deletedI wonder if I can have two versions in homebrew as well#2020-02-2420:19practicalli-johnMy understanding is Homebrew only provides the release. You could try creating your own tap though, but not sure if that overrides the usual brew.#2020-02-2509:32zilvinasuHey folks, what do you use for linting in emacs? to show possible refactorings and etc, I remember using something like eastwood in the past#2020-02-2509:33bozhidarBesides eastwood there’s kibit and clj-kondo.#2020-02-2509:33bozhidarI assume you remember kibit as the one suggesting refactorings.#2020-02-2509:33zilvinasuyeep kibit#2020-02-2510:00practicalli-johnI use clj-kondo for live liniting of Clojure, which also suggest some refactoring. I occasionally use kibit as a batch process or part of a CI build process#2020-02-2511:30vemvRecently we OSSed https://github.com/nedap/formatting-stack/ . It's pretty emacs-y in that it bridges cider and cljfmt indentation. It also gathers various linters and presents them under a unified, repl-oriented format#2020-02-2517:22dadairI tried it out yesterday and was getting an exception that something in cljs was not found (my project is pure clj, no clj{c,x,s}). Tried the 4.0.0 version. Is that something known?#2020-02-2517:22dadairI was using the integrant integration#2020-02-2520:57vemvAdd :exclusions [org.clojure/clojurescript] to your project (or equivalent)#2020-02-2520:58vemvIt's an intrincate issue I have little control about... still, I'lll try to document it better#2020-02-2516:52dadairIs there any way to change the column limit wrap value on clj-refactor namespace cleanup? e.g., long require .. :as .. being split to multiple-lines at a certain column limit#2020-02-2517:09tianshuIs there any document I can check to make a company-like pseudo frame? I think that is made with overlay, but it seems I can't create a overlay with an ... absolute position.#2020-02-2517:19tianshuEmmm, found popup.el. anyway it do what I need#2020-02-2517:20dadairThere's also https://github.com/tumashu/posframe; haven't' used it personally, just ran across it this morning#2020-02-2517:50tianshuthanks! I knew posframe, but it's a little bit slow in my use case.#2020-02-2802:28gonewest818dimmer is an Emacs minor mode that indicates which buffer is currently active by “dimming” the faces in the other buffers. I pushed some fixes to MELPA today... https://gonewest818.github.io/2020/02/dimmer.el-20200227.1712/#2020-03-0107:43orestisI’m using this! Thanks :)#2020-02-2814:05vemvGiven:
(foo
 (bar
  (baz)))
... is there a trick to swap foo and bar in one step? Obtaining:
(bar
 (foo
  (baz)))
Ideally this would work in a paredit-like manner, although a dumb textual transposition might work also
#2020-02-2814:07aisamuConvolute!#2020-02-2814:09aisamuparedit-convolute-sexp, sp-convolute-sexp, lispy-convolute#2020-02-2814:10vemvHaving some luck with M-x paredit-convolute-sexp. Thanks!#2020-02-2821:57sogaiureminded of: https://youtu.be/D6h5dFyyUX0?t=98 (magnars' words just before 2:00 keep coming up 🙂 )#2020-03-0112:33lispycloudsAny *Doom Emacs* users use any safe structural editing modes here? If yes, how do you configure it?#2020-03-0112:41Nir RubinsteinI use doom. As for safe editing, I use it. I’ts pretty much auto configured. I added in my config the following:
(add-hook! smartparens-mode
  (evil-cleverparens-mode)
  (evil-unimpaired-mode)
  (smartparnes-strict-mode))
#2020-03-0112:42Nir RubinsteinSince smartparens is enabled by default (AFAIK) Keep in mind that I’m an emacs noob so this my be overkill/incorrect - YMMV#2020-03-0112:49lispycloudswould i need to install evil-cleverparens-mode for it?#2020-03-0112:50lispycloudsdont think that exists by default? I too am just starting out with Doom#2020-03-0112:50Nir RubinsteinYup - just add it to packages.el in your doom directory#2020-03-0112:51Nir RubinsteinI also added unimpared - you can just delete it if you don’t use it (it’s from my vim days)#2020-03-0112:55lispycloudsI added (package! evil-cleverparens) in packages.el and
(add-hook! smartparens-mode
  (evil-cleverparens-mode)
  (smartparens-strict-mode))
in config.el but i can still delete the closing braces, what i am missing?
#2020-03-0113:04lispycloudswhat i want is the (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks) like behaviour. But cant find its source to copy too 😕#2020-03-0113:52lispycloudsyeah i did that#2020-03-0113:52lispycloudsI should not be able to delete closing parens, braces right?#2020-03-0115:12lispycloudsah, the mode is activated. the spacemacs one doesnt let me delete the closing ones in addition to this too. was hoping i can get that behavior here too#2020-03-0116:01Nir RubinsteinFor me, deleting occurs, but it deletes both the opening AND the closing parens - thus keeping my s-expression balanced#2020-03-0118:40lispyclouds@U0JLDMT9P does it work for example in (def a (+ 1 2)) and I delete the ) after 2? The one before + is deleted too? Or only if the sexp is empty? The first case is not possible in spacemacs.#2020-03-0118:41lispyclouds@U8QBZBHGD that was my intent too. But failing to find where that could be defined #2020-03-0118:46lispycloudsOr I guess I will reset my head and muscles and just follow doom 😄 really liking its snappy speeds and lean features, specially compared to spacemacs. Thanks for the pointers @U8QBZBHGD #2020-03-0120:10practicalli-johnSounds like smart-parens is not in strict mode, if you can delete parens and leave them unbalanced.#2020-03-0120:15romainAfter modifying config files you have to do doom refresh :)#2020-03-0120:26lispyclouds@U050PEFK2 yes i did that pretty much after every change 🙂#2020-03-0120:27lispyclouds@U05254DQM where can i find the impl of (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks) ?#2020-03-0120:29lispyclouds@U050PEFK2 still I'm able to delete the closing braces and leave it unbalanced. These are all the changes I made in config.el:
(add-hook! smartparens-mode
  (smartparens-global-strict-mode))
it says the strict mode is on and also I cannot _add a ) back after i have unbalanced it. it says cannot do that in strict mode 😕
#2020-03-0120:31lispyclouds#2020-03-0120:35practicalli-johnI believe that toggle code is generated by other code, so no explicit code to copy.#2020-03-0120:38lispycloudsah okay#2020-03-0120:41practicalli-johnAre you deleting close parens in Evil insert mode or Evil normal mode#2020-03-0120:43lispycloudsin insert mode#2020-03-0120:49practicalli-johnVery strange then. Unless something is broken with the package, then it sounds like something is conflicting with something else in doom or another package. I am just guessing now (not a doom user)#2020-03-0120:54lispycloudsyeah im beginning to think so too. I have asked this on their discord channel now. fingers crossed! Thanks for the help @U05254DQM#2020-03-0122:20romainMaybe Try to reach henrik on doom’s discord?#2020-03-0216:33iammilesI removed smartparens in favor of paredit. Works pretty well for me.#2020-03-0223:27ag> I removed smartparens in favor of paredit. Why though? you could just do M-x sp-use-paredit-bindings#2020-03-0300:17iammilesFor the reason that was mentioned earlier: smartparens allows me to unbalance parens a little too easily. I find that paredit makes that a bit more difficult.#2020-03-0301:20nmkipIs there a package that prevents me from deleting parens in normal mode?#2020-03-0309:06practicalli-john@UJCC6CE9E smartparens in strict mode prevents deletion of parens where that would make them unbalanced. smartparens is included in Spacemacs (a simple config to set to strict mode). There seems to be an issue using smartparens in Doom for some people.#2020-03-0501:50nmkipIt seems to be working with evil-paredit in Doom#2020-03-0501:50nmkipI'm still deciding between Doom and Spacemacs (and cursive which is the one I usually use 🙂 )#2020-03-0301:23nmkipIs there a package that prevents me from deleting parens in normal mode (evil)?#2020-03-0301:26nmkipevil-paredit did the trick#2020-03-0315:39practicalli-johnAnyone using ctags successfully with Clojure to jump to definitions and other symbols? I have ctags installed and can create a local database of tags using helm gtags and choosing the ctags backend, but searching on tags does not seem to find anything. I am wondering how to debug this issue. This is my first time using gtags/ctags#2020-03-0319:15andrea.crottiI think dumb-jump is a better choice @jr0cket#2020-03-0319:30practicalli-johnYes, I haven't really felt the need for ctags/gtags, but I was curious as they seem common in other languages. Although I can get a ctags dictionary generated for a Clojure project, , I failed to get Emacs gtags to work with it or generate its own gtags for the Clojure project. So without further inspiration, I will abandoned ctags. I have plenty of other things to discover.#2020-03-0319:16andrea.crottiI use that as fallback when I don't have a cider connected#2020-03-0321:00agwith lsp you can jump to definitions, it’s more reliable than anything else. Caveat? It still takes some time to start. I wish someone tried wrapping clojure-lsp with Graal#2020-03-0321:02practicalli-johnI will have a look as LSP although haven't looked into how to set up the Clojure side of things for Spacemacs. Adding the lsp layer is easy enough, but my understanding is you need to configure something for each specific language.#2020-03-0321:33ziltiWhy does it matter if Clojure-LSP takes three seconds to start? How often are you restarting your editor?#2020-03-0321:50agYeah, it’s just a minor annoyance, I agree. Still would be very nice if it started faster. Having to wait for both lsp-server to start and then CIDER to jack-in a bit too much#2020-03-0321:37dpsuttonat work i have a single long running process. at home i play with shadow and do lots of one offs and read lots of code from different projects. this kills my machine as viewing a deps.edn file or reading files in random projects starts up lots of jvms#2020-03-0321:37dpsuttoni don't know how to kill an lsp session so i'll killall java occasionally#2020-03-0321:51ziltiWhy even kill lsp at all? It isn't meant to be handled by you at all#2020-03-0321:59agyeah, you can just disconnect#2020-03-0322:01dpsuttonbecause if i leave emacs open and read a file from three different projects i have 4 lsps open and my repl#2020-03-0322:03dpsuttoni run out of cpu and memory#2020-03-0322:20agI’m not exactly sure what you mean, M-x lsp-disconnect doesn’t work?#2020-03-0322:21dpsuttoni think i had missed that one. i think i had been searching for close#2020-03-0322:21dpsuttonbut that should solve my woes. thanks!#2020-03-0323:35agthe problem with lsp-disconnect - lsp injects lsp related hooks, etc. but doesn’t clean up after itself, so for example you do lsp-disconnect, but imenu would be broken#2020-03-0400:35sogaiufwiw, https://github.com/sogaiu/alc.index-defs will generate TAGS (etags) / tags (ctags) for clojure source projects. i use emacs with the generated TAGS file -- it works with the dependencies as well. i use the ctags output for other editors (e.g. vscode).#2020-03-0411:06practicalli-johnLooks very interesting, I will give it a try, thank you.#2020-03-0411:16sogaiuhowever it turns out, i hope you can find some good jump-to-def solution -- can be so helpful in maintaining concentration and focus.#2020-03-0909:29dotemacsThanks for sharing this @UG1C3AD5Z it reminded me a bit about this project: https://github.com/sanel/lein-codeindex#2020-03-0909:36sogaiuthanks for taking an interest! ah, i see it's by the author of monroe -- nice! lein-codeindex may be more useful now than before because the universal ctags side of things has improved their clojure support somewhat in recent times. i would guess it's faster than alc.index-defs too. i don't know what's involved in getting ctags and/or friends to go over the dependecies of one's project. do you happen to know? i'm guessing that alc.index-defs does a somewhat more accurate (and broader?) job of analyzing things because it uses clj-kondo (assuming i didn't mess things up 🙂 )#2020-03-0909:39sogaiubtw, you might find this of interest if you haven't seen it already: https://github.com/jpmonettas/clindex (maintainer was very nice too)#2020-03-0914:53dotemacsOh, wow, this is very cool. TIL. I was even “fantasising” that when I get some free time, it would be cool to create a tool that would be a replacement for what (now dead) service used to do: index all the opensource projects and make them available for reference. Looks like this tool handles most of that now. Obviously it would need some extra work, but it would be a useful resource.#2020-03-0915:12dotemacsThe reason clindex resonated with me is because it reminded me of this post: https://outline.com/2eMR6C#2020-03-0400:36sogaiuit uses clj-kondo to perform the analysis -- it is thorough but definitely not real-time.#2020-03-0501:50practicalli-johnThe first pretest version for what will be the Emacs 27.1.0 release is available https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00045.html#2020-03-0502:57solfAny way to limit the size of the output of org-babel-execute? Sometimes the result is a huge json dump that of course crashes emacs#2020-03-0914:03practicalli-johnIt is possible to configure projectile to recognise a project within another project? I have a ~/projects/exercism/clojure directory that is managed by Git. That directory contains several Clojure projects. I would like to use projectile-toggle-between-implementation-and-test whilst in a specific Clojure project, eg ~/projects/exercsim/clojure/bank-account to switch between source and test. Unfortunately, it cant switch as projectile believes is a generic project, I assume because there is a .git directory in the parent of bank account. So is there a way, for example using a dir.local.el to tell projectile to use the bank-account directory as the root of the project when any file from the bank account directory is open. I have tried a few experiments, but nothing has worked yet.#2020-03-0914:40practicalli-johnI found a solution to my project within projects. As they are all the same type of project, clojure-cli (well actually they are Leiningen projects, but the same pattern matching is used) then I added a dir.local.el file to the root of the projectile project (`~/projects/exercism/clojure` and everything works nicely.
((nil . ((projectile-project-type . clojure-cli))))
#2020-03-0918:31ziltiJust in case someone else has a similar problem. I noticed that my Emacs, as soon as I was jacked into CIDER, would constantly automatically reformat my code. As it turned out, lispy-mode is the evildoer in this case. I uninstalled it. What are you guys using for parenthesis modifications? Ideally something that cooperates with evil-mode. Currently I am back to paredit.#2020-03-1005:54yuhanAre you referring to Lispy auto-deleting whitespace before closing parens? I think that behavior can be controlled with a variable lispy-ignore-whitespace#2020-03-1007:23practicalli-johnI use smartparens with strict mode for structured editing in all languages. As I use Evil, I also use evil-cleverparens so evil commands respect structural editing. They are both in Spacemacs, just need toggling on.#2020-03-1009:58zilti@UCPS050BV auto-deleting whitespace, auto-reformatting the line the cursor is on, stuff like when I insert a newline it deletes it again, adding whitespace before a colon and before a # sign, and so on#2020-03-1011:46aisamuAboabo is very responsive - it might be worth opening an issue on github#2020-03-1014:29yuhanI use lispyville and never had any of those issues - maybe that's worth a try#2020-03-1004:37futuroI like smartparens #2020-03-1317:58caioanyone using lsp-clojure + cider + company?#2020-03-1318:10dpsuttonI am. Although I restrict auto complete to just cider #2020-03-1318:13caiohmm, ok. I'm trying to use both, but for some reason lsp-mode completion is doing something funny and prepends a c on anything it autocompletes#2020-03-1318:13caioI thought it was some crazy thing with cider + lsp, but apparently it does that when cider is not active#2020-03-1318:14caioit only appends a c when the symbol I'm completing to starts with a c lol#2020-03-1318:15caiocomp becomes ccomp, but apply becomes apply ¯\(ツ)/¯#2020-03-1318:15dpsuttonExtremely weird#2020-03-1319:08caioI traced it back to this triggerCharacters list. it's a character list that triggers an autocomplete but shouldn't be used in the result, like . in javascript. I think I fixed it: https://github.com/snoe/clojure-lsp/pull/117 🎉#2020-03-1321:41ericdalloI have this issue too @caio!#2020-03-1321:49ericdalloI forwarded it to #lsp https://clojurians.slack.com/archives/CPABC1H61/p1584136141005900#2020-03-1321:57ag@caio have you tried switching to ivy/helm at the completion? i.e.: you start typing something - it pops up company popup. Press C-/. If you check company-active-map it should be bound to counsel-company (if you’re using Ivy) and helm-company (if you’re using Helm). Then you can search for candidates, select one, press “RET”. Is that working okay for you? Asking, because I sometimes have issues with it.#2020-03-1322:13caioNo. I use the standard company pop up, sry#2020-03-1322:14agthis works from the standard company pop-up. Check company-active-map#2020-03-1401:56caioI have neither#2020-03-1602:41Cris BWhat does s-o mean in a keybinding? That's a lower-case s (`S-o` wouldn't make a lot of sense)#2020-03-1602:48Cris B(Never mind, found it: super-o)#2020-03-1607:19bozhidarYeah, that’s definitely a bit confusing, but those keybindings are pretty popular on macOS. One has to find a good use for that Command key. 🙂#2020-03-1607:38Cris BSure - as it happens only right-super- combinations seem to get through to emacs (gui or term) on my (Linux) system so I prefer to avoid them. Which is fine anyway as the super ('windows') key is so differently positioned between my internal (laptop) & external keyboards, it's confusing to my poor inflexible efferent nerves.#2020-03-1607:44bozhidarWhen I was using Linux I never made use of s-something keybindings, but I’ve developed a fondness for them in macOS.#2020-03-1607:49Cris BI've gone the other way (I've been told I'm doing it backwards as with so much else in life). Hey - aren't you the Prelude/Cider guy? If so I'll take the opportunity to thank you for both! I've known enough emacs to use it for server bits & pieces for years (er, decades). But it's playing with Clojure + Cider that made me reconsider it for actual programming, and Prelude that has kept me from throwing emacs out of the window in configuration-frustration.#2020-03-1607:58bozhidarGuilty as charged! Thanks for the kind words! :man-bowing:#2020-03-1608:19bozhidarIn a age dominated by sophisticated setups (e.g. Spacemacs and Doom) it’s nice to hear that someone still appreciates the simplicity of a setup like Prelude that aims to stay as closes as possible to the roots of Emacs.#2020-03-1608:33Cris BPrelude seemed like a good compromise. On the one hand it offers enough so I can get started on my aim (learning some Clojure) without procrastinating too much over tool configuration (always a temptation). On the other hand not obscuring emacs per se too much. I did try out Spacemacs briefly, and it seemed impressive, but overwrought for my own purpose/style.#2020-03-1620:32tvirolaiI too appreciate the "sane defaults" -approach of Prelude. It has made getting into Emacs and building a configuration of my liking reasonably straightforward.#2020-03-1702:14solf@bozhidar I wanted to use use-package, so instead of prelude I copied and modified your personal config!#2020-03-1707:43bozhidarI was waiting for it to become more mainstream/mature before leveraging it out-of-the-box, but this is bound to happen at some point.#2020-03-1710:21practicalli-johnThe challenge I've always had with Emacs, which is also present in VS Code and Atom, is the simultaneous key presses required for keybindings, e.g. C-x M-j I found them very slow as a touch typist and would take longer to build up muscle memory. When I switched to Evil and the Spacemacs mnemonic keybinding approach, it turned Emacs into an editor that I found highly productive and simple to learn and use. Doom also has great evil support, but I find the keybinding choices a little strange. The great thing is that there is lots of choices for having Emacs in a way that's best for yourself and it seems we are long past saying everyone should build their own Emacs init.el.#2020-03-1711:45mpenetuse-package is nice, but imho it has to be paired with straight.el to be decent with guaranteed reproducibility. Otherwise you're still at the mercy of upstream packages changes (outside of melpa-stable, which is only 1 version per package)#2020-03-1711:48mpenetit's a common theme, I think even the author of use-package (who's emacs maintainer) pins down package/lib versions via nix in his case. Straight achieves the same without having to go into nix.#2020-03-1712:21sogaiulove that phrase "without having to go into nix" - i spent a lot of time with nix...waiting for things to compile :) i love nix and guix too, but don't have the time!#2020-03-1712:44mpenetnix is awesome, but personally I want to have emacs stuff just be inside my emacs config and not spread at nix level#2020-03-1712:45mpenethis setup is also pre-straight-el, I suspect he might have used straight otherwise#2020-03-1713:39sogaiumakes sense on both accounts.#2020-03-1721:01Cris B@jr0cket Yes much of this is a matter of personal taste. With all the time in the world I'd start from an empty init.el and go from there, but that's just a preference without any real reason behind it. And I'm not even consistent with that - for example, I've long enjoyed using the IntelliJ IDE family, and in that case I have little knowledge of what's under the hood.#2020-03-1923:48bartukaI want to give evil a try again.. must be something related to this time of the year, apparently last year I had the same idea: https://www.reddit.com/r/emacs/comments/b216t3/what_do_you_recommend_to_a_standard_emacs_user_to/ loool#2020-03-2008:24teodorluHey! Anyone here used doom-emacs for Clojure development? I'm curious to hear about your experience. https://github.com/hlissner/doom-emacs#2020-03-2013:10teodorluCool. Have you been using it for long? I got started with Emacs in 2017, and tried a bunch of starter kits before finding Spacemacs. I've enjoyed Spacemacs a lot, especially the Org-mode config. Since then, I've come to prefer Org-mode for all kinds of information. Recently, I've become annoyed at the keyboard input latency using Spacemacs, which occationally spikes from okay-ish to bad. At the same time, I don't want to configure Emacs from scratch. From what I've read about Doom, it could be a nice fit.#2020-03-2014:23teodorluInteresting. Thanks for sharing. Looks like I'm giving it a shot!#2020-03-2015:12teodorluYeah, setup was a breeze! I already have some symlinks for Spacemacs, a vanilla one and Purcell's.#2020-03-2020:25teodorluThanks for the suggestions! I just had to wrap my head around the map! macro. I've gotten a few of my hand-wired Spacemacs shortcuts back by now. Starting to feel good 😎#2020-03-2008:43sogaiuyou'll probably want to talk with @deleted-user, but it may be some hours before he is around due to timezone issues.#2020-03-2009:56mkvlris melpa down?#2020-03-2009:56mkvlr> Error (use-package): Failed to install flycheck-clj-kondo: https://melpa.org/packages/flycheck-20200318.1319.tar: Not found#2020-03-2009:58mkvlror is it a problem with my new config? :thinking_face:#2020-03-2010:02mkvlrah, M-x package-refresh-contents to the rescue#2020-03-2015:31plexusis there an opposite of clojure-align?#2020-03-2015:32plexusI have a bad habit of aligning any map/let that my cursor touches, but not all my colleagues agree with that 🙂#2020-03-2015:55bozhidar@plexus No, there’s not, but I guess it shouldn’t be hard to create something that strips the extra whitespace.#2020-03-2120:12LuDoes anyone use editorconfig? If I get the buffer attributes I see the right ones coming from my root .editorconfig file, but the only formatting that is applied is the indentation.. For example, If I set a line max length property, that does absolutely nothing #2020-03-2216:07Bill PhillipsNot sure if this is #beginners or #emacs… I’m an emacs beginner! Anyway, my problem is that I want a rename refactor. I installed clj-refactor through M-x package-install and followed the README instructions to set it up in my emacs.d, but when I invoke it, it processes my project, asks me for the new variable name, and then fills the minibuffer with some kind of output and switches focus to my original buffer. I’d provide this output but I don’t know how to get it.#2020-03-2216:19dpsuttonyou can check the *Messages* buffer. It should have the message in there#2020-03-2216:30Bill PhillipsK. This is what I’ve got:
cljr--get-valid-filename: Wrong type argument: hash-table-p, 
 (#s(hash-table size 7 test equal rehash-size 1.5 rehash-threshold 0.8125 
     data (:line-beg 101 
           :line-end 101 
           :col-beg 4 
           :col-end 17 
           :name "scaffold-node" 
           :file "/Users/bphillips/src/clojure/gascan/src/gascan/repl.clj" 
           :match "[scaffold-node]")) 
  #s(hash-table size 7 test equal rehash-size 1.5 rehash-threshold 0.8125 
     data (:line-beg 129 
           :line-end 129 
           :col-beg 30 
           :col-end 43
           :name "scaffold-node" 
           :file "/Users/bphillips/src/clojure/gascan/src/gascan/repl.clj" 
           :match "(loop [loc (z/vector-zip scaffold-node)]")))
#2020-03-2216:33dpsuttoncheck that your versions of cider and clj-refactor are up to date. i think they can get out of sync and break. hopefully the latest versions work together#2020-03-2219:58practicalli-johnDoes rename refactor require the REPL to be running, I assume it does. I beieve you also need to have all the code in the project working (compiles without error) I stopped using clj-refactor and use helm-swoop to lists all instances of a symbol (function name) and C-c C-e to open the results of the search across the project in a buffer. Then I just use iedit or multiple cursors to make changes to that buffer and C-c C-c to commit the changes back to all the project files. I can do this for any text, so find it more useful than the clj-refactor rename.#2020-03-2221:23Bill PhillipsAnd it does that by symbol reference? Not by string match?#2020-03-2222:34practicalli-johnI assume it's string matching as it has so many tools available in Emacs to support that, none of which require the REPL or code to be analyzed. It works and very fast too. I hope you get clj-refactor working, but for me it became redundant in Emacs (Spacemacs) and I haven't used it for over a year or two now.#2020-03-2221:24Bill PhillipsAll code is compiled and working#2020-03-2221:38Bill PhillipsAnd the REPL is running, yes#2020-03-2221:39Bill PhillipsI tried deleting cider and clj-refactor and installing the latest stable versions, but that doesn’t seem to do any good.#2020-03-2309:00bozhidarThis might also be some valid bug. Unfortunately clj-refactor hasn’t been getting much love lately.#2020-03-2309:01bozhidar@jr0cket Everything in clj-refactor requires a running REPL. The simpler refactorings were moved to clojure-mode a while ago.#2020-03-2309:17practicalli-johnThanks for confirming. Although I always have a REPL running, I do now find it easier to use the more general tools you can add to Emacs (helm-swoop, helm-ag, iedit, multiple cursors) as you can use them with any programming language and plan text. I liked the idea of clj-refactor initially, especially coming from big IDE's. I now find the more general tools as effective, but appreciate they take a little time to learn. Hope you and your family / friends are safe and well.#2020-03-2408:52bozhidarThanks! Well, I don’t use clj-refactor myself - grep is my find-usages. 😄#2020-03-2312:43mpenetis there a way to use cider with prepl already? Tempted to allow the use of a remote repl on a service (off by default), for debugging, but I am a bit worried about adding cider-nrepl as dep#2020-03-2313:07jumari don't think so. I just use socket repl (via SSH tunnel) for this; possibly combined with unravel#2020-03-2312:44mpenet99% emacs users, so I don't want to be on the receiving end if I break tooling.#2020-03-2312:45mpenetquick grep on the repo says no#2020-03-2312:48sogaiuconjure is one of the few setups that has prepl support -- but that's in vim land#2020-03-2313:07dpsutton@mpenet i think cider-nrepl might do some things to standard out that might not be great in prod. check out.clj in there
#2020-03-2313:11mpenetit's not to be used in prod#2020-03-2313:11mpenetit's purely a restart with flag --nrepl and play at your own risk#2020-03-2408:49bozhidar@mpenet Yeah, there’s no way to run CIDER with prepl currently. Adding the ability to connect to a socket REPL has been on my todo list for quite a while, but with a prio low priority.#2020-03-2408:50bozhidarYou can always use inf-clojure to connect to a plain socket REPL if you just want something you can use from Emacs.#2020-03-2408:51bozhidarAlso - you don’t need cider-nrepl in production, all you need is an nREPL server. This will limit the functionality to the bare minimum, but I assume that’d be fine for your needs.#2020-03-2413:58mpenetyup that makes sense. thanks#2020-03-2513:18vemvDream emacs mode: save the buffer to somewhere in the cloud, as you type, no local files involved. Wondering how much work that would take :thinking_face:#2020-03-2513:22teodorluDoes a server count for "the cloud"? Tramp is always there to help 🙂#2020-03-2513:24vemvsounds like it could cut it :) only knew Tramp by name, will look into it#2020-03-2513:28caiotramp is great, and works fine with cider too#2020-03-2513:24MitchI believe that vmd-mode's live preview feature works by writing your buffer to a temp file on every change#2020-03-2513:25Mitchso however it achieves that might get you pretty close#2020-03-2513:31Alexander Heldtyou could mount a folder through ssh and work on those#2020-03-2516:42practicalli-john@vemv GitHub Gists can do this already. I use Spacemacs github layer to create gists from a buffer or region. If I list my Gists, I can view and edit them and when saving it will push changes to the Gist. Some examples here... https://practicalli.github.io/spacemacs/source-control/github/gists.html#2020-03-2521:10vemvthat's interesting, I'll keep it in mind but it's a different use case (note as you type)#2020-03-2601:58agYou can use post-command hook and keep sending updates to a web-app through web-sockets. I’m unaware of any packages that let you do that though.#2020-03-3016:46Frank HenardWhat do people use for folding http://wikemacs.org/wiki/Folding. Origami seems the most specific for Clojure, but it doesn't have any commits since 2 years ago, and it doesn't seem to be working#2020-03-3016:53DerekI just use Hideshow https://www.gnu.org/software/emacs/manual/html_node/emacs/Hideshow.html#2020-03-3017:28Frank HenardThat's perfect. Thanks!#2020-03-3017:42DerekGlad to hear it#2020-03-3111:44kosenganI'm trying to setup Clojure within org-mode. can someone spare few minutes to help me out? 🙂 for now, I'm getting the below error: The lein executable isn't on your 'exec-path' on trying to compile a Clojure code block#2020-03-3112:48sogaiuhow do you start your emacs session?#2020-03-3112:51sogaiuthe following should give the value of exec-path:
M-: exec-path <RET>
#2020-03-3112:53sogaiuat a shell, which lein should give a full path to lein if it's on the shell's PATH comparing the 2 results might help with understanding the situation better.#2020-03-3112:56sogaiui think some people find: https://github.com/purcell/exec-path-from-shell helpful, and the README has some relevant information regarding configuring one's shell (specifically the last 2 paragraphs of: https://github.com/purcell/exec-path-from-shell#setting-up-your-shell-startup-files-correctly)#2020-03-3113:19practicalli-john@thegobinath this is how I create literate programming with Clojure and org-mode. You can use either Leiningen of Clojure CLI tools https://practicalli.github.io/spacemacs/org-mode/literate-programming/ It does sound like you do not have Leiningen set up correctly I your operating system path. If you just installed Leiningen, test it on tha command line, once it works there (from any directory) then start Emacs and try again. Check Emacs is picking up your operating system path if it's still not working.#2020-03-3114:36kosenganThanks! I got it to work...#2020-04-0122:33Cris BAny linux or windows emacs users who favour external docs browsers might want to take a look at the https://github.com/jinzhu/zeal-at-point package, which works alongside https://zealdocs.org/. The latter was a happy recent discovery for me, having missed Dash badly since moving from mac to linux.#2020-04-0123:51sogaiuwas happy to find zeal too! didn't know about this package - thanks for mentioning it :thumbsup:#2020-04-0201:16richiardiandreaUsing it daily!#2020-04-0214:21yiorgosIs anyone using abo-abo/lispy? I am trying to eval the entire namespace (like cider C-c C-k but I can’t find if that is possible. Currently I have to eval e each form individually first to be able to eval something in the middle of the file#2020-04-0216:10MitchI use lispy but just use the regular cider eval commands in tandem with it#2020-04-0217:28practicalli-john@g3o cider-eval-buffer evaluates the whole namespace on the current buffer.#2020-04-0217:46sogaiui loved lispy but when i tried it some time back i found some parts to be too rough so sadly stopped using it. may be those things (which i don't remember 😅 ) work better now though.#2020-04-0219:27CameronI love lispy as well, the main wart that shows up for me if I remember is occasionally the lispy-clojure-complete-at-point function or whatever gets bugged, and symbols like Syntax get stored somewhere they shouldn't, and company gets messed up. I tracked down part of the bug at one point but I forget where the wires get crossed, regardless for now I just remove lispy-clojure-complete-at-point from complete-at-point-functions altogether when lispy starts. But yes, that's the general feel I've gotten as well, at times things sort of break, and there are some sharp edges#2020-04-0222:55Mitchyeah i agree that some of the tools it provides (such as lispy-eval) are probably beyond the scope of what the project should be and are best ignored in favor of tools like cider and cljr-refactor#2020-04-0222:55Mitchi set up a spacemacs layer a few weeks ago and just pave over a keybinding whenever it causes me an issue#2020-04-0422:39bartukahi ppl, someone using company-tng.el? I can cycle through the completion options using tab and backtab which is great. However, I cannot finish the completion by pressing SPC which is odd. This is the desired behavior?#2020-04-0804:45agHas anyone used babashka with source code blocks in Org-mode?#2020-04-0816:40practicalli-johnI've only used Leiningen and deps.edn projects, but they both worked https://practicalli.github.io/spacemacs/org-mode/literate-programming/ I havent tried babashka for anything yet, but would be interested to know how you get on.#2020-04-0814:42mister_mRE using CIDER in the context of a lein project - if I add a dependency to a lein project during a running cider session, is there a way for cider to pull in that new dependency without me having to restart? I think the analog in slime / quicklisp would be re-quickloading your local project.#2020-04-0816:19bozhidar@radicalmatt Unfortunately, no.#2020-04-0816:19bozhidarYou’ll have to restart the REPL server.#2020-04-0816:20bozhidarThat’s as close as we can get currently https://nrepl.org/nrepl/0.7.0/usage/misc.html#_hot_loading_dependencies#2020-04-0816:26mister_mIt isn't the biggest deal for me yet, it just tripped me up the first time I added a dependency#2020-04-1107:21kitallisrefactor-nrepl is meant to work with cljs as well right?#2020-04-1108:00kitallisI’m running a shadowcljs app and I can’t get refactor-nrepl to function (it’s in my lein profiles)#2020-04-1108:01kitallisoh, wait, there’s no lein in scope here, it’s all shadowcljs#2020-04-1108:09dpsuttoni believe it can work. it you're getting a message that there's no project you can try upgrading your clojure-mode. I think this was updated to include shadow-cljs as a project root#2020-04-1108:21kitallisI’m getting something like refactor-nrepl middleware is not enabled#2020-04-1114:46dpsuttonhow are you starting the project?#2020-04-1323:12bherrmannHow do I tell emacs that if the file starts with "#!/usr/bin/env bb" then it should use "clojure-mode" ? (or if the file ends in .bb)#2020-04-1323:21bherrmannI must have typed M-x clojure-mode - like 20 times today#2020-04-1323:24andy.fingerhutSomething like this, but with a couple of tweaks, in your ~/.emacs.d/init.el should do it: (setq auto-mode-alist (cons '("\\.c$" . c++-mode) auto-mode-alist))#2020-04-1323:24andy.fingerhutProbably (setq auto-mode-alist (cons '("\\.bb$" . clojure-mode) auto-mode-alist))#2020-04-1323:25andy.fingerhutThat will do it for the file name. I do not know how to make Emacs recognize the shebang line#2020-04-1323:26andy.fingerhutThere are Emacs-specific comment lines with special syntax inside the comments that Emacs recognizes for setting mode and any other local Emacs variables you want.#2020-04-1323:26dpsutton@bherrmann are you using inf-clojure ? I’m working on rewriting it so hopefully it gets much better across all the different repl types#2020-04-1410:09bozhidarGlad to hear this! We haven’t been able to give it enough love recently. What are you planning to tackle there exactly?#2020-04-1413:12dpsuttonI’ve almost got a draft up. I’m wanting to be able to see which capabilities each repl type has and make it easy to ensure that it works for whatever repl is being used #2020-04-1413:13dpsuttonThe defcustoms were all over the place#2020-04-1413:25bozhidarYeah, it’s definitely not my finest work. 😄#2020-04-1413:26bozhidarI think somewhere I had suggested to have the expressions for each REPL type in some maps to avoid the crazy amount of vars we have for them now.#2020-04-1413:27bozhidarProbably adding some minimal support for prepl would be nice - we already have support for the socket repl and prepl is the same, but with structured output, which now is easy to parse with parseedn.#2020-04-1413:39dpsuttonah yes!#2020-04-1323:27andy.fingerhutHere are Emacs docs on setting local variables inside of specially formatted comments: https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html#Specifying-File-Variables#2020-04-1622:27didibusCool, didn't know that. Love Emacs haha#2020-04-1323:30bherrmannI'm just using vanialla emacs (with cider installed) with a .emacs that I've dragged along with me for like 30 years.#2020-04-1323:32dpsuttonSo no connected repl running bb?#2020-04-1323:33bherrmann
 (setq auto-mode-alist (cons '("\\.bb$" . clojure-mode) auto-mode-alist))
this fixes the .bb file loading
#2020-04-1323:34bherrmannI've used cider-connect with bb, but only a little yesterday.... typically... I have a terminal where I do the running, and emacs where I do the editing.... I'm aware of the productivity gains from only evaling in emacs... but I'm new to bb... so I'm keeping it where I can watch it closely...#2020-04-1323:49bherrmannThis seems to put emacs in the right mode....
#!/usr/bin/env bb

;; Local Variables:
;; mode: clojure
;; End:
#2020-04-1401:52Cris BFor any other Zeal users here, I came across a user contrib ClojureDocs docset at https://zealusercontributions.herokuapp.com/docsets/ClojureDocs.xml . Very useful to have the examples handy. (Not precisely emacs-related, but I've seen mention of zeal-at-point here so some might be interested).#2020-04-1409:45bozhidarBtw, CIDER keeps a local copy of the ClojureDocs data, so it’s accessible from it as well.#2020-04-1501:47Cris BCool. I didn't know that. But of course it does! I forgot the universal 'emacs expands to take over everything' axiom. I used to laugh inwardly at people using emacs for mail, but somehow just found myself using mu4e yesterday.#2020-04-1503:45Cris BDo you know what would cause (void-variable cider-docview-symbol) cider-docview-clojuredocs() when trying any of the cider-docview-* functions? I'm puzzled because my first attempt succeeded, but subsequently this error occurs.#2020-04-1402:38sogaiunice to have examples for sure. (for installation, i picked out a url from the xml file, fetched the content, uncompressed, and placed the result in a folder that became apparent after rummaging around the preferences. do you know if there is a less manual method?)#2020-04-1403:13Cris BThere's a less manual method 😉 In Zeal: Tools -> Docsets -> "Installed" tab -> Add feed. Pop the url in there, and Zeal with fetch the docset & keep it updated.#2020-04-1403:58sogaiuah, tyvm!#2020-04-1620:12myguidingstarjust discoverd lispy-mode for emacs, it's just amazing compared to paredit (though the two can work together)#2020-04-1620:14myguidingstaranyone here using lispy-mode with clojure?#2020-04-1620:15myguidingstarI'm using emacs doom configuration, just switched from paredit to lispy#2020-04-1620:16myguidingstarhowever [ and ] are used for navigating so I can't type brackets with them directly#2020-04-1622:34agYou can always press C-v and type a bracket symbol#2020-04-1620:24myguidingstarnot sure how do people handle that#2020-04-1620:24myguidingstarbind some key to lispy-open-square???#2020-04-1620:29dpsuttoni abandoned lispy years ago because of that#2020-04-1621:19Cameron@myguidingstar by default you'll want to insert brackets by hitting }#2020-04-1707:31myguidingstarexactly what I'm looking for. Thanks#2020-04-1621:31dpsutton? how would you enter curly and straight brackets?#2020-04-1622:29didibusI just use adjust-parens-mode + aggressive-indent-mode + smartparens#2020-04-1622:29didibusBest combo I've ever tried#2020-04-1622:31didibusAnd I have custom bindings for most things. So I use M-left/right/up/down for navigating s-expressions#2020-04-1623:01Cameron} inserts [] , { inserts {} . Because lispy itself manages brackets (such that they're always balanced), you only need a command for starting a new pair, not for individually typing in { and }, or [ and ] . Its another thing that takes getting used to, and it mainly becomes painful when you operate on the file in some way that lispy is not managing that allows brackets to become unbalanced (which usually means 1. opening a file with already unbalanced parentheses 2. manually deleting a parentheses. Normally this will not happen, as if you normally go to delete a parentheses, its still being managed by lispy, and it will balance the parentheses by deleting the entire form, or if you just mean to remove a pair of parentheses and not the contents (basically splicing the form into its outer form), it will likewise handle that. If your intention is even to move the parentheses, you'll just slurp or barf with lispy as needed. But if you, say, highlight something and hit Cntrl-D, you are manually deleting something from outside the lispy abstraction layer, and can end up disturbing the balance of the ~force~ parentheses 3. Pasting in something that is unbalanced, or pasting in something in a way that partially erases something else and unbalances brackets / parentheses / whatever). Of course, in a scenario like that you just end up disabling lispy, fixing the parentheses, and re-enabling it, and over time you learn to disturb parentheses less. But it is kind of annoying as you adjust, and I do wonder myself is there's some quicker way to manually modify parentheses without restarting lispy (or without, say, calling something like`(insert ")")` from elisp, which I also do sometimes)#2020-04-1701:30aisamuI'm not sure if I tweaked something, but while on insert mode, delete (forwards) won't balance things. This means we're able to fix broken parenthesis/brackets by adding a pair and deleting the extra one:
| is the cursor, always on insert mode

|())

type ( 
|() ())

move forward, del, del
(|())
With my current config (lispy with lispyville) I can't copy/paste unbalanced things. When I need those I manually call org-copy-visible
#2020-04-1623:28dpsuttonOhh cool#2020-04-1701:30aisamuI'm not sure if I tweaked something, but while on insert mode, delete (forwards) won't balance things. This means we're able to fix broken parenthesis/brackets by adding a pair and deleting the extra one:
| is the cursor, always on insert mode

|())

type ( 
|() ())

move forward, del, del
(|())
With my current config (lispy with lispyville) I can't copy/paste unbalanced things. When I need those I manually call org-copy-visible
#2020-04-1703:06didibusAnyone knows what the emacs naming convention is for packages?#2020-04-1703:07didibusI see people doing package--fn or package/fn or package//fn or package-fn#2020-04-1703:13dpsuttonstandard i know of is package-fn for public, package--fn for private#2020-04-1703:18didibusHum, oh, I see. The doc said: Use two hyphens to separate prefix and name if the symbol is not meant to be used by other packages. #2020-04-1719:08didibusAnyone has experience publishing a package to MELPA?#2020-04-1719:08didibusAnd if not, what's the best way prior to being in MELPA to share my package with others? Just a git clone?#2020-04-1719:13dotemacs@didibus you can just put in a public git repo and there are package managers that allow you to pull a package straight from git.#2020-04-1719:21didibusLike which one?#2020-04-1719:21didibusstraight.el ?#2020-04-1719:22didibusI'm trying to see what my Install instructions should be for users#2020-04-1719:22dotemacsYea, straight.el, but there is also el-get#2020-04-1719:23dotemacsIn any case, if people want to try out your package, they’ll find a way to do it.#2020-04-1720:35didibusHum, I guess I would like to provide some easy to follow instructions. I only know for Spacemacs since that's what I use.#2020-04-1720:35didibusI feel not everyone using Emacs would know how to install something not in Melpa#2020-04-1720:36didibusLike me 😝#2020-04-1720:40didibusEl-get actually feels pretty nice#2020-04-1806:07bbucciantiWhat kind of package are you making?#2020-04-1818:28didibus@bebuccianti Editor features powered by clj-kondo's static analysis. I have auto-completion working right now. Which is good enough for a v0.1 in my book. So trying to publish that. And I'm planning to add jump to definitions, find usages, and other such things#2020-04-1918:06practicalli-johnSounds a great project, looking forward to trying it out when ready. Are you aware of https://github.com/snoe/clojure-lsp ? I dont think it uses clj-kondo (it migh use joker, as its mentioned in the readme). It may provide some ideas and code to help. I have use the clj-kondo-lsp-server-standalone jar as a very basic Clojure LSP backend for linting in Spacemacs, it works very nicely (although it provides no difference to using clj-kondo as a flycheck backend.#2020-04-1920:13didibusYa, going with lsp is more work, so I'm not doing that right now. But maybe when I'm done with this I could explore seeing if I can enhance clojure-lsp with some clj-kondo goodies. I think clojure-lsp could be a good foundation for supporting Vim and VSCode.#2020-04-1920:13didibusThough as en Emacs user, I may lack the motivation 😛#2020-04-1912:31bherrmannEmacs doesnt seem to understand me.... I placed this in my .emacs rc
(defun babashka-connect ()
  (cider-connect localhost 1667))

(define-key global-map "\C-cb" 'babashka-connect)
but typing CTRL-C then B, yields "Wrong type argument: commando, babashka-connect"
#2020-04-1913:00sogaiudoes adding (interactive) to the appropriate place in the defun help at all?#2020-04-1913:05sogaiu@bherrmann iiuc, to use a function with define-key it's usually (always?) supposed to be a command. adding (interactive) to the function should make it so.#2020-04-1913:06sogaiufrom emacs lisp ref: > A command is usually a function; if the function is written in Lisp, it is made into a command by an interactive form in the function definition#2020-04-1913:06sogaiuhttps://www.gnu.org/software/emacs/manual/html_node/elisp/What-Is-a-Function.html#What-Is-a-Function#2020-04-1913:26bherrmann@sogaiu Thanks, this does the trick in my .emacs
(defun babashka-connect ()
  (interactive)
  (cider-connect '(:host "localhost" :port "1667"))
  )
(define-key global-map "\C-cb" 'babashka-connect)
#2020-04-1918:53dpsuttonAnnouncing inf-clojure 3.0.0-snapshot on melpa. - Revamps the internals of inf-clojure. - Makes startup, and choosing a supported repl easier and more intuitive. - (use-package inf-clojure) (add-hook 'clojure-mode #'inf-clojure-minor-mode) and then M-x inf-clojure - supported clojure, lumo, planck, and joker repls. Now extended to support cljs and babashka#2020-04-1918:53dpsuttonif you already have CIDER present and you want to try it out, (remove-hook 'clojure-mode #'cider-mode) and then use the above. they fight over who gets to control the interactive maps#2020-04-1918:55dpsuttonInf-clojure aims to be very simple and offer tooling that the repl itself exposes. A few commands are: - eval last sexp C-x C-e - show arglists for function C-c C-a - show var documentation C-c C-v - show source C-c C-s - insert top level form into repl C-c C-j d#2020-04-1922:51eccentric J@dpsutton Awesome! I've been using it for lumo lately and it's been pretty good. If we have some issues to report where should we post them?#2020-04-1922:58dpsuttonCreate an issue on GitHub and tag me? I’m the same username on GitHub. I’ll own it#2020-04-2001:15eccentric JI'm still learning my way around spacemacs so how do I update the inf-clojure package?#2020-04-2001:49didibusJust click on Update Packages in the spacemacs buffer#2020-04-2001:51didibusThis assumes you have the inf-clojure package in dotspacemacs-additional-packages#2020-04-2001:51didibusinside you .spacemscs#2020-04-2001:46didibus@dpsutton Great timing, paired with Anakondo you can get auto-completion of your code and use inf-clojure as your repl#2020-04-2001:48didibus@dpsutton Is the github repo for it different?#2020-04-2001:58dpsuttonWhat’s anakondo? I’ve been using lsp and interested to see other similar solutions#2020-04-2016:14eccentric JHaven't heard of it either. Must be this? https://github.com/didibus/anakondo#2020-04-2017:04richiardiandreanew package just released by @U0K064KQV 😄#2020-04-2001:58dpsuttonNo the repo should be clojure-emacs/inf-clojure#2020-04-2001:59dpsuttonhttps://github.com/clojure-emacs/inf-clojure/#2020-04-2209:15martinklepschHow would I configure emacs so that it indents these testing macros like this
(describe "Fruits"
  (describe "Apples"
    (it "is red" []
      ;; assertion code
      )))
#2020-04-2209:16martinklepschWe tried (put-clojure-indent 'it 1) but I think that doesn’t work properly for it due to the extra []? I’m not sure.#2020-04-2209:44yuhanshouldn't that be 2? since there are 2 "head" params there#2020-04-2209:47martinklepsch@UCPS050BV thanks, I wasn’t quite clear about the syntax there but I’ll give this a shot!#2020-04-2209:58yuhancheck out the official docs: https://docs.cider.mx/cider/indent_spec.html#2020-04-2213:48friczeHi, I’m using flycheck-mode with clojure-mode and it’s working properly, most of the time, but right now I have a lot of promenade calls in codebase, like promenade/mlet https://cljdoc.org/d/promenade/promenade/0.7.2/doc/introduction-to-promenade#mlet. Flycheck complains because mlet is not recognized as form of let . Is there a known way to add own special forms to syntax checker to fix this inconvenience?#2020-04-2214:20Nir Rubinsteinflycheck probably uses joker and/or clj-kondo for checking - both of them can be configured to ignore/accept these kind of error#2020-04-2214:33friczeawesome, thanks#2020-04-2214:40friczefound clj-kondo configuration and it just worked, awesome stuff 😄#2020-04-2215:13practicalli-johnStarted using org-journal (and now wondering how I lived without it). Has anyone exported the journal to a website with a nice CSS theme? I'd like to just push the content to GitHub or GitLab pages and have something easy to navigate the daily journal. Any pointers would be great. I've seen a few mentions of org-hugo, but wondering if there is a way to do it without a static website build tool.#2020-04-2317:42Mitchyou may be able to achieve your needs with a simple org exporter? something like http://bald.cat/slimhtml#2020-04-2411:24dotemacsHello This is a request for comments about a little utility I’ve been working on. I’ve created a mode (which is not finished just yet), which deals with comments in Clojure(Script) mode. It is very much inspired by comment-dwim-2, in that when you have something like this:
█(ns foo.bar
    (:require [foo.baz]))
and you M-x clojure-comment-dwim it turns the code into:
#_(ns foo.bar
      (:require [foo.baz]))
` then when you invoke the function again, it changes the comment style to:
;;(ns foo.bar
      (:require [foo.baz]))
Yes, that does mess up the parens, but then it’s up to you what particular style of comment is appropriate. And a final tweak is that if you turn off clojure-comment-dwim-ignore-trailing-comment it allows you to have trailing comments:
(ns foo.bar ;
    (:require [foo.baz]))
What I’m wondering is if instead of the behaviour above, which cycles through the different comment types, it can comment out the form following it. For example, with the code like this where the cursor is just after the ns:
(ns█foo.bar
    (:require [foo.baz]))
by invoking clojure-comment-dwim, it should insert #_, so that you get:
(ns #_foo.bar
    (:require [foo.baz]))
And then the subsequent invocations should have the already existing behaviour described above, where the comment is inserted at the beginning of line. What are your thoughts on this? Thanks Repo of the mode so far (which is not yet finished): https://github.com/dotemacs/clojure-comment-dwim.el
#2020-04-2411:41yuhanI don't understand the utility of cycling to a ;; comment and unbalancing parens in the process - I imagine most of the time it's a 2-state toggle between inserting and deleting #_ , so having a 3rd state seems like more unneccessary steps#2020-04-2411:43yuhanhere's the function I use for that purpose, which also has some other "dwim" behaviour like wrapping in a comment form when a region is selected:#2020-04-2411:43yuhanhttps://gist.github.com/yuhan0/38ac43c764017917fc3f3e5dc9104f1b#2020-04-2412:09dotemacsThanks for the feedback @qythium. It was influenced by comment-dwim-2, which acts this way. I like what you’ve done with your gist. I had another idea, after your feedback, for any given point, if the command is invoked, insert #_ even if it’s in a middle of a s-expression. Then the function is invoked again, uncomment it. With an argument supplied, go up a s-expression and (un)comment. And I like your idea of using comment on the region, but I’ll try to borrow from your approach and comment-dwim-2’s, in applying it against a region, but not from just a “starting” & “ending” points, but for the s-expressions within the region. Thanks again#2020-04-2508:40dotemacsI’ve implemented the functionality where you can (un)comment #_, uncomment (comment ...) and when a region is selected, comment with (comment ...), all under a *single function*. With a prefix argument C-u n` you can go up n s-expressions from point, and comment them out. There’s bound to be some edge cases and tests need to be added to prevent regressions, but it works so far. (Yes, there is some duplication and I intend on cleaning that up). See what you think (note, the new changes are in s-expressions-only branch): https://github.com/dotemacs/clojure-comment-dwim.el/blob/s-expressions-only/clojure-comment-dwim.el#2020-04-2511:36yuhanI like being able to comment out multiple forms using the numeric argument, which comes up surprisingly often in clojure due to "pairs" in maps and binding forms: C-u 4 clojure-toggle-ignore-form => {a 1 #_#_#_#_ b 2 c 3 d 4}#2020-04-2511:39yuhanAre you thinking of submitting it to clojure-mode or a MELPA package? I've been planning to contribute my above snippet to clojure-mode too, seeing as Calva added a similar feature recently 🙂#2020-04-2513:23dotemacsHey @qythium yea, once it’s done, I will. Wasn’t aware that Calva had this, but good to know. I’m mostly going off my own needs plus feedback I’m currently getting.#2020-04-2513:54dotemacsAbout
C-u 4 clojure-toggle-ignore-form =>
{a 1 #_#_#_#_ b 2 c 3 d 4}
I’m using the prefix argument C-u to clojure-comment-dwim to mean “go up PREFIX s-expressions and comment them out via #_“. I have the following considerations: - Unlike your gist, my setup has only one “entry” function, which is called and then dependent on the situation/prefix argument, it determines how to comment out the code. Whereas you have two different functions. - I could use a negative number to go up, as in back, and a positive number to go forward. But then since I’m using a single function, to what case would the prefix apply? - An alternative to your:
C-u 4 clojure-toggle-ignore-form =>
{a 1 #_#_#_#_ b 2 c 3 d 4}
is to select the b 2 c 3, which would then comment it out as: {a 1 (comment b 2 c 3) d 4} I’m not claiming that either of our approaches are better, just trying to figure out what would be more useful, potentially more frequently used. Which I guess it’s a hard thing to predict. I think that it might be an idea to have some test cases upfront that show the behaviour that can be decided on upfront, rather than implementing the features first and then discussing it...
#2020-04-2515:06dotemacsI’ve put a bunch of scenarios in this issue, along with the discussion on the prefix argument behaviour: https://github.com/dotemacs/clojure-comment-dwim.el/issues/2#2020-04-2515:49yuhanLooks like you put a lot of thought into this! I think a lot of this comes down to personal preference and workflow habits - different users will prefer having multiple specific commands vs. having a single command with context-sensitive or cycling behaviour.#2020-04-2515:54yuhanIn any case it seems that some sort of #_ command should belong in the main clojure-mode package for everyone's benefit. I'll open an issue on the clojure-mode repo to get feedback, hope you don't mind if I link to your repo in its current state#2020-04-2521:04practicalli-johnJust sharing my thoughts and workflow. I would like to see a clojure-mode function that just toggles #_ on the current expression, preferably without having to use C-u argument. I have some code I someone wrote for me a year or so ago, which I just bind to C-# and it does the trick. It's Evil aware so it works with Spacemacs. There are already several ways to toggle ;; style comments for lines and regions (certainly in Spacemacs) I only use one comment block per namespace, so toggling would be of no value to me. I think there is a (comment ) yasnippet (or its really easy to add one.#2020-04-2714:24dotemacsThanks for the feedback @U05254DQM. > I would like to see a clojure-mode function that just toggles #_ on the current expression, preferably without having to use C-u argument. I’ve got that covered right now in clojure-comment-dwim.el. But if you select a region, it figures out if this region is a s-expression, in which case it still uses #_, otherwise if it isn’t a s-expression, it wraps it in (comment ...). > It’s Evil aware so it works with Spacemacs. Not sure how Evil/Spacemacs works, as I don’t use it, but I assume that it just invokes Elisp functions bound to a certain key(combo)? > There are already several ways to toggle ;; style comments for lines and regions (certainly in Spacemacs) comment-dwim as part of stock Emacs does this.#2020-04-2717:41yuhanThe main issue I have with your implementation is that #_ and comment forms are semantically very different in the way they're commonly used. Treating them as equivalent and choosing which to use based on some heuristic would encourage bad style.#2020-04-2718:51dotemacsOK, so let me understand that better, how would you comment out a section of the code here:
{:a 1
 :b 2
 :c 3}
If you selected the region containing :b 2, what would be your preference @qythium? Something like: a)
{:a 1
#_ :b #_2
 :c 3}
b)
{:a 1
 #_ #_ :b 2
 :c 3}
c)
{:a 1
 #_(:b 2)
 :c 3}
#2020-04-2719:10dotemacsOr just standard comment-dwim style: d)
{:a 1
;; :b 2
:c 3}
#2020-04-2912:46yuhanhey sorry for the late reply, I would use option b#2020-04-2912:49yuhanFor me comment is reserved mostly for top-level comment forms, ie. temporary test code or things that are meant to be executed interactively, and ;; line comments are for text#2020-04-2913:42practicalli-johnIn your example @U3SG7RX7A option b would be the result I expect to see (although comments in maps is not an approach I would typically use). The only time I seem to use the #_ comment within an expression is in a threading macro, where I would expect a single #_ would comment out the part of the execution pipeline I wanted to exclude. I guess it could also be useful in cond too, but don't really use that much.#2020-04-2915:47dotemacsThank you both for the feedback!#2020-04-2513:23dotemacsHey @qythium yea, once it’s done, I will. Wasn’t aware that Calva had this, but good to know. I’m mostly going off my own needs plus feedback I’m currently getting.#2020-04-2513:54dotemacsAbout
C-u 4 clojure-toggle-ignore-form =>
{a 1 #_#_#_#_ b 2 c 3 d 4}
I’m using the prefix argument C-u to clojure-comment-dwim to mean “go up PREFIX s-expressions and comment them out via #_“. I have the following considerations: - Unlike your gist, my setup has only one “entry” function, which is called and then dependent on the situation/prefix argument, it determines how to comment out the code. Whereas you have two different functions. - I could use a negative number to go up, as in back, and a positive number to go forward. But then since I’m using a single function, to what case would the prefix apply? - An alternative to your:
C-u 4 clojure-toggle-ignore-form =>
{a 1 #_#_#_#_ b 2 c 3 d 4}
is to select the b 2 c 3, which would then comment it out as: {a 1 (comment b 2 c 3) d 4} I’m not claiming that either of our approaches are better, just trying to figure out what would be more useful, potentially more frequently used. Which I guess it’s a hard thing to predict. I think that it might be an idea to have some test cases upfront that show the behaviour that can be decided on upfront, rather than implementing the features first and then discussing it...
#2020-04-2519:21didibusDoes anyone know, the same way you can use prog-mode to dpecify things for all programming modes, and text-mode for all text modes, is there one for all lisp modes?#2020-04-2602:52theeternalpulseyou'd have to do a custom one I imagine. I think the prog/text mode hooks are pretty universal, any hooks that are subject to change are left to customization#2020-04-2602:53theeternalpulseby custom I mean just add multiple hooks.#2020-04-2719:46Ahmed HassanWhen I run M-x pcomplete it prompts Invalid function: pcomplete-here on Doom Emacs. What is the problem?#2020-04-2721:41sogaiudon't have an answer for you but doom emacs discord and maintainer highly recommended#2020-04-2721:42Ahmed HassanThanks, any resources to learn Evil mode? I've never used Vim, but want to give it try.#2020-04-2721:44aisamuVim tutorials!#2020-04-2721:46aisamuI remember using this one: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html#2020-04-2806:25sogaiulinked from there i noticed: http://www.viemu.com/a-why-vi-vim.html toward the end of that, there is this quote: > You need to invest quite some effort to learn, memorize, and internalize the 30 or so commands that start making you more productive than with other editors. does that seem accurate to you?#2020-04-2807:27sogaiuwell in any case, i've printed the first cheat sheet out and i think i might try to learn one key a day from it.#2020-04-2812:19aisamuYup, it'll take you some time to catch up. That doesn't meant the basics aren't sufficient to be productive, though. You'll increase your productivity with each new command. I didn't try to memorize everything upfront (only that graphical tutorial) - knowing what's out there and learning it when you need it worked just fine (as in "dang I remember something about editing quoted text").#2020-04-2812:28sogaiuthanks! your point about being aware of the existence of certain things makes a fair bit of sense. the idea that possibly there are only about 30 or so commands that could give a fair bit of benefit is quite motivating. i just have no idea what those are, but i suppose it's likely that some if not all of them are on the cheat sheet. it wasn't until some years back that i became aware of the "composing" of commands aspect so hopefully i'll get to experience that in-depth soon.#2020-04-2812:33Ahmed Hassan@UG1C3AD5Z did you print this cheat sheet: https://vim.rtorr.com/#2020-04-2812:38sogaiuno, i did this one: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html or rather just the first page. i think the graphical aspect of it somehow makes the memorization aspect better in my case. i find being able to see the whole picture on one page to be helpful, but also the color and layout not being so uniform. it's like with code, i try to get my functions to fit on one page so i can leverage my visual system to help hold the whole thing in my mind at once. long lists don't work as well for me, but thanks for the link, i will take a look anyway. may be i will at least remember some things 🙂 the thematic grouping is nice.#2020-04-2812:39Ahmed HassanHow can we create key bindings for evil mode? (https://clojurians.slack.com/archives/C0617A8PQ/p1588041142434700)#2020-04-2812:42tvirolaiYou can set the Cider-specific keybindings as Evil local keys like this:
(defun clojure-mappings ()
  (evil-local-set-key 'normal (kbd "°") 'cider-eval-buffer)
  (evil-local-set-key 'normal (kbd "M-§") 'cider-eval-buffer)
  (evil-local-set-key 'normal (kbd "§") 'cider-eval-defun-at-point)
  (evil-local-set-key 'normal (kbd "Ö") 'cider-find-var)
  (evil-local-set-key 'normal (kbd "q") 'cider-popup-buffer-quit)
  (evil-local-set-key 'normal (kbd "K") 'cider-doc))

(add-hook 'clojure-mode-hook #'clojure-mappings)
#2020-04-2812:45sogaiubtw, i saw "efficient editing with vim" recommended -- didn't seem to be in its original location, but https://archive.org had it: https://web.archive.org/web/20090123231123/http://jmcpherson.org/editing.html this article has grouped commands with explanations and examples. haven't finished it yet, but i'm finding it helpful.#2020-04-2813:07aisamuThis one's also pretty useful https://stackoverflow.com/a/1220118#2020-04-2813:48sogaiuthanks, that looks good -- i've only skimmed so far, but am inclined to go through it in detail. loved this bit at the end: > All of what I've described here should work on any old copy of vi from 20 or 30 years ago.#2020-04-2815:57practicalli-john@UCMNZLJ93 I really started picking up Vim quickly when I learnt the Vi language constructs. Then almost everything is a combination of verbs, modifiers and object https://practicalli.github.io/spacemacs/spacemacs-basics/vim-style/speaking-evil.html#2020-04-2818:11Ahmed HassanHow much useful do you find lispy/paredit/smartparens in Evil mode of Emacs?#2020-04-2819:00aisamuEssential! I use Lispy, but the final decision to switch to emacs was made after watching someone using paredit proficiently#2020-04-2820:32practicalli-johnSmartparens (the newer version of paredit) in global strict mode is essential to my Clojure workflow. Smartparens is also useful for other languages too. I didnt get on with lispy or parinfer as they change things unexpectedly on me. I like to be in control of the changes to the structure. As I use Evil with Emacs, then I also use evil-cleverparens so vim actions respect the structure.#2020-04-2906:23sogaiu@U05254DQM thanks for sharing "learning evil by speaking vim" -- laughed a bit at the title, but i suppose this is familiar humor for things having to do with evil-mode 🙂#2020-04-2812:39Ahmed HassanHow can we create key bindings for evil mode? (https://clojurians.slack.com/archives/C0617A8PQ/p1588041142434700)#2020-04-2818:11Ahmed HassanHow much useful do you find lispy/paredit/smartparens in Evil mode of Emacs?#2020-04-2805:45Nicky Chorleyhow to people comment forms in Emacs? I'm just using {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "7e3d5333533e"}, :content ("[email protected]")} . I couldn't find whether Clojure mode has its own key binding for comments#2020-04-2805:50adiI jump to opening paren and type #_ , or slurp into a (comment ...) form. In general, I avoid using semicolons to comment out code, because it's easy to lose in-between code / paren balancing that way.#2020-04-2807:19Ahmed HassanTry C-x C-;#2020-04-2810:09dotemacsI’ve been working on this mode https://github.com/dotemacs/clojure-comment-dwim.el/blob/master/clojure-comment-dwim.el you might find it useful.#2020-04-2905:57Nicky ChorleyI'd forgotten about (comment) . C-x C-; doesn't work because that comments a single line and not the whole form. Thanks @U3SG7RX7A too!#2020-04-3012:45mdallastellaI move at the beginning of the form, C-SPC, C-M-f and then M-;#2020-05-0410:37rickmoynihanAnyone know how to make helm show in a popup like here: https://github.com/Alexander-Miller/treemacs/blob/master/screenshots/workspace-edit.gif#2020-05-0410:42pauldubThis looks like https://github.com/tumashu/posframe so it might be the following extension: https://github.com/tumashu/helm-posframe/#2020-05-0410:43Cameronah that's pretty neat, although its hard to say what I'd prefer#2020-05-0410:43rickmoynihanahh thanks… I swear I had this setup at one point, but think I switched it off for some reason and can’t remember why#2020-05-0410:43rickmoynihannor could I remember what it was called#2020-05-0410:46rickmoynihanhmm seems to work, but it’s not centred and displays in the lower left corner#2020-05-0410:51pauldubI think you should be able to set poshandler parameter (POSHANDLER) to #'posframe-poshandler-window-center using https://github.com/tumashu/helm-posframe/blob/master/helm-posframe.el#L103#2020-05-0410:51pauldubNevermind, you can use the https://github.com/tumashu/helm-posframe/blob/master/helm-posframe.el#L66 parameter#2020-05-0410:53rickmoynihanSetting it to posframe-poshandler-window-center works :thumbsup:#2020-05-0412:39vemvAnyone familiar with this visual glitch? (issue includes a gif so that's your tldr ^^) https://github.com/railwaycat/homebrew-emacsmacport/issues/158 The thing is that now I'm not only experiencing with emacs-mac --no-title-bars but also with the more popular emacsformacosx distro It makes me wonder if it could be a somewhat common or known issue. Hard to google#2020-05-0420:00Frank HenardI want to create a key binding for M-x cider-repl-clear-buffer. It would be like running $ clear in a shell. Do any of you have any recommendations for what I should use?#2020-05-0420:04Frank HenardI guess I'm wondering if there's some standard "clear buffer" type of key binding, and I don't want to create a key combination that will conflict with something else#2020-05-0420:09dpsuttoni believe there already is one. C-c C-o clears the last evaluation and with a C-u before it clears the entire buffer#2020-05-0420:12Frank Henardnice. How did you figure that out?#2020-05-0420:16Frank Henardhttps://stackoverflow.com/a/965284/59439 demonstrates the "where-is" feature: C-h w command-name, but it didn't work for cider-repl-clear-buffer#2020-05-0420:17dpsuttonmy m-x autocompletes and annotates with keybindings#2020-05-0420:25Frank Henardthat's nice! It didn't work for me, but your settings look different. It looks like you're using spacemacs. I've wanted to add some spacemacs settings to mine, but I've been using vanilla emacs for a long time#2020-05-0420:25Frank Henardand I haven't taken the time to pick through the settings of spacemacs to figure out what I want and what I don't, and then figure out how to do it in vanilla emacs#2020-05-0421:05dpsuttonno spacemacs here#2020-05-0421:06dpsuttonjust vanilla emacs#2020-05-0607:34hindolI have doom emacs and my M-x lists the keybindings next to the command name, which is super helpful.#2020-05-0607:36hindolIf you know the major mode which is contributing the command, you can also "M-x describe-keymap" and then select the mode.#2020-05-0420:19dpsuttonif i were unsure i could do c-h a [ret] cider clear [ret] and get a list of functions.
cider-repl-clear-output is an interactive compiled Lisp function in
'cider-repl.el'.

(cider-repl-clear-output &optional CLEAR-REPL)

Delete the output inserted since the last input.
With a prefix argument CLEAR-REPL it will clear the entire REPL buffer instead.
#2020-05-0521:11SnaffuCurious if anyone has gotten lsp-clojure working within Emacs on FreeBSD? My configuration works perfectly fine in Debian Sid but when I attempt to run it in FreeBSD-CURRENT I get an error immediately post Initialize state in clojure-lsp.main. JDK versions are the same.#2020-05-0706:38David PhamIs it possible to write Clojure syntax compiled to elisp?#2020-05-0706:53hindolNone that I am aware of. Vim has Aniseed now.#2020-05-0813:18Cameronthis isn't directly related to emacs but I figured anyone who'd know would more likely be here; is the LSP protocol 'extendible'? Or is it a very specific set of features its meant to answer to / wrap#2020-05-0813:20Cameronthere's no XY problem here, btw, I'm not fully sure why I'm curious myself#2020-05-0814:39pesterhazyIs it just me or is MELPA very slow today?#2020-05-0814:42pesterhazyI'm trying to get started with clojure-lsp for the nth time, and I think I may be failing once more#2020-05-0814:43pesterhazyI always run into the weirdest issues#2020-05-0814:56Snaffu@pesterhazy I did a sync with MELPA an hour ago and it was fine. I pretty much just followed the docs for clojure-lsp and it works pretty well in Linux. I'm running it alongside python-lsp and that works fine also. You can check /tmp/lsp.out once it tries to start for debugging.#2020-05-0814:57pesterhazy@snaffu that log file is a useful hint#2020-05-0814:58pesterhazyok so I deleted my elpa directory to get a new version of lsp-mode#2020-05-0814:58pesterhazyI also had to trash ~/.emacs.d/.lsp-session-v1#2020-05-0815:01pesterhazyseems to be working a bit better now#2020-05-0815:03Snaffu@pesterhazy Cool.. glad to hear its working for you now#2020-05-0815:03pesterhazyThe documentation is impossible to understand for me though#2020-05-0815:04pesterhazy> It is possible to pass some options to clojure-lsp through clients' InitializationOptions. Options are a map with keys#2020-05-0815:04pesterhazyWhere does the configuration go?#2020-05-0815:09SnaffuThe only config I have is within my .emacs and pretty much what is mentioned on the clojure-lsp binary page here. https://github.com/snoe/clojure-lsp I just dropped those options in and commented out the ones I did not want to use.#2020-05-0815:10pesterhazyah, do you mean .lsp/config.edn?#2020-05-0815:10dpsuttonthose were just updated as well i believe#2020-05-0815:13pesterhazy@dpsutton do you mean the clojure-lsp package has been updated?#2020-05-0815:14dpsuttonno i mean specifically the emacs instructions on the repo changed the other day#2020-05-0815:14dpsuttonit was my config and someone updated them i believe. to be a bit more idiomatic with use-package#2020-05-0815:14dpsuttonit was more for @snaffu to check what the updates were as i'm assuming you are seeing the updates#2020-05-0815:15pesterhazyright yeah#2020-05-0815:16pesterhazyso my understanding now is that there's a .lsp/config.edn that can be used to configure source paths etc#2020-05-0815:17pesterhazyI'm trying it on a simple project, and even there it seems I need to do some configuration#2020-05-0815:19pesterhazythis seems to work for me
cat .lsp/config.edn
{"source-paths" ["src"]
 "ignore-classpath-directories" true}
#2020-05-0815:23pesterhazydo you all use clojure-lsp extensively? What are the features you're using the most?#2020-05-0815:30SnaffuI like the linting capabilities for clj and python. I prefer emacs over the jetbrains tools personally but the linting was something that I couldn't get easily. This handles that use case really well for me.#2020-05-0815:31pesterhazyhm yeah. joker already does that in a much simpler way though no?#2020-05-0815:36SnaffuI haven't tried joker, heard it was very nice but i hit an issue with installing it on BSD. Didn't know at the time LSP-Clojure would have that same issue, so I tried LSP. Plus I work in multiple languages, so having a unified top level methodology is appealing. The lsp-python works fine in BSD, it uses a pip.#2020-05-0815:44pesterhazyI think I was able to configure lsp for my CLJS work project now#2020-05-0815:44pesterhazyEmacs crashed a few times during the process so that's not too encouraging#2020-05-0815:44pesterhazyBut let's see 🙂#2020-05-0816:00SnaffuGood luck 🙂 I havent seen any crashes myself so hopefully it stabilizes for you.#2020-05-0818:13pesterhazyAlright! Seems like it's working pretty nicely!#2020-05-0818:13pesterhazyDifferent topic, how do I copy something from a helm window?#2020-05-0818:14pesterhazyE.g. I want to copy the name of a command. I can find the command using helm-M-x But then how do I copy that symbol?#2020-05-0818:18pesterhazyFound it: C-c <tab>#2020-05-0818:54pesterhazyEven better: C-u C-c C-k#2020-05-0818:56pesterhazyOr rather C-c C-k#2020-05-0819:55Eric IhliAnyone know how I can view a list of keyboard shortcuts while in a minibuffer? I'm using Doom and SPC s p runs projectile-ripgrep and I want to know how I can, for example, visit a result without losing the minibuffer, or persist the minibuffer in a new buffer, etc...#2020-05-0905:07hindolC-Space opens a preview while remaining in the mini buffer.#2020-05-0820:09pesterhazyIn helm C-j usually works for that#2020-05-0820:42Eric IhliIn Doom, with evil bindings, C-j moves down to the next line. I see describe-buffer takes an optional buffer argument, and C-x o works when in the minibuffer to switch buffers. So I thought I could C-x o to get out of the minibuffer and then (describe-buffer <name-of-minibuffer>) to get the description, but when I do a list-buffers while the minibuffer is open, I don't see the name of the minibuffer in the list.#2020-05-0820:53Eric IhliAh. C-h m. Of course.#2020-05-1013:07pesterhazyI've channeled my fresh enthusiasm for clojure-lsp into a Twitter thread: https://twitter.com/pesterhazy/status/1259466914969067525#2020-05-1106:27shem@pesterhazy does this coexist peacefully with Cider, or is it orthogonal?#2020-05-1106:42pesterhazy@shem I haven’t tried but I think they can be combined (like flycheck-joker can be combined with cider)#2020-05-1106:43shemok, will try it at some point.#2020-05-1111:37practicalli-john@shem @pesterhazy CIDER in terms of features is already a super-set of the current Language Server Protocol, although CIDER is using nrepl rather than the LSP specification. If you are satisfied with CIDER then the only benefit at present seems to be the ability to do some things without the REPL running. If your computer is resource limited or you wish to have a large number of Clojure project open and have auto-complete, find definition and some refactoring available, then LSP would be very useful. I am still trying to find an LSP implementation for Clojure that actually implements the complete LSP specification. The options t have LSP functionality without a REPL I have tried so far include: • clj-kondo-standalone - this is clj-kondo lint tool for environments that dont support running clj-kondo binary (eg. android devices - yes some people run emacs on Android). This is not intended to be a full LSP implementation • anakondo - https://github.com/didibus/anakondo - a early stage static analysis tool that provides LSP features based on clj-kondo - this is very easy to install as an Emacs package and the clj-kondo binary There is also clojure-lsp - https://github.com/snoe/clojure-lsp - this seems fairly complete although I have been unable to get this to work as yet so haven't tested it. Are there any others? Ideally LSP implementations for Clojure in Emacs would be folded into the CIDER orchard, providing a way to do all non-evaluation actions without a REPL and I believe there are no technical barriers to do so, someone just needs to contribute the work.#2020-05-1111:49practicalli-johnOne thing to be aware of is that LSP implementations are typically based on static analysis, so the whole code base of a project and its dependencies will need to be evaluated before the LSP functions work. If the static analysis blocks Emacs UI whilst processing, then the user will need to wait for that analysis to complete. I have found analysis can take far longer than starting a REPL for some project. Obviously as LSP implementations mature, then these issues should be resolved. Any feedback and contributions you can give to these project I am sure would be most beneficial in making them more robust and performant.#2020-05-1112:31sogaiui didn't think anakondo was lsp-based -- is it?#2020-05-1112:36dpsuttonNo it’s not. The only lsp on this list is untested#2020-05-1114:08Snaffu+1 on clojure-lsp, that is what I've been using. Its seemed the most complete when I was searching a couple months back.#2020-05-1114:23practicalli-johnclj-kondo-standalone is used via LSP, where as clj-kondo is a backend for flycheck. Although as stated it is not trying to be a full LSP implementation#2020-05-1116:34practicalli-johnI have got clojure-lsp to work now, using a similar config used for clj-kondo-standalone. The biggest drawback I have is a very slow startup time for Emacs now, taking over a minute the first time it carried out static analysis over my open projects. Most of my projects are small and have few dependencies, so will investigate why its taking so long. I think its a particular project that is taking up most of the time, that was the case when using anaconda to statically analyse my code. Consecutive restarts of Emacs also take about 30 seconds to start up, which is very noticable compared to the usual 3 seconds. clojure-lsp seems to be at least reviewing all the projects, I assume to check for changes. I assume its not running an analysis from scratch. Considering it takes less than 2 seconds to start a REPL and another couple to evaluate a project, there is a big up front cost to LSP for me compared to running a REPL. If there is anyway to reduce startup time then that would be good to know (apart from closing all the projects I regularly work on) I havent found a compelling reason to include LSP as part of my regular workflow yet, but hope that these small inconvieniences can be ironed out#2020-05-1116:44dpsutton> Consecutive restarts of Emacs also take about 30 seconds to start up this is wild. lsp-mode has not affected startup for me at all. the lsp process runs in the background and does slow emacs down when first visiting a file from a project#2020-05-1117:05practicalli-johnit was not what I was expecting, so am trying to diagnose over the next couple of weeks.#2020-05-1117:57SnaffuThere was a note, I believe on the main github page regarding the startup times. Going from memory but I think it was something to do with some JSON parsing that is happening behind the scenese. The suggestion was to use Emacs v27 or higher as apparently the JSON parsing was much improved in that release. Sorry, don't remember the details at more fine grained level. I've been running it on 26.3 myself with no issues, but my laptop is new and it was pretty snappy so I didn't dig into it any further.#2020-05-1118:01pesterhazy@snaffu I think you mean this section https://emacs-lsp.github.io/lsp-mode/page/installation/#performance#2020-05-1118:02pesterhazyI'm not seeing startup perf problems, but sometimes editing/typing gets very slow, especially (?) when aggressive-indent-mode is active#2020-05-1118:03pesterhazyI haven't figured out yet what's causing this dramatic slowdowns: sometimes with lsp-mode active it can take seconds for characters to appear on the screen#2020-05-1118:07pesterhazyI'm now trying the settings suggested in the link above - seems better#2020-05-1118:08pesterhazyI have a feeling it's related to autocompletion, but not sure#2020-05-1118:10Snaffu@pesterhazy - Yes that is the comment that I was trying to recall. It was definitely a startup time issue. The issue you mention while typing I have seen on an i5 pc inside a VM that is pretty constrained resources, something like 4G RAM and 2 cores where I was using LSP for Python. I haven't seen this on my other PCs, but they are i7 systems with a lot of cores and RAM so that didn't surprise me. Yeah, I agree with you, I think may be related to auto-complete, that is where I noticed it as well.#2020-05-1118:12pesterhazyI'm going to disable company-mode. I don't think I want auto-completion anyway, and I've never liked the way it worked in Emacs (perhaps I also just never had it set up correctly)#2020-05-1118:21dpsuttoni remember disabling autocomplete from lsp and using CIDERs#2020-05-1120:29practicalli-johnThanks @snaffu I have a few projects that have some geojson files in, so if the clojure-clj binary is statically analysing those files it could explain a lot of problems. I had assumed that it would only part clojure files and not json when analysing a project. I have mostly finished with those projects with geojson files, so I will remove them from Emacs and see if it affects startup times.
#2020-05-1120:31practicalli-john@pesterhazy I had issues with Emacs not redrawing the cursor straight away, turned out it was due to the desktop compositor I was using. I disabled it and the lag was fixed instantly and Emacs felt even faster.#2020-05-1120:35practicalli-john@dpsutton I use a snippet via auto-complete to add the fully qualified namespace when creating a new file. This seems to work with clojure-lsp and anakondo, so thats actually a plus point for LSP for me 🙂 I'll try and stick with LSP during the week, although I'm going to disable it for my live broadcasts at the weekends just so I have one less thing to be concerned about.#2020-05-1219:53hindolAuto creating the qualified ns at the top for new files work for me using CIDER as well. Did not configure anything.#2020-05-1223:01practicalli-johnThe ns snippet was only adding the name of the current namespace when CIDER runs a REPL. With LSP or anakondo the ns snippet works without the need of a running REPL (actions without a REPL was one of the mentioned benefits of LSP that we were discussing)#2020-05-1307:28hindolOh yes, that is a key difference. Good point.#2020-05-1307:29hindolI always leave the REPL running so never noticed that.#2020-05-1120:53dpsuttonfor sure! i'd love to watch a few live streams if you have a link that i can watch#2020-05-1121:06practicalli-johnAll my videos and live streams are via https://www.youtube.com/c/practicalli I have a years worth of video, mostly done with Emacs/Spacemacs with Clojure if you are stuck for things to do during the pandemic.#2020-05-1123:02bartukaI was looking for a live stream using spacemacs to get a feel how people usually work with vim bindings inside emacs.#2020-05-1211:42Snaffu@jr0cket - thank you for the link, will definitely check out your channel 🙂#2020-05-1222:09dpsuttonsetting up a coworker with spacemacs. anyone know how to evaluate random elisp in the minibuffer? in vanilla its just M-: ...#2020-05-1222:40Eric Ihli(describe-function 'eval-expression) wherever you can and that should tell you what shortcuts are available for it.#2020-05-1222:40dpsuttondoes anyone have a good idea on how to do dir-locals with many users in the company? finally have another emacs user and now need to not hardcode my stuff in dir locals. for example:
((nil
  (cider-path-translations . (("/root/" . "/Users/dan/") ("/src/" . "/Users/dan/projects/")))
  (cider-redirect-server-output-to-repl . nil)))
the path translations can't talk about `/Users/dan/' anymore. anyone have a good way to organize these? I don't want to setq them since its not the only project we use
#2020-05-1222:46Eric IhliMight not be worth much effort to share dir-locals in any way other than a template/script that everyone can customize and make their own. Add .dir-locals to .gitignore and commit a .dir-locals.template that people can use as a reference.#2020-05-1222:47Eric IhliBut if the org is big, or growing, and you do want to standardize, then you could use something like Ansible for dev workstation provisioning. I know most people use it for server management/provisioning. But it works just as well for local stuff.#2020-05-1222:48dpsuttonyou're probably right. thanks!#2020-05-1421:51iarenaza@U11BV7MTK In case you are interested, this is what I have, so I don't have to tweak project by project:
elisp
((clojure-mode
  . ((eval . (setq-local cider-path-translations (list (cons "/app" (clojure-project-dir (buffer-file-name (current-buffer))))))))))
#2020-05-1421:52dpsuttoni think that evals on every buffer though unfortunately#2020-05-1421:52dpsuttonah, the setq local. i like it#2020-05-1421:52dpsuttoni wish there was something built in that would just set it once but that's pretty nice#2020-05-1421:53iarenazaYes, that's the idea. I can have several projects open, each with different (non prefix shared paths) and every one picks its own translation paths.#2020-05-1222:41dpsuttonand thanks @ericihli#2020-05-1522:49papachanHello. with clj-refactor.el it provides a very useful command cljr-add-project-dependency to automatically add a specific version to a project config file, but it seems it works only with project.clj file. Thats weird because i was always using projects without lein support. I am confused.#2020-05-1522:50papachanSomeone know why i cannot use it with deps.edn?#2020-05-1604:25hindolI use it all the time with deps.edn.#2020-05-1604:29hindolYou must create the :deps key first.#2020-05-1607:05Michaël SalihiSalut à toi @U1ZJ06MMK! Yes, I use with deps.edn too and no problem. This work for all this project files (thread-last '("project.clj" "build.boot" "pom.xml" "deps.edn" "shadow-cljs.edn") Watch out if you have both project.clj and deps.edn in directory the first take the priority according to their position in the list. https://github.com/clojure-emacs/clj-refactor.el/blob/8259791e054382457b87d1f78061b5e3ce948907/clj-refactor.el#L818#2020-05-1612:30papachan@UJRDALZA5 @UFBL6R4P3 Hey ! thank you. i will check it ! have a nice day !#2020-05-1814:17Eric IhliAnyone know how to get syntax highlighting to work properly for CLJC files? Text is all colored like comments in clojure-mode.#2020-05-1814:20dpsuttonthere are two things you could do. It's diminishing these because presumably you have a cljs connection open so its showing you the :cljs branch. So you could set your mode to clojure-mode instead of clojurescript-mode or open up a clj repl and then go back to this buffer and it should work. Alternatively, you can prevent this feature from showing the branch it thinks will be taken and diminishing the other by (setq cider-font-lock-reader-conditionals nil) which will turn off this feature.#2020-05-1814:20dpsutton
cider-font-lock-reader-conditionals is a variable defined in 'cider-mode.el'.
Its value is t

Documentation:
Apply font-locking to unused reader conditional expressions depending on the buffer CIDER connection type.
#2020-05-2401:24mister_mHello - does anyone know how I can run tests from CIDER with an added profile? Using lein at the terminal I'd run something akin to lein with-profile +blah test , but I am not sure how to force this in CIDER. I have a test of mine that I am wanting to debug.#2020-05-2401:29dpsuttonIs your question how to jack in with a profile? #2020-05-2401:31mister_mhonestly, not sure#2020-05-2401:31dpsuttonAs CIDER runs tests in the running repl so that seems to be the answer. If so then you can use a prefix argument when jacking in and edit the docstring of the command that CIDER uses#2020-05-2401:38mister_mthat sounds like the way to go in my case. How does one jack in with a prefix argument? I'm only aware of the M-x cider-jack-in#2020-05-2401:44mister_mLooks like I might want cider-lein-parameters mentioned here https://docs.cider.mx/cider/0.24/basics/up_and_running.html#_customizing_the_jack_in_command_behaviour#2020-05-2401:47dpsuttonThat’s something you can set yes. And as a one off you can try C-u M-c cider-jack-in#2020-05-2401:55mister_mThanks for the direction!#2020-05-2623:05Lyn HeadleyI've been using lispy but it feels like I'm the only one. What are its competitors besides class paredit?#2020-05-2706:49hindolYou are definitely not the only one. Lispy is very popular. For a very different take, you can check out parinfer.#2020-05-2713:32aisamu+1 you're not the only one! abo-abo is also incredibly responsive - he's fixed multiple small issues within hours of me opening the issue#2020-05-2623:05Lyn Headleyer *classic#2020-05-2713:32aisamu+1 you're not the only one! abo-abo is also incredibly responsive - he's fixed multiple small issues within hours of me opening the issue#2020-05-2701:59ACsmartparens is popular too#2020-05-2706:48practicalli-john@laheadle smartparens is what I recommend. It works with multiple programming languages and provides a wide range of structural editing commands. It's especially recommended if you want to control the structural editing of your code. I found lispy too confusing with its automatic parens editing.#2020-05-2710:50nmkipMaybe I'm missing some smartparens config but if I have the following sexp and delete to end of line d $ it results in an unbalanced expression:
(a b | c d e) -> (a b
that problem dissappeared when I added evil-cleverparens :
(spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode)
But some keybindings like >> << H L were overriden by evil-cleverparens 😞 I had to:
(setq evil-cleverparens-use-additional-movement-keys nil)
in order to get H and L back. Do you use smartparens and evil-cleverparens? Or just one? What do you usually do when you want to do something like:
(a b (c d |e f g) h i j) -> (a b (c d) h i j)
#2020-05-2711:39dotemacs> if I have the following sexp and delete to end of line d $  it results in an unbalanced expression:
(a b | c d e) -> (a b
It must be down to your config. As this scenario should not occur.
#2020-05-2711:58nmkip> It must be down to your config. As this scenario should not occur. Maybe I'm missing config, as it's almost the default spacemacs config: clojure layer and (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode) If you have some spare time, you can check my config here: https://github.com/juan-ignacio-848/dotfiles/blob/master/spacemacs.el#2020-05-2714:39practicalli-johnWhen using Evil style editing, then using evil-cleverparens is recommended.#2020-05-2714:41practicalli-johnI use D to delete to the end of the expression, this will change (a b (c d |e f g) h i j) -> (a b (c d) h i j)#2020-05-2714:42practicalli-john@UJCC6CE9E set dotspacemacs-smartparens-strict-mode t#2020-05-2714:46practicalli-johnYou have redundancy in the evil-cleverparens config, you are setting it for all modes (line 587) and for clojure specifically (line 591). You can drop the clojure specific config as its covered by the former one https://practicalli.github.io/spacemacs/install-spacemacs/evil-structural-editing.html#2020-05-2714:50practicalli-johnIf you are using Spacemacs develop branch (and I hope you are), then these lines are not required https://github.com/juan-ignacio-848/dotfiles/blob/master/spacemacs.el#L608-L615 You already have clj-kondo included in the clojure layer on line 57#2020-05-2722:29nmkipYes, I'm using develop branch. 🙂 I removed the redundancy in the evil-cleverparens config, with D this works (a b (c d |e f g) h i j) -> (a b (c d) h i j) , this is because of evil-cleverparens right? Done, it's working as expected !!#2020-05-2723:35nmkipthanks#2020-05-2715:00codeasoneI'm using paxedit along-side smartparens at the moment, it's a nice complement that's not often mentioned https://github.com/promethial/paxedit - mostly use this for paxedit-transpose-{forward,backward} which works great within lets and maps#2020-05-2715:44practicalli-johnIf you know vim editing style, then using Evil actually does a lot of things I would otherwise need a structural editing or refactoring package to do.#2020-05-2716:03Charles FourdrignierIt's probably a stupid question, but I would like to understand the why behind this. When I launch my REPL from Emacs with CIDER (via clj), clojure.inspector can't open windows. It doesn't crash, returns a Swing object but I can't see the window. Could someone share some knowledge about this ?#2020-05-2719:47sogaiuit's not that the window is hiding behind something else right?#2020-05-2805:52Charles FourdrignierNo. 🙂 But your suggestion make me test on my personal computer and it works (the window opens). So the problem is only on my work computer. They are both Mac, with Emacs + CIDER, but there is probably a different version. I will check this.#2020-05-2906:43Charles FourdrignierFor information, after updating CIDER package on both computers, it works on both. Thank you for your suggestion.#2020-05-2909:14hindol(Sorry if this belongs to #off-topic) I have always heard magit is awesome but never realized to what extent. What sorcery is this?#2020-05-2909:28milgraIt's the biggest sorcery in VCS history after git! :) Managing all versioning related stuff in just one text buffer is an extreme productivity jump, like moving to emacs or using a tiling window manager.#2020-05-2909:49practicalli-john@hindol.adhya magit is magic. I used to obsessively use the command line for git, but now I use Magit for everything, even creating pull requests and gists from Emacs. Magit makes reset and rebasing so easy too https://practicalli.github.io/spacemacs/source-control/magit/ (some of the videos are a little old but are mostly correct, i.e. magithub has been replaced by forge)#2020-05-2909:53hindolI have the exact same experience. I have so far used git from command line because none of the GUIs/wrappers stuck with me and I never felt git CLI is a problem. But after going through the Magit manual yesterday and today, I already feel more productive. The mnemonic keybindings are great!#2020-05-2909:53hindolMagit solves a problem I never knew existed.#2020-05-2912:24sogaiui ❤️ magit. on the subject of guis for git, i used to use smartgit before i used magit. i like their index editor idea a lot: https://www.syntevo.com/doc/display/SG/Staging%2C+unstaging+and+the+Index+Editor that really helped in developing my mental model of how some things work in git.#2020-05-2912:54hindolI have used git add -p to similar effect, for staging. Magit makes it simpler. But that's not the selling point for me. I love how every command imaginable is just two keystroke away from the status buffer. Even complex operations like rebase.#2020-05-2912:56sogaiuyeah, that's nice too :)#2020-05-2912:56sogaiui think the author may have abstracted that functionality out into a library iirc#2020-05-2912:56practicalli-johnand if you cant find what you want, ! menu in magit status will let you type a git command. I think I used this once in 4 years#2020-05-2912:58practicalli-johnI am enjoying using forge to create issues and pull request from within Emacs too https://practicalli.github.io/spacemacs/source-control/magit/forge.html#2020-05-2913:00hindolYeah, forge is next in my list of things to learn.#2020-05-2913:57hindol@U05254DQM FYI, your tutorial on forge helped me setup ~/.authinfo.gpg. I was struggling with it without your guide. Thank you!#2020-05-2914:15practicalli-johnI think the last time I looked at PGP was at the end of the 1990's, so I was a bit lost to start with. EasyPG in Emacs did help though. I need to expand on creating a PGP key with gpg (although a key is optional)#2020-05-2914:35dev-hartmannI love the 'magit solves an issue I never knew existed' one. exactly how I felt when I really gave it a try#2020-05-2914:35dev-hartmanncli feels very barbaric now 😄#2020-05-2914:36dev-hartmannwill checkout forge, as I'm not aware what it's all about#2020-05-2914:39hindolWhat magit is to git, forge is to Github.#2020-05-2914:45practicalli-john@U0J8XN37Y in a nutshell, work with github (gitlab and other similar services) issue and pull requests in the magit status buffer. Also create forks and pull requests (no need to visit GitHub to press the green 'create pull request' button#2020-05-2914:47dev-hartmannthanks @U05254DQM! Just reading through your page on it. creating PRs from magit is infact another layer of icing on the cake. will include that into my setup!#2020-06-0200:22eccentric JAre there any links or examples for replacing the js indent rules? I'm interested in replacing a function or two to get the indentation the way I prefer without having to disable electric indent.#2020-06-0208:30blue0513is it? https://stackoverflow.com/a/4178127#2020-06-0213:08eccentric JI have that set, it made it better but it's like the logic for it is a bit off for chained expressions which are a major component of my style and if electric indent is enabled editing ones already formatted the way I like also get messed up#2020-06-0213:48ericdallohttps://github.com/wandersoncferreira/cljr-ivy#2020-06-0217:25ericdalloby @UBSREKQ5Q#2020-06-0315:43borkdudeany asciidoc modes for emacs that are maintained?#2020-06-0315:51hindolWhat are the features you need?#2020-06-0315:52borkdudemaybe some syntax highlighting?#2020-06-0315:59hindolI have used adoc mode for that. It's okay for syntax.#2020-06-0316:04practicalli-johnhttps://github.com/sensorflo/adoc-mode/wiki is what I use also, although do not write much asciidoc.#2020-06-0316:08borkdude@U05254DQM What do you write your books in? I'm dipping my toes into https://babashka.org/cookbook/#2020-06-0316:12practicalli-johnI use https://github.com/GitbookIO/gitbook-cli but I am trying to find something different. I chose it mainly because I can do workshop style websites that have a responsive design without having to write all the html and css templates. It has some convienient plugins, but as its single threaded its very slow to generate a new version of the book (about 40 seconds).#2020-06-0316:14practicalli-johnWould love to find a babashka powered alternative 🙂 Or Clojure in general, or at least something that will use most of my 12 cpu threads. Busy writing content and creating videos for the next couple of months though... Your book looks great so far.#2020-06-0316:17borkdudeasciidoctor seems pretty powerful#2020-06-0316:17borkdudealso easy to generate a PDF with it#2020-06-0407:43myguidingstarCoincidentally I'm also looking at asciidoc/antora as an alternate to gitbook-cli :D#2020-06-0400:07eccentric JAnyone out there using lispy? How do you unwrap parenthesis like say from '(:a :b :c) to (:a :b :c)?#2020-06-0401:23eccentric JNevermind. Just pressing x over the paren does it.#2020-06-0411:33p3r7If any of you uses book Clojure, The Essential Reference (comprehensive documentation for the Core Lib), I made a small package to quickly jump to documentation of symbol from Emacs#2020-06-0411:33p3r7https://github.com/p3r7/clojure-essential-ref#2020-06-0420:51AEHi, I've been trying to follow the installation instructions on Brave Clojure https://www.braveclojure.com/basic-emacs/ (on mac osx) and I can't get past the step 3 part "Run mv path/to/emacs-for-clojure-book1 ~/.emacs.d." These are probably stupid questions but I can't figure it out... I run the "mv path..." in terminal? It says No such file or directory wherever i run it. I've manually searched for the file path but I don't see it. Any suggestions? Is there a video of someone doing this?#2020-06-0422:14practicalli-johnI would not recommend using the Emacs configuration in Brave Clojure, it is very out of date, lacking in features and seems to be unmaintained. I suggest using one of the following Emacs configurations instead: http://spacemacs.org https://github.com/hlissner/doom-emacs https://github.com/bbatsov/prelude#2020-06-0422:15practicalli-johnChoose Spacemacs or Doom Emacs if you want to use Vim style editing. Or prelude if you prefer classic Emacs.#2020-06-0422:16practicalli-johnI do recommend Spacemacs and have a book on how to use it for Clojure development. It can also be set up with 2 git clone commands https://practicalli.github.io/spacemacs/#2020-06-0500:10sogaiuregarding the specific question, the command should be executed from the terminal. iiuc, the intent is to move the uncompressed content, a folder, to a specific location, so if you can do that by other means, using the terminal is not necessary.#2020-06-0500:14sogaiuwhat practicalli said about out-of-dateness matches my experience though. if you aren't already an emacs user, there are other options too these days.#2020-06-0501:31AEThanks so much @U05254DQM and @UG1C3AD5Z I will check those out tonight. I have had an easier time learning clojure and clojurescript than figuring out emacs. Also @U05254DQM I recognize your name from the tic tac toe practice project I did, thanks for that!#2020-06-0507:44practicalli-john@U0135E0PFDX if you do not wish to learn Emacs there are other editors tha support Clojure very well. The Calva plugin for VSCode is excellent. Clojure aware editors I recommend https://practicalli.github.io/clojure/development-tools/#2020-06-0421:22ACyes, using the terminal. you'll want to replace the "path/to/" part with the actual location of the file you downloaded. most likely it is in your Downloads folder, so the command you run might look similar to this: mv ~/Downloads/emacs-for-clojure-book1 ~/.emacs.d #2020-06-0421:37AEthanks @U0124C56J5R! Far and away the hardest part of learning clojure for me has been stuff like this. Is there something I can check to confirm it worked?#2020-06-0421:39AEI entered it into terminal I think correctly. I tried the next step C-x C-f in emacs to Navigate to ~/.emacs.d/customizations/ui.el, but I don't see a line 37 on there to edit. That file looks blank to me in my emacs#2020-06-0502:00ACIf the mv worked correctly, you should see a list of files if you do this (in terminal): ls ~/.emacs.d/#2020-06-0502:07AEthanks!#2020-06-0513:24Cameronwelp, trying doom emacs again, it was ok before but I really love it this time#2020-06-0513:28Camerongranted, one of the main things I want is pretty superficial; I just like it to look visually polished, since I can typically handle getting the features I want how I want. Every couple of days I spend all day flipping through my emacs themes because there's something off or grating about the appearance for me, like having stray chaotic notes in some of the chords of a song, but I can't quite figure out what it is#2020-06-0513:29Cameronwhatever the case, somehow subtly doom does not seem to have it#2020-06-0513:29Cameronalthough I still cannot get satisfied with just one theme ahahaha I'm flipping through them again#2020-06-0514:24naomarikI've been using doom-vibrant in spacemacs forever now, before it was all darcula.#2020-06-0514:26nmkipI like doom-tomorrow-night from the doom-themes package#2020-06-0514:30dpsuttonthe kaolin themes are quite nice. if outside or want a light theme for a while, kaolin-light is quite nice. and kaolin-temple is a nice dark theme#2020-06-0514:33nmkipI'll check them!#2020-06-0514:44practicalli-johnI have been using doom-solarized-light for a long time and doom-solarized-dark before I started broadcasting. Just this week I switched to doom-gruvbox-light theme and the doom modeline theme, I like the clean look to the modeline.#2020-06-0521:06nmkipI liked doom modeline theme, however, if I recall correctly, the cursor color didn't match modeline color and I didn't know how to change it.#2020-06-0802:02practicalli-johnIn the themes I have used, the cursor itself is the right Spacemacs colour for the editing state its in (normal, insert, visual, iedit, etc). Depending on the theme used in the modeline icon in the left corner doesnt match the cursor (would like to change that if I find out how). Also the icon doesnt always show the differences between editing modes, especially normal and insert states, so I switched to the ascii view of editing states. I changed a few of the doom theme settings to get something I am happy enough with... https://github.com/practicalli/spacemacs.d/blob/master/init.el#L661-L701#2020-06-0802:57nmkipThis is the theme I'm using right now 😄#2020-06-0802:58nmkipI'll check the changes you made tomorrow, maybe I'll give doom modeline another chance.#2020-06-0815:42practicalli-johnThe doom-gruvbox-light theme with doom modeline theme I use looks like this https://practicalli.github.io/spacemacs/images/spacemacs-doom-gruvbox-light-theme-examples-home-spacemacs-config.png#2020-06-0518:47hindolYep, Solarized Light works best for me as well. I love how soothing it is for my eyes.#2020-06-0601:24Cameronthe doom themes, kaolin, and spacemacs themes (even though that's only 2) are some of the nicest I've found, and those are the ones I switch between the most to get rid of that weird grating feeling. Then after that, its certain individual themes, many of which taken from other places (atom-one-dark I think, any variation of molokai / monokai, the visual-studio themes occasionally) and other random themes l really like, like leuven#2020-06-0601:24Cameronthe gruvbox themes I also found can look really nice#2020-06-0601:25Cameronstill have no idea what it is that is causing that feeling, since normally I pay no attention to design and appearance (and in fact, originally I just used emacs in the terminal, and that theme felt perfect) ; I'm still wearing shirts I bought at the end of middle school, emacs is the only time I grow eyes#2020-06-0801:45maximSwitch between light and dark themes, depends on your local time. https://github.com/mkaschenko/emacs/blob/master/.emacs.d/elisp/init-solarized-theme.el#2020-06-0803:40bartukacool, I had something similar but in my case I explicitly removed the current loaded theme before loading a new one using disable-theme.#2020-06-0813:35gerredit would be cool to mix this with f.lux's LAN api! https://justgetflux.com/news/pages/v4/welcome/#2020-06-0911:55gammarrayOr redshift#2020-06-0821:09eccentric JDoes clojure-lsp have any benefits over clj-kondo + anakondo?#2020-06-0821:13dpsuttonlsp offers refactorings which i don't believe clj-kondo offers. navigation and documentation as well#2020-06-0821:13dpsuttonalso, i think anakondo did linear scanning of all completions so it might not be suitable for larger projects. that is from a quick skim once and is not a well-founded opinion, just a first impression#2020-06-0821:17dpsuttonthe linear scans through lots of hash maps are in this function: https://github.com/didibus/anakondo/blob/master/anakondo.el#L593#2020-06-0821:18dpsuttonwhich just calls (hash-table-values hash-table).#2020-06-0901:39maxim@ag Appreciate for posting my snippet to M-x tips. A nice surprise in the morning.#2020-06-0901:42agHey, sorry, I should've probably asked you first.#2020-06-0901:42agI've figured you shared it with us already, a few more people would be okay#2020-06-0901:47maximYep, no worries about that.#2020-06-0901:49agThank you!#2020-06-0914:39ericdallohttps://github.com/seagle0128/doom-modeline/pull/350#2020-06-0914:39ericdalloFYI @U051BLM8F cider parrot#2020-06-0914:51hindolThanks @UKFSJSM38. This has been a pain point for me as well. I wonder if there is a better REPL icon...#2020-06-0914:52ericdallome too, I didn't find anything better on all-the-icons.el , but I think this is a start#2020-06-1007:40bozhidarPretty cool, indeed!#2020-06-1015:31practicalli-john@UKFSJSM38 looks great, thank you. I just started using doom modeling for my live coding broadcasts, so this will be a nice addition. Do you know if there is a full colour icon for Clojure buffers, similar to the colour emacs icon for elisp buffers?#2020-06-1015:39ericdalloThanks @U05254DQM, glad it helps 🙂 I think enabling doom-modeline-major-mode-icon already displays a icon using all-the-icons.el package for clojure buffers too:#2020-06-1016:07practicalli-johnYes, I have that icon, but it's not as nice as the Emacs logo. I was hoping to have a Clojure icon more like https://images.app.goo.gl/e5CfqRFWM9jneT3s5 Was wondering if it's possible and just needed a pull request#2020-06-1016:20ericdalloI see, sadly this is not easy as these icons are from a very famous package called all-the-icons.el , and they are not images, https://github.com/domtronn/all-the-icons.el/tree/master/fonts. So I think this is not easy to customize or change on doom-modeline 😕#2020-06-1016:58practicalli-johnIt would be nice to use something like this clojure font I just made (its essentially the inverse of that used for all-the-icons and seems to be more comparable to the Emacs and markdown fonts that I see in the doom mode line. https://github.com/practicalli/alternative-fonts I will see if I can figure out how to use this with doom mode line or see if all-the-icons will take a pr (assuming I can figure out how to add it to their existing font)#2020-06-1017:09ericdalloI could not open the link (404), but a PR on all-the-icons may be a way to use it on modeline and many other paces like treemacs and dired.#2020-06-1017:39practicalli-johnOpps, made it private by mistake, its public now. On my setup it seems treemacs and dird already use a nice colored logo. I will take a look at the all-the-fonts project at the weekend, have a lot of other things I need to do by then :)#2020-06-1022:27ericdallolooks really good, but it seems to be clojure specific, I don't know what all-the-icons guys will think about it 😕#2020-06-1022:28ericdallomaybe you can try to edit a exists font and include that image#2020-06-1022:28ericdalloreplacing/adding to a font that already exists on all-the-icons: https://github.com/file-icons/icons#2020-06-1104:33Rob AguileraCurrently using parinfer with Emacs and it doesn't seem to be working on cljs files, but works perfectly on clj. Issue is whenever I drop to the line below a form and attempt to tab over I get the error Wrong number of arguments: (1 .1) 0. Anything I can configure to get that to work? Did a google search and surprisingly came up with nothing. Edit: nvm, I stumbled across some magical set of key strokes that made it work.#2020-06-1121:19Cam SaulHey everyone. I think getting in to Emacs Lisp can be a little hard, even if you've been using Emacs for a while, and even if you know Clojure pretty well on top of that. I'm started a series of blog posts that show you how to write Emacs Lisp step-by-step for practical real-world things. A "Practical Emacs Lisp" if you will. I'm starting with a 3-part post that explains how to write a command that displays a preview of Markdown files directly in Emacs, and it goes into a lot of detail explaining basic concepts you need to understand in order to write that command. I'm trying to find a good balance between showing people how to build cool things right away and explaining the concepts behind them. On one end of the spectrum, I'm just showing you some code that you have no understanding of at all. On the other end of the spectrum, we spend so much time explaining concepts that you know how the whole language works before you've actually used it for anything. So my goal is to find a good middle ground where we start building cool things immediately but get to learn Emacs Lisp concepts gradually at the same time. The 3-part post starts here: https://camsaul.com/emacs-lisp/2020/06/09/emacs-lisp-intro-markdown-live-previews-part-1.html I've gotten a lot of good feedback about the series in https://www.reddit.com/r/emacs/comments/h08cq8/intro_to_emacs_lisp_adding_live_previews_when/ and elsewhere, so I'm planning on making it the first part of an ongoing series of posts in the same vein. If you've every wanted to drink the Kool-Aid and learn Emacs Lisp, I hope you find these posts useful, and please let me know if you have any feedback or suggestions!#2020-06-1121:26eccentric JThis is great! I had just switched to Doom Emacs about 9 days ago from using Spacemacs for about a year.#2020-06-1121:26eccentric JMarkdown preview is definitely a feature I've been pining for. I would also love more details on configuring\using org-mode.#2020-06-1121:31naomarikHow do you like it vs spacemacs? I kept trying to try it out but have too much work to do so haven't given it enough time yet.#2020-06-1121:42eccentric JI LOVE it. I can't remember the last time I was this excited\motivated to learn how to customize a tool like this. I learned more in 1 day about emacs lisp using Doom than a year of Spacemacs.#2020-06-1121:51naomarikdo you feel it's faster too? my main problem with spacemacs is that it seems a bit slow sometimes, actually my mac can't run it anymore without burning up#2020-06-1121:59eccentric JYes, for me it boots up in < 3 seconds (though there's instructions for setting up native compilation in the Doom discord, which people are now getting < 1 second boot). It feels snappier despite all the customizations I've been adding https://gist.github.com/eccentric-j/04a20edcfb7bb41bc85aa1ee503207e2.#2020-06-1122:58sogaiui found two things that were helpful to know about doom are: 1) there is an out-of-emacs update process, 2) asking for help at the discord server is very much worth it#2020-06-1123:07eccentric JVery true! The other interesting discovery is how REPL driven Emacs actually is. My Spacemacs process was typically to update my config, hope like mad that it worked, and use SPC f e R to reload the config. With Doom it was immediately clear how to evaluate directly against emacs like I would with cider. That made learning elisp a lot more fun and fast.#2020-06-1300:32sogaiu@jayzawrotny i don't follow what you mean by "With Doom it was immediately clear how to evaluate directly against emacs" -- would you mind elaborating on that a bit? i typically use M-: (eval-expression) or C-x C-e (eval-last-sexp) for emacs lisp -- are those or something like it clearer in doom?#2020-06-1301:00eccentric JTrue, I didn't mean to suggest it's specific to Doom. More like because doom is configured by writing elisp code combining macros\functions, the evaluation capabilities and tutorials were surfaced very early on in the getting started experience. I didn't even realize you could do that with Spacemacs.#2020-06-1301:50sogaiuthanks for the clarification, i think i understand better :)#2020-06-1322:12sogaiumay be people have seen this already, but fwiw, the hopl iv thing that has rh's clojure history paper appears to have something for emacs lisp: https://dl.acm.org/doi/abs/10.1145/3386324#2020-06-1412:42manas_marthiHi All, I don't use C-b, C-f, C-p, C-n for cursor movements. I want to use them for expression evaluations. Did anyone try that. Does it break anything else?#2020-06-1412:48hindolYou can invoke describe-key and hit those key combinations. It will tell you what commands are currently bound to those key combinations (if any). Then you can decide if you need those bindings or not.#2020-06-1417:50manas_marthithanks. I did not know about describe-key. I will try it#2020-06-1412:50hindolSince you already mentioned you don't use those, go ahead.#2020-06-1611:20kimimHi all, I managed to eval Clojure in org-mode without project.clj and cider. Maybe someone is looking for this solution, you can check my emacs config: https://github.com/kimim/kimim-emacs/blob/master/README.org#clojure#2020-06-1619:48lambduhhhHowdy! Since the sheer amount of people that can get hype about this are pretty slim and I am over here just brimming with excitement ya'll get a peek at this awesomeness that arrived today.#2020-06-1619:48lambduhhh#2020-06-1619:51lambduhhhI custom designed a mech keyboard to complement my emacs (spacemacs theme although I dont use SM). I personally designed each key using inkscape with an emacs macro in mind. Even the font matches! Its pretty cool and I thought some of you might appreciate : )#2020-06-1619:55dpsuttonthat looks awesome. i'm also digging the two mice. do you sometimes left hand the moue?#2020-06-1619:56lambduhhhYeah depending on how much scrolling through documentation I have to do I like to alternate to give my righty a break 😂 took a week to get used to but I highly recommend#2020-06-1623:04naomarikI'm intrigued but confused, what? Two mice? Can you explain more?#2020-06-1620:01hindolWow, just looking at this is so uplifting.#2020-06-1620:02dpsuttonmy boss two years ago got used to left hand mouse for less travel and he raved about it#2020-06-1620:02dpsuttonnice setup!#2020-06-1620:02dpsuttonits always struck me as something clever people do#2020-06-1620:14lambduhhhThank you folks!! I’m very excited lol It’s ironic bc upon getting this in the mail I realized that I reckon that (for the most part) the typical emacs user and the type of person that would get hyped about a pink/purple custom keyboard… well, they don’t exactly overlap… lol but hopefully ye ole fellow neckbeards can join me in an approving nod and a stoic “yeah, thats cool” 😂#2020-06-1622:38Eric IhliBrilliant. Nice setup. I have ordered a second mouse. It's so obvious now. Also makes me want to experiment with a symmetrical mouse in the middle of a split keyboard.#2020-06-1722:21Bobbi TowersI'm working on the Exercism docs for the #babashka track and would like to provide a minimal init.el config, but not so minimal that it would lack basic functionality. Besides CIDER itself, what Emacs packages do you consider truly essential?#2020-06-1722:46borkdude@porkostomus Personally I like emacs prelude by @bozhidar . Just git clone it and get going#2020-06-1800:04Bobbi TowersI put a link to that (and Spacemacs and Doom Emacs) but it seemed appropriate (and consistent with the other editors) to explain the most "vanilla" way as the primary method. My personal list: • evil • rainbow-delimiters • company • cyberpunk-theme • nyan-mode nyantocat • aggressive-indent Obviously not all of these are "essential" 😆 And I'm probably missing some that I shouldn't be.#2020-06-1801:12bartukaI have been doing some "truly essential" config myself for a while, my current packages are • clojure-mode • cider • paredit • toggle-test • clj-refactor • magit • projectile • company • docker (bc every project I work has a docker-compose.yml setup)#2020-06-1801:13bartukano themes, only
(defun bk/default-slate-grey ()
  (interactive)
  (set-background-color "DarkSlateGray")
  (set-face-background 'mode-line "Wheat")
  (set-face-foreground 'mode-line "DarkSlateGray")
  (set-foreground-color "Wheat")
  (set-face-foreground 'ido-subdir "orange")
  (bk/set-monaco-font))
#2020-06-1921:47ziltiI am surprised how rarely lispy-mode gets mentioned#2020-06-2011:21sogaiuwrt lispy, i remember there being some really great bits, but when i used it there were parts i wanted to turn off / disable but i didn't figure out how to. i also found it took me a while to get used to it. though i stuck with it for a while, in retrospect i think that might make gradual adoption of it somewhat difficult.#2020-06-2017:33lilactownI have a really weird thing happening#2020-06-2017:33lilactownwhen doing certain actions I see this message flash: Contacting host: http://clojurians.slack.com:443#2020-06-2017:33lilactownactions like renaming a file o_O#2020-06-2017:34lilactownat some point yesterday I tabbed back into Emacs and it had https://clojurians.slack.com open in a buffer#2020-06-2017:34lilactownanyone know what might be causing this?#2020-06-2017:45hindolWhen you do M-x, are there Slack related commands available?#2020-06-2017:49lilactownno#2020-06-2017:52lilactownI restarted emacs and I haven't seen it happen yet#2020-06-2017:52lilactown:thinking_face: I did see this after renaming a file:
File /Users/lilactown/esprit/https:/clojurians.slack.com/archives/DG0AGV12L removed from the recentf list
#2020-06-2017:53lilactownI haven't seen it again#2020-06-2018:14hindolI cannot think of anything else without at least identifying which command triggers it.#2020-06-2209:34danielgrosseHello. I switched from SpaceMacs to Doom as I like minimal approach. But I'm not really fine with the clojure editing modes. I miss Structural editing at the most. Are here doom emacs users which modified their config to improve this?#2020-06-2210:24practicalli-johnA lot of people have mentioned the lack of key bindings for Clojure when using Doom. Take a look at the Spacemacs Clojure layer for examples, but it will take a lot of hacking. This is the reason I just added a Doom theme to spacemacs and got on with work. Sorry, cant be of more help. Hopefully someone has done the work to set up key bindings and config. Maybe asking on the Doom Discord channel would be useful.#2020-06-2210:45naomarik@U068SUJNT if you find a solution let me know, I'm using spacemacs's lisp editing nonstop spc k <key> <key> all the time for lisp editing and it tripped me up trying Doom. I didn't give it any time though yet.#2020-06-2220:42practicalli-johnHaving a look at the doom config, I didnt seem smartparens or the older paredit anywhere, so not sure how to add them. It seems lispy is available, but that does its own thing and not how I approach structural editing. I'll stick with using doom theme and doom modeline theme in Spacemacs and get some work done for now 🙂 If anyone adds the same features for Clojure as Spacemacs, then I'll re-evaluate. https://github.com/syl20bnr/spacemacs/tree/develop/layers/%2Blang/clojure#2020-06-2411:24kimimdear all, whether cider-nrepl support ring? When I start ring server with this option:
:ring {:handler km.core/app
         :nrepl {:start? true}}
Then I cider-connect-clj to the nrepl, the code completion is not working.
#2020-06-2412:45dpsuttonThis is using lein ring-server?#2020-06-2412:46kimimYes. I'm using lein ring server-headless to start the server and nrepl#2020-06-2412:47dpsuttonUnfortunately that plugin injects nrepl version 0.3.2 I think. Currently version 0.7 is out. There’s an open issue to fix this #2020-06-2412:49kimimThanks. I got the issue: https://github.com/weavejester/lein-ring/issues/202#2020-06-2412:57dpsutton
(when @env/dev?
      (nrepl.server/start-server :bind "0.0.0.0" :port nrepl-port
                                 :handler cider-nrepl-handler)
      (println "[INIT] nrepl started on port" nrepl-port))
#2020-06-2412:58dpsuttonwith requires on [cider.nrepl :refer [cider-nrepl-handler]] and nrepl.server#2020-06-2413:29kimimThank you, I will try this solution.#2020-06-2512:28Vincent Cantinhello, I came to increment the count of emacs users.#2020-06-2513:19kimimWelcome to emacs world. Life is difficult and fun with emacs.#2020-06-2512:29Vincent CantinI come from Cursive because it made my life too simple and I love challenges.#2020-06-2513:52practicalli-johnIf you like challenges then you probably won't want to read my book on using Emacs with Clojure. It will only make things easier, especially if you use Spacemacs https://practicalli.github.io/spacemacs/#2020-06-2603:59Vincent CantinI was being sarcastic. I started to read your tutorials already. Thank you for writing them.#2020-06-2605:55practicalli-johnI was being cheeky 😁#2020-06-2512:51CaseyDoes anyone know the https://github.com/abo-abo/lispy command to turn
(comment (foo bar)
         (xxx yyy))
into:
(foo bar)
(comment (xxx yyy))
#2020-06-2811:19thomProbably some form of lispy-barf#2020-06-2513:46RameezHey folks! Excuse the beginner here. 🙂 Any doom emacs users here? For the life of me I can't figure out how to choose a previous command in the Cider repl, previously this used to be ctrl-k (spacemacs) for me. Any ideas?#2020-06-2513:50dpsuttontry ctrl-p?#2020-06-2513:51RameezNah text is read-only is the output#2020-06-2514:00RameezAh it was was ctrl-up . I should read the docs. 🙂 https://docs.cider.mx/cider/repl/keybindings.html#2020-06-2514:59kimimI think ctrl-p is very intuitive in emacs key chords.#2020-06-2515:32hugoM-p / M-n#2020-06-2516:23mtmin any sort of comint interface c-p/`c-n` moves the cursor; M-p/`M-n` moves through history#2020-06-2518:48murtaza52I created a project using a clj template, and when I try to search through the files using projectile, all the files start from ./, like ./src... etc. This odd behaviour only happens for this project. Any ideas what could be wrong ?#2020-06-2603:01solfSigh... another half an hour lost because I evaluated the wrong expression, creating too much text for emacs and making it hang#2020-06-2603:05solfActually I was able to recover it. Weird, before I killed emacs I checked the autosaves and my new code wasn't there. Maybe somehow the kill signal triggered emacs to autosave just before quitting?#2020-06-2603:56kimimSo C-x C-s before C-x C-e is a good emacs habit #2020-06-2606:46naomarikI found pkill -SIGUSR2 emacs usually brings emacs back and lets me save if I do that.#2020-06-2608:37solfOh thanks, I'll try the SIGUSR2 next time#2020-06-2811:16thomAlways worth having sane print lengths set in your REPL, can occasionally save you if you print the wrong thing.#2020-06-2721:06zhuxun2Did any one run into an error when trying to cljr-rename-symbol a base-level symbol that has namespaced keywords in the same file? When I do that it just hangs with the message "Fetching symbol occurrences...", and then when I press c-g this is what appears in my REPL:
ERROR: Unhandled REPL handler exception processing message {...}
java.lang.RuntimeException: Invalid token: ::foo/bar
...
#2020-06-2815:14vemvYou could try building a repro in pure clojure and report it against https://github.com/clojure-emacs/refactor-nrepl#2020-06-2811:59Toby WorlandFrom the clj-refactor package, does cljr-rename-symbol work on clojurescript files?#2020-06-2815:14vemvnot, for all ops marked with a * in https://github.com/clojure-emacs/clj-refactor.el/wiki#2020-06-2815:15Toby WorlandAh, thank you!#2020-06-2819:02zhuxun2Is there a emacs plugin that can help me find the latest version of any dependencies? Would have been helpful during dep upgrades#2020-06-2819:03zhuxun2or any quick way to find out which of my deps are outdated#2020-06-2819:04zhuxun2like yarn upgrade-interactive for node#2020-06-2902:30bhauman@zhuxun2 look at lein-ancient#2020-06-2911:31practicalli-john@zhuxun2 for deps.edn projects there is outdated and deps-ancient - examples in my deps.edn config https://github.com/practicalli/clojure-deps-edn#dependency-version-management#2020-07-0121:28ericdallohttps://www.reddit.com/r/emacs/comments/hjj16g/announcement_lspmode_70_released/#2020-07-0713:23ericdallolsp-mode just opened a OpenCollective for those who wants to help 🙂 https://opencollective.com/emacs-lsp#2020-07-0815:33papachanhttps://www.reddit.com/r/emacs/comments/hnf3cw/my_orgmode_agenda_much_better_now_with_category/?utm_medium=android_app&amp;utm_source=share#2020-07-0815:34papachan#2020-07-0815:49lilactownfancy!#2020-07-1009:12ziltiWow that looks amazing!#2020-07-1103:29jhacksDoes completion work for anyone in ClojureScript? It works in Clojure files/repl, but not ClojureScript#2020-07-1103:29jhacks(using cider)#2020-07-1104:52jhacksFound a template shadow-cljs project where completion is working for ClojureScript, so it’s probably a project configuration issue.#2020-07-1105:07David PhamHaving a running cljs repl usually solves my completion issues#2020-07-1207:03bozhidarYeah, completion should work just fine with ClojureScript.#2020-07-1207:04bozhidar(although these days it's semi-broken for shadow-cljs after clj-suitable and shadow went out of sync)#2020-07-1614:58jhacks@bozhidar Thanks for the hint! I see this issue which explains the problem: https://github.com/rksm/clj-suitable/issues/15 The project where completion was working was using an older version of shadow-cljs, before 2.10.+.#2020-07-1614:59jhacksI switched to an older version of shadow-cljs and now completion works great#2020-07-1621:49Eric IhliHow would I find out what is causing a long string to be showing up truncated with an ellipses at the end?
(package! clj-refactor :pin "92d372393a031e5fa73ef926447afe72b574cb45")
Is showing up as
(package! clj-refactor :pin "92d372393a...")
The text is all there. It's just a display thing. How would I go about figuring out why and how to change it?
#2020-07-1622:09pithylessI'm guessing you're running doom-emacs? Because that's where I came across this issue. 🙂 It's actually a piece of custom elisp in doom-emacs specific to font-locking a package pin: https://github.com/hlissner/doom-emacs/blob/adc4be88979f36687f84835b7f83cd1a5853753c/modules/lang/emacs-lisp/config.el#L81-L89 https://github.com/hlissner/doom-emacs/blob/946852fe6b0e4a922c14e2c761a5861accc98707/modules/lang/emacs-lisp/autoload.el#L248-L259#2020-07-1622:15Eric IhliHow in the world did you figure that out?#2020-07-1621:53Eric IhliOnly thing I see in describe-mode that might be related is global-so-long-mode but toggling the mode off didn't change anything.#2020-07-1719:17Eric IhliGiven lines of
:ak1 {:abbr "ak" :name "Alaska"}
   :az {:abbr "az" :name "Arizona"}
   :ar {:abbr "ar" :name "Arkansas"}
   :ca {:abbr "ca" :name "California"}
   :co1 {:abbr "co" :name "Colorado"}
and wanting to replace the :[a-z]\{2,3\}\b with the respective line in the lines of
#uuid "8ce5e449-6699-4a57-b5ff-dcb1f3ac543d"
 #uuid "2058ed97-8cf2-4376-9979-33e13d3ce698"
 #uuid "20975100-6575-4cfe-b269-626ae379a78f"
 #uuid "59ad797e-e00a-4c39-9554-63c32126e4c0"
 #uuid "9243cc18-3395-416b-a0ea-d584f6f60e57"
how would you do it? Can't block select/replace since the columns needing replacement don't align. In this case, I could regex-replace the first column of the first line and make them match. But this is a contrived example driven by curiosity, not practicality, so just assume there is no block functionality.
#2020-07-1803:23sogaiumay be i would use this: https://www.gnu.org/software/emacs/manual/html_node/emacs/Keyboard-Macros.html#2020-07-1815:06jjttjjIs there some quick trick to preventing accidently printing huge strings int he repl which slow down emacs a lot? Just setting *print-length/level* isn't 100% effective due to large singular values. I'm using inf-clojure now, but willing to check out cider or anything else if it includes ways to deal with this. Like is there a way to say "never print anything bigger than this many characters"#2020-07-2004:14bozhidar@jjttjj nREPL 0.6 introduced the option of truncating results/output to some size https://metaredux.com/posts/2019/03/29/nrepl-0-6.html#2020-07-2004:14bozhidar(in CIDER it’s 1MB by default)#2020-07-2004:16bozhidarOn top of this, the current CIDER master branch has some auto-trimming functionality for the REPL buffer https://docs.cider.mx/cider/repl/configuration.html#auto-trimming-the-repl-buffer#2020-07-2011:23jjttjjAwesome, will check it out thanks!#2020-07-2414:36bartukaThere is a better way to change the face of only numbers (not inside string nor comments) than using font-lock-add-keywords and try to come up with some complicated regexp for that?#2020-07-2516:00jhacks@iagwanderson I’m using Doom Emacs, which uses https://github.com/Fanael/highlight-numbers for highlighting numbers (not just for clojure)#2020-07-2516:04bartukathanks @jhacks. I am creating a custom theme and I wanted to colorize only the numbers, I am using the font-lock-add-keywords for now with a regexp, but seems this is the correct approach. I think I will just rely on highlight-numbers package and change its face inside the theme#2020-07-2516:04bartukathey already cover lots of corner cases#2020-07-2516:07jhacks@iagwanderson yeah, it’s a good package, no issues for me so far. Good luck with the theme, I hope you’ll post a link to it here if you’re sharing it#2020-08-0206:22bozhidarinf-clojure 3.0 is out! There aren't many user-visible changes - the release mostly focuses on improving the internals and adding more flexibility with respect to teaching inf-clojure about different Clojure REPLs. Check out the changelog for details https://github.com/clojure-emacs/inf-clojure/blob/master/CHANGELOG.md#2020-08-0311:13borkdudeI have this in my prelude personal/init.el but it doesn't work in my terminal emacs:
(set-background-color "grey15")
(set-face-attribute 'region nil :background "#666")
(print "Hello from personal/init.el")
The message gets printed, however the background color isn't changed. It does work with the GUI emacs. It also works when I manually evaluate it in the terminal emacs. What's up...
#2020-08-0311:18kwrooijenWorks for me. Which OS / Terminal / Emacs version? I'm running Linux Pop_OS!, Emacs 26.3, Terminator#2020-08-0311:28borkdudeWhy are you running Pop_OS!, are you using a System76 laptop?#2020-08-0311:33kwrooijenI have a mini desktop and a System76 laptop. Wanted to try something new (after having used Fedora for a long time). Decided to give it a try and was really happy with it. It's a bit less strict regarding packages than Fedora which is nice. They also have a lot of Flatpak packages in the store (instead of installing everything through deb, I like having "apps" isolated from system dependencies). Based on Ubuntu so that's quite stable. Has a lot of support for the gaming market which is plus for me.#2020-08-0311:34kwrooijenBut I don't know what the packaging state is of Ubuntu. Might not be worth switching if you're already using that#2020-08-0311:37kwrooijenSystem76 also puts a lot of work into improving Gnome3 which is just nice overal (battery life, tiling system, high resolution display support)#2020-08-0311:42borkdudeThanks for sharing#2020-08-0311:18kwrooijenOr does it work if you evaluate it inline?#2020-08-0311:21kwrooijenAh yeah, it doesn't work when it's loaded during initialization#2020-08-0311:21borkdudeOS: Ubuntu 20.04 in WSL2, Emacs 26.3, terminal https://iTerm2.app in macOS#2020-08-0311:22kwrooijenTry this instead: (set-face-background 'default "grey15")#2020-08-0311:23borkdudeworks!#2020-08-0311:24kwrooijenUnless you're changing the region somewhere else (or loading a theme, but probably not) the region line should work#2020-08-0311:24borkdudethanks a lot
#2020-08-0315:24borkdudeAnnoooying: https://stackoverflow.com/a/6268264/6264#2020-08-0315:30borkdudeThis actually worked to fix it: https://stackoverflow.com/a/25900375/6264#2020-08-0315:37borkdudeIs it possible to get these kind of visual hints when you change something git-related on the side in a terminal emacs?#2020-08-0315:38kwrooijenI don't think so. Since the fringe is only supported in GUI Emacs#2020-08-0315:39borkdudeda'mn#2020-08-0315:39kwrooijenhttps://github.com/emacsorphanage/git-gutter#2020-08-0315:39ericdallohttps://github.com/emacsorphanage/git-gutter-fringe#2020-08-0315:39kwrooijenThere is a non fringe version#2020-08-0315:40kwrooijenJust wondering, why don't you use the GUI version?#2020-08-0315:40borkdudeSo just git-gutter I should install?#2020-08-0315:41kwrooijenYeah, without the fringe. Not sure what the + is#2020-08-0315:41borkdudeBecause I'm working on a remote system (well, just a PC in my room, but I don't have a keyboard attached to it).#2020-08-0315:41kwrooijenSSH? and you have Emacs installed there?#2020-08-0315:42borkdudeyes#2020-08-0315:42kwrooijenI thought I remembered you mentioning using TRAMP some time ago. So I assume you've looked into that 🙂#2020-08-0315:43kwrooijenWhich I guess isn't an option for some reason?#2020-08-0315:45borkdudeI'm using tramp, but this was slow with magit-status. Also I got strange hangups in dired.#2020-08-0315:45borkdudeSo now I'm trying this#2020-08-0315:45borkdudeAnother option is working in the RDP session#2020-08-0315:45borkdudejust figuring it out still#2020-08-0315:46borkdudegit-gutter seems to work btw#2020-08-0315:47kwrooijenHaven't used tramp in a while myself. But a couple of jobs back we had a lot of remote servers, and I used tramp for that (including Magit). Worked quite well#2020-08-0315:47kwrooijenI do remember having to tweak my settings to make it work fast though#2020-08-0315:48borkdudeif you remember those tweaks, feel free to share. one benefit of working over ssh is that I can access all the machines in the same way#2020-08-0315:49kwrooijenThis is what I used during that time https://github.com/kwrooijen/.emacs.d/tree/40e0054b012814fd1550e3c6648af4a22e73df72#tramp#2020-08-0315:51kwrooijenI don't really see anything specific that should fix the issue though 😕#2020-08-0315:51kwrooijenMaybe setting tramp-completion-reread-directory-timeout to nil, possibly#2020-08-0315:52kwrooijenAlthough I think that was more Helm related#2020-08-0315:52borkdudeMaybe it's just WSL2 that's being weird. Btw, I also had to tweak my login shell scripts to make tramp work, since it didn't understand the output from zsh#2020-08-0315:53borkdudeMaybe the dired problem is related to that#2020-08-0315:53kwrooijenI think I disabled zsh because I couldn't get it to work but idk. 'twas a while ago#2020-08-0315:54borkdudeWhat I do in the zsh script is when TERMINAL is set to dumb, I just execute bash#2020-08-0315:54borkdudeThis fixed most of the stuff#2020-08-0316:01borkdudeoh yes, one other thing with tramp was that flycheck clj-kondo did work, but of course it doesn't resolve the right config. it's a bit complex#2020-08-0316:03borkdudeAnd emacs on Windows just doesn't look so good#2020-08-0316:03borkdudealso not via the X server, or maybe it's just something I need to get used to#2020-08-0410:14borkdudeDoes someone here know which escape sequence to send for C-M-SPC?#2020-08-0410:14borkdudein a terminal, iTerm2 to be specific#2020-08-0410:17borkdudeThank god, someone wrote a blog post again: https://lepovirta.org/posts/2013-01-19-ctrl-meta-space-in-iterm2.html#2020-08-0410:26mpenetStarted using libvterm with emacs, finally a decent terminal emulator#2020-08-0410:50borkdudeAny pointers how to get started on that?#2020-08-0410:52borkdudeI might settle on X-forwarding in the end#2020-08-0410:53borkdudeTried several things now: editing in RDP via X-forwarded emacs, tramp, ssh terminal and now X-forwarding to my local machine. I think the last one gives the best experience so far.#2020-08-0410:53borkdudeAlthough I had to fix the meta key#2020-08-0508:09friczehi! quick question, is there a way to make go-to-definition work in emacs for clojure specs?#2020-08-0509:05jumar[I use spacemacs] it used to work for me with cider-find-keyword for things like ::specs/non-empty-string but it doesn't work anymore. I can still do press g d (go-to-definition) and get a quick list of occurences of given symbol and usually quickly identity the place where it's defined#2020-08-0512:44ericdalloTake a look at clojure-lsp with lsp-mode for Emacs, more info on #lsp#2020-08-0508:10friczeI have it working for defns and defs but can’t handle specs#2020-08-0509:28practicalli-john@andrzej.fricze using fully qualified spec names, e.g. :practicalli.banking/account-id rather than ::account-id and with the REPL running, then cider-browse-spec works well as well as the clj-find-var function in Spacemacs Clojure layer (a wrapper function around cider-find-var). With the cursor on an auto-qualified spec form, ::account-id these functions do not seem to work. If the repl is not running, the clj-find-var function used dump-jump-go which doesn't seem to work for specs https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Blang/clojure/funcs.el#L187-L195#2020-08-0509:30friczethanks for help guys! 🙂#2020-08-0512:46jjttjjIs there something obvious I'm missing why this isn't properly setting the keybinding:
(define-key inf-clojure-mode-map (kbd "C-c C-r") #'inf-clojure-restart)
#2020-08-0512:49jjttjjAh, think I figured it out. I was doing
(require 'clj-refactor)
later in the .el file which I think was overriding the keybinding
#2020-08-0606:40mpenetanyone using cider+lsp ?#2020-08-0609:26Dmytro BuninI now do, but I have 1 day of experience with it#2020-08-0610:27mpenethow is it?#2020-08-0612:03Dmytro Buninnavigation in re-frame project is just smooth#2020-08-0612:03Dmytro Buninfeels really great tbh#2020-08-0612:04Dmytro Buninthe project is also quite large, and I didn’t feel any slow downs or anything#2020-08-0612:04Dmytro Buninso like it a lot#2020-08-0613:08mpenetI ll give it a try, the tricky bit is how to make it co-exist in peace with cider#2020-08-0613:09mpenetwould be nice to have one or the other features active depending on if a repl is running or not#2020-08-0613:15ericdalloYes, for almost a year 🙂#2020-08-0613:31mpenetwould you share your emacs config?#2020-08-0613:35ericdalloSure, my entire OS/emacs are versioned here: https://github.com/ericdallo/dotfiles I use doom-emacs but you probably interested in the lsp secion: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L151-L166#2020-08-0613:35ericdalloAnd here the lsp config: https://github.com/ericdallo/dotfiles/blob/master/.lsp/config.edn#2020-08-0613:38mpenetthanks#2020-08-0614:53mpenetwow impressive, it just works#2020-08-0614:53mpenetquite amazing for a repl-free experience#2020-08-0615:06ericdalloyes! 🙂 If need any help with LSP server you can ask here too: #lsp For lsp-mode questions, it's better here: https://gitter.im/emacs-lsp/lsp-mode#2020-08-0821:37Ian FernandezI'm having problems with eldoc when cider is not activated and when it's activated, everytime is giving me this error:
eldoc error: (wrong-number-of-arguments (0 . 0) 1)
#2020-08-0821:37Ian Fernandezfor every function and etc.#2020-08-0821:38Ian Fernandezanyone knows how to fix this on eldoc?#2020-08-1016:00Justin RocheHi, does anybody know why lein repl makes my terminal prompt disappear? If I kill lein repl in emacs I loose my terminal prompt.#2020-08-1016:01Justin RocheI think I've disabled all my clojure and shell specific config#2020-08-1016:05Justin Rocheif I (exit) it is fine#2020-08-1016:06Justin RocheI have read this happens if .bashrc is altered#2020-08-1109:33practicalli-johnNew Emacs release: 27.1 https://lists.gnu.org/archive/html/emacs-devel/2020-08/msg00237.html#2020-08-1109:47borkdudeI upgraded. Now my org-mode is broken#2020-08-1209:59bozhidarProbably it's something upstream, as I haven't changed anything related in Prelude recently.#2020-08-1109:55borkdude
Open /Users/borkdude/Dropbox/dre/notes/worklog.org
File mode specification error: (wrong-type-argument stringp (require . info))
Prelude tip: Press <C-c y> to search in YouTube.
load-history-filename-element: Wrong type argument: stringp, (require . info)
Mark set
load-history-filename-element: Wrong type argument: stringp, (require . info)
#2020-08-1109:57borkdudeDowngrading...#2020-08-1308:05robert-stuttafordnewest cider requires paredit-24, but emacs comes bundled with paredit-22. can anyone point me to a snippet that'll force the correct version of paredit to be installed from melpa, please?#2020-08-1310:01robert-stuttafordroot cause: i had the wrong melpa domain in my package list :face_palm:#2020-08-1315:28borkdudeDoes anyone want to share their settings for working with Clojure + Emacs in an iTerm2 terminal?#2020-08-1315:32ericdalloI use linux and doom-emacs, but maybe something here could help 🙂 https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#2020-08-1315:35borkdudeIt's more about key combinations that aren't supported by a terminal natively#2020-08-1315:35borkdudebut thanks for sharing!#2020-08-1315:37ericdalloOh I see, I use emacs on GUI as emacs tty always has some bugs#2020-08-2723:55pipi think the main problem i have had is the = for expand-region not working properly. similarly the other special characters were problems. here’s an article that seems to cover that https://joppot.info/en/2017/09/12/4056 does that help?#2020-08-2807:30borkdude@UAUBK6459 That does help, thanks!#2020-08-1915:55adamfreyDoes anyone use doom emacs without evil mode and takes advantage of clj-refactor's cljr-add-require-to-ns functionality? If so did you have to change the keybindings at all? In the https://github.com/hlissner/doom-emacs/blob/develop/modules/lang/clojure/config.el#L186 I see that they add the clj-refactor hydra under [leader] R . That works for me, and then I select "add require to namespace" by typing a and then r and it inserts the form template correctly. But then the clj-refactor hydra doesn't close unless I manually type q , and if I don't do that it starts to interpret me typing the ns I want to require as more refactor commands, which is surprising to me.#2020-08-1915:58ericdalloI used to use this as a prefix: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L126 But I don't use clj-refactor anymore, clojure-lsp already has these functionalities and a lot more, take a look at #lsp 🙂#2020-08-2100:28practicalli-johnAre there any videos that show how people are using clojure-lsp for Clojure development in Emacs / Spacemacs? I haven't found anything yet. I have seen lots of positive comments on how benefitial clojure-lsp is, but I am not getting that sense myself. I've just spend another hour today experimenting with clojure-lsp and found the experience a little confusing and quite distracting, so must be doing something wrong. Any guidance on how to actually use and make sense of the information its displaying?#2020-08-2113:04ericdalloI don't known any videos of clojure-lsp 😕 but there is the lsp-mode documentation for emacs which has some images and if you keep searching you can find videos about it. Take a look on the main features: https://emacs-lsp.github.io/lsp-mode/page/main-features/#2020-08-2112:07mpenetI tried, but cider is miles ahead. I found some things a bit too intrusive, like all the overlays (# of references & co)#2020-08-2113:05ericdalloYou can disable this feature setting lsp-lens-enable to nil#2020-08-2113:05ericdalloAlmost every lsp-mode features can be disabed#2020-08-2122:15practicalli-johnI am struggling to understand which parts are which, I ended up switching it all off until I have more time to experiment. There was too much conflicting with Cider, autocomplete and yasnippets. It’s purely down to not understanding LSP enough, no reflection on the Clojure-lsp project, which seems great and potential very useful once I understand what’s going on. Maybe later in the year I’ll try again when I have more time.#2020-08-2112:08mpenetsome things are quite nice, I guess a mix of both approaches would be nice (a bit like in cursive)#2020-08-2113:05ericdalloYou can use clojure-lsp + cider 🙂#2020-08-2205:30bozhidarOr anakondo + cider (if the static analysis is all you need from clojure-lsp).#2020-08-2205:32mpenetNice#2020-08-2208:00practicalli-johnI found anakondo less intrusive and easier to understand. I assume Clojure-lsp is doing more / visualising more by default, so more of a learning curve.#2020-08-2205:31bozhidarWell, it feels nice to finally hear that something is more complex than CIDER! 😄#2020-08-2413:32practicalli-johnI have always found CIDER pretty simple to use. Start a REPL using jack-in, evaluate code in the source code buffer, quit/restart when adding new libraries. I used to find wiring external things likke configuring auto-complete challenging, until I just let Spacemacs do that for me. I also find CIDER key bindings much easier with Spacemacs mnemonic keys and Vim style editing. Thats a challenge I have with Emacs in general though, not CIDER specific. I hope to find more time to learn the code base more, so I can contribute back, but there is a bunch of essentials it feels I need to learn about elisp first.#2020-08-2412:34RisettoWhen I use exec-path-from-shell it crashes when I have ZSH_TMUX_AUTOSTART=true in my .zshrc, does anyone know how I can make exec-path-from-shell work without removing that line?#2020-08-2412:47RisettoI just wrapped my ZSH_TMUX stuff inside a if [ ! -z "$INSIDE_EMACS" ] , not ideal maybe but it worked#2020-08-2607:11rickmoynihanIs there anything like anakondo (i.e. that can operate without a repl) that will do jump to definition?#2020-08-2607:26aglsp#2020-08-2720:41jakemccdumb-jump is pretty good and works across many languages https://github.com/jacktasia/dumb-jump#2020-08-2808:41rickmoynihan@U06SWJ2RH: Interesting… I guess unlike alc.index-defs though, that it can’t jump to dependencies / git deps etc#2020-08-2808:42rickmoynihanstill nice to have an option giving broad shallow coverage, rather than narrow but deep.#2020-08-2821:01jakemcc@U06HHF230 yeah. I really enjoy having it as the backstop. Can open many languages that I'm not set up for and get some amount of jumping within that project.#2020-08-2607:19sogaiuif you don't mind static generation periodically that takes some time, yes#2020-08-2607:19sogaiuhttps://github.com/sogaiu/alc.index-defs#2020-08-2607:19sogaiuthis uses clj-kondo's analysis#2020-08-2607:19rickmoynihanyeah was looking for something that uses clj-kondo; thanks#2020-08-2607:20rickmoynihan👀#2020-08-2607:20sogaiufor use with emacs: https://github.com/sogaiu/alc.index-defs/blob/master/doc/emacs.md#2020-08-2607:26rickmoynihanCool seems to work on one project but on another it raises an exception…#2020-08-2607:27rickmoynihan
$ clj -Sdeps '{:deps {alc.index-defs {:git/url "" :sha "4d26c6109fad267839ba10e7144660193a8be9a2"}}}' -m alc.index-defs.etags
* checking specified options
  input: {:proj-dir /Users/rick/repos/project, :format :etags}
  output: {:proj-dir /Users/rick/repos/project, :format :etags, :out-name TAGS, :overwrite false, :verbose true}
* determining paths to analyze
  found shadow-cljs.edn
  found deps.edn
  >> classpath computation by: shadow-cljs <<
  found yarn.lock
  found package-lock.json
  >> yarn.lock newer <<
  chose yarn to invoke shadow-cljs
Execution error (NumberFormatException) at java.lang.Integer/parseInt (Integer.java:542).
null

Full report at:
/var/folders/ln/536xqskd3_g80n5pdbsjkrjw0000gn/T/clojure-7955288199004901369.edn
#2020-08-2607:28rickmoynihanexception is:#2020-08-2607:28rickmoynihan#2020-08-2607:28rickmoynihanI can open an issue for it if you like#2020-08-2607:29sogaiuah thanks -- if that's convenient for you. i'm also ok to take details here.#2020-08-2607:29sogaiuare there some bits i might use to reproduce?#2020-08-2607:30rickmoynihanit’s a proprietary project, so not really 😞#2020-08-2607:30sogaiuah i see.#2020-08-2607:30sogaiuit looks like it involves some cljs -- is that correct?#2020-08-2607:31rickmoynihanyeah it’s clj and cljs/cljc combined in the same source tree#2020-08-2607:31rickmoynihanshadow-cljs build for clojurescript side, deps.edn project#2020-08-2607:31sogaiuis the shadow-cljs version recent?#2020-08-2607:32sogaiuok, you can actually select to have clj compute the classpath.#2020-08-2607:32rickmoynihanshadow-cljs reports: cli version: 2.8.26 node: v13.7.0#2020-08-2607:32sogaiuah ok#2020-08-2607:32sogaiuthat's the issue#2020-08-2607:33sogaiuthat shadow-cljs is too old#2020-08-2607:33sogaiuthe ability for shadow-cljs to do classpath computation was 2.8.53 or so and above iiuc#2020-08-2607:33rickmoynihanwill try bumping it and see if it resolves it… we normally keep it pretty up to date, but shadow moves pretty quick#2020-08-2607:34sogaiuindeed it does!#2020-08-2607:34sogaiufor reference you can choose to use clj do the classpath computation: https://github.com/sogaiu/alc.index-defs/blob/master/doc/technical-details.md#2020-08-2607:35sogaiuadding something like:
'{:method :deps}'
to the invocation at the end may work
#2020-08-2607:36rickmoynihanwill that still index the cljs?#2020-08-2607:36sogaiui think it depends on what clj gives back as the classpath#2020-08-2607:37sogaiuso the classpath computation is used by clj-kondo to decide what to index (iirc, it's been a while since i've looked at the code 😅 )#2020-08-2607:37rickmoynihanyeah in that case it should work#2020-08-2607:40rickmoynihanhmm so firstly I think I’ve upgraded shadow-cljs now, and I still seem to get the same error#2020-08-2607:40sogaiuhmm, may i ask which version?#2020-08-2607:40rickmoynihan2.11.0#2020-08-2607:41sogaiuok, thanks. i haven't tried that version yet, but will do so.#2020-08-2607:41rickmoynihancool… secondly adding the '{:method :deps}' arguments also fails#2020-08-2607:41sogaiuis it the same error?#2020-08-2607:42rickmoynihanno#2020-08-2607:42rickmoynihan
* checking specified options
  input: {:proj-dir /Users/rick/repos/muttnik, :method :deps, :format :etags}
  output: {:proj-dir /Users/rick/repos/muttnik, :method :deps, :format :etags, :out-name TAGS, :overwrite false, :verbose true}
* determining paths to analyze
  found shadow-cljs.edn
  found deps.edn
  >> classpath computation by: deps <<
Execution error (IllegalArgumentException) at alc.index-defs.impl.analyze/study-project-and-deps (analyze.clj:104).
No method in multimethod 'get-lint-paths' for dispatch value: :deps

Full report at:
/var/folders/ln/536xqskd3_g80n5pdbsjkrjw0000gn/T/clojure-6386543814520584285.edn
#2020-08-2607:42rickmoynihan#2020-08-2607:43sogaiuvery sorry it hasn't worked for you 😞 i will investigate. thanks for trying things out.#2020-08-2607:43rickmoynihan@sogaiu: Not at all, I’m sorry for giving you a hard time 🙂#2020-08-2607:44rickmoynihanIt seems to work on a different project#2020-08-2607:44sogaiuah, sorry#2020-08-2607:44sogaiuplease try '{:method :clj}'#2020-08-2607:44sogaiumy bad#2020-08-2607:44rickmoynihanahh#2020-08-2607:44rickmoynihanyeah was just about to take a look myself#2020-08-2607:44sogaiui grepped my shell history and had made an erroneous invocation before 😅#2020-08-2607:45rickmoynihanok it’s doing something this time 🤞#2020-08-2607:46sogaiu(i hope the shadow-cljs upgrade is ok)#2020-08-2607:46rickmoynihanwell I’ll only commit it, if it is 🙂#2020-08-2607:47sogaiuah yes, the wonders of revision control 🙂#2020-08-2607:47rickmoynihanA colleague of mine is usually pretty fastidious at keeping that dependency upgraded… he’s obviously been slacking this time 😆#2020-08-2607:48sogaiuor may be he knows that things break 😛#2020-08-2607:48rickmoynihanhe’ll be on it if it does, he’s pretty good at working through those issues#2020-08-2607:50rickmoynihanok this seems to have worked… thanks a tonne for the help, and great project. It’ll save me starting a REPL when I want to do a casual code review on small PRs, or help colleagues understand what is going on#2020-08-2607:50sogaiuthanks for trying things out! please let me know if you have any problems / suggestions 🙂#2020-08-2607:51rickmoynihanI have one suggestion actually… Adding support for the new -F/ -X params#2020-08-2607:53rickmoynihanOh actually you already basically do… aic/do-it takes a map of opts already :thinking_face:#2020-08-2607:59sogaiuthanks! i haven't tried the -F/-X stuff but will investigate.#2020-08-2608:01rickmoynihanOk I’ve just set it up this way in my ~/.clojure/deps.edn:#2020-08-2608:01rickmoynihan
:build-tags {:deps {alc.index-defs {:git/url "" :sha "4d26c6109fad267839ba10e7144660193a8be9a2"}}
               :fn alc.index-defs.core/do-it!
               :args {:format :etags
                      :proj-dir "."
                      :method :clj}}
#2020-08-2608:01rickmoynihanYou can then call it from any project with: clj -A:build-deps -X:build-deps#2020-08-2608:03rickmoynihan(IIRC a newer (future) version of tools.deps will mean you won’t need to also pass -A:build-deps, just -X:build-deps would be enough)#2020-08-2608:39sogaiuthanks for taking the time to explain!#2020-08-2607:21sogaiunote that this doesn't do locals#2020-08-2613:10ericdallo@sogaiu take a look at https://github.com/snoe/clojure-lsp using https://emacs-lsp.github.io/lsp-mode/, you can have multiple features like go-to-definition, find references, code actions, clj-kondo analysis, breadcrumb, modeline diagnostics and a lot more 🙂 You can see the major features https://emacs-lsp.github.io/lsp-mode/page/main-features/#2020-08-2613:11ericdallofor more info about lsp you can ask on #lsp too#2020-08-2621:48sogaiuthanks i have tried a few times before :)#2020-08-2621:51sogaiui also usually prefer modular independent pieces and am not really into "servers", but having said that, i am happy there are multiple approaches. good to have choice in these matters :)#2020-08-2621:53ericdalloYes 🙂 it's better than having no option#2020-08-2621:54sogaiuha ha, indeed!#2020-08-2716:40myguidingstaris there any version of projectile-project-files that skips ignored files (as declared in project dir's .gitignore )#2020-08-2817:05seancorfieldQuick Q about inf-clojure: if I start a REPL manually, with a Socket REPL running too, I can inf-clojure-connect to it just fine, type into it, and eval code into it (C-c C-e); if I use inf-clojure and give it the clojure command to start a REPL, I get a plain REPL (as expected) and can type into it just fine to eval stuff manually, but when I try to eval into it (C-c C-e) I just get a long line of ^G^G^G^G... in the REPL and then I can't even type into it any more. What am I doing wrong?#2020-08-2817:07seancorfield~(if it helps debug the problem, I also see ~ [this was not relevant]#2020-08-2817:37dpsutton@seancorfield can you file an issue? i can look into it over the weekend or later today. and sorry about that hangup 😞#2020-08-2817:38dpsuttontag me on it (@dpsutton) if you do make the issue#2020-08-2817:38seancorfieldFile an issue where?#2020-08-2817:39seancorfieldThis is my first time trying to use inf-clojure so I'm not very familiar with the ecosystem (and it's been several years now since I last used Emacs 🙂 ).#2020-08-2817:40dpsuttonhttps://github.com/clojure-emacs/inf-clojure/issues#2020-08-2817:41seancorfieldOh, I didn't know there was a #inf-clojure channel. Sorry, I should have asked there I guess.#2020-08-2817:41dpsuttoni did a big refactor recently so it should be much easier to use and easier to extend#2020-08-2817:41dpsuttonah no worries. probably higher traffic here and i wouldn't have seen it there. joining now 🙂#2020-08-2817:56seancorfieldAfter helping a beginner yesterday navigate REBL stuff with Emacs/CIDER/nREPL, I wanted to try Emacs with just a plain REBL (REPL) or a Socket REPL. Pretty sure last time I'd tried Emacs there wasn't a way to connect to a plain Socket REPL so that's really good to see it work seamlessly. It's also a nice test of my https://github.com/seancorfield/socket-rebl lib, so everything Emacs sends to the Socket REPL gets submitted to REBL, which is the workflow I'm used to from Atom/Chlorine.#2020-08-2818:22dpsuttonthat's part of what motivated me. there's no real good socket option for emacs. i don't think inf-clojure is ready for full time development. needs a bit better story for auto completion but i really dig it for small simple things#2020-08-2818:30seancorfieldI don't think I'll ever go back to Emacs for real development work -- it's just too painful/primitive after using Atom for nearly five years -- but at least now I know something that works without CIDER/nREPL.#2020-08-2818:41dpsuttonI do like the idea of ditching nrepl just most projects I work on professionally are nrepl and usually lein based#2020-08-2818:45seancorfieldOur main reason for wanting a workflow that avoided CIDER/nREPL was that we connect to REPLs in production and didn't want those dev dependencies baked into our production environment.#2020-08-2818:46seancorfieldWe have our services set up in production so there can be a .jvm_opts file next to the JAR and our service script uses the contents when (re)starting a service, so we can easily spawn a Socket REPL on any port.#2020-08-2818:46dpsuttonYeah. There’s some stuff with subscribing to out that can be a bit hanky. Also classloader stuff with nrepl I think. Metabase has a fix for nrepl making a new classloader for each form I think#2020-08-2819:07seancorfieldThis way we can use telnet etc to interact with the production process. And possibly unrepl/unravel if we really want some luxury (since it can side-load compliment). And then we have the exact same dev UX for local and remote processes (although I have REBL running locally, always).#2020-08-2904:56anonimitorafHey guys, I've started using doom-emacs' clojure module and Ive noticed that when editing text that has a warning/error there's a noticeable stutter for whatever stuff I type. Anyone else get this?#2020-08-2905:36agUnless you give us some details, I'm afraid no one will be able to help you. - What kind of warning/errors you're talking about? - Have you tried disabling flycheck-mode? - Check M-x describe-major mode and see what minor modes are enabled, maybe copy-paste the list here, or take a snapshot. Perhaps we'd be able to guess which one is causing the problem. - Do you know how to use the profiler? type C-h i g elisp g profiling RET#2020-08-2905:43anonimitorafThanks and youre right. I'll give more details when I get home#2020-08-2906:41practicalli-johnYou may get more help on the doom discord community.#2020-08-2914:31ericdalloYou are probably having issues with clojure-lsp anlyser using clj-kondo, make sure you are using latest clojure-lsp version#2020-09-0212:48borkdudeDoes anyone have some experience with running linters remotely using flycheck when in tramp-mode? I'm considering supporting this for clj-kondo: https://github.com/borkdude/flycheck-clj-kondo/issues/9 Any input on this is welcome!#2020-09-0218:59Ian Fernandezanyone has confs for fulcro guardrails indentation on emacs?#2020-09-0218:59Ian Fernandez😃#2020-09-0219:09MitchI've been thinking it would be nice if there were some boxed configuration available that gave you the right indentation and linting (through lsp or kondo) for common libraries. I bet a lot of us have the same settings for the macros in re-frame, compojure, etc.#2020-09-0219:17dpsuttonmake a function that does that. make a repo that has the .lsp/config or clj-kondo config, m-x clojure/set-up-kondo just makes a new file and slurps the common shared one in#2020-09-0219:24MitchYeah, I think it would be very simple to implement. Maybe if I can catch a free day on the upcoming long weekend#2020-09-0415:27TMacNot a Clojure question per se, but I’m trying to get my development environment set up on Linux (specifically BunsenLabs, a derivative of Debian Jessie) and am having a hard time getting a modern Emacs (26 or 27) installed (Debian only provides 24). I use linuxbrew, which has 26, but installs --without-x and I want X. I manually edited the formula to remove that flag, but keep getting told configure: error: You seem to be running X, but no X development libraries were found, but I have libx11-dev and a ton of related packages installed through Aptitude. I’d prefer to stay with something that easily updates (Linuxbrew, a third-party PPA, etc.) instead of building from source, but at this point just want a proper Emacs—any suggestions?#2020-09-0415:37teodorluHave you considered nix? Nixpkgs unstable provides prebuilt Emacs 27.1. I tried it out on my Ubuntu, and a nix-env -iA nixpkgs.emacs got me a working install in a minute or so.#2020-09-0417:23seancorfieldsudo add-apt-repository ppa:kelleyk/emacs gets you access to at least Emacs 26 on Ubuntu... I'm not familiar enough with Debian vs Ubuntu etc to know whether that's a useful response (but since Teodor mentioned Ubuntu).#2020-09-0417:24seancorfieldKelley's PPA turns up in lots of places as the way to get more modern versions of Emacs on those versions of Linux.#2020-09-0500:47Eric IhliAnyone know how to set set a custom fill-column on a read-only results buffer? I'm running cider-pprint-eval-last-sexp to output some stuff to a popup buffer. The output only looks good at a fill over 100 columns. I don't want to change the fill globally. Just for cider-make-popup-buffer. Bah. As I'm typing this out, I'm thinking this is such a one-off I should just hardcode the change there in cider-make-popup-buffer and eval it when I need to do this. Ah hah. https://docs.cider.mx/cider/usage/pretty_printing.html#print-options#2020-09-0502:31zaneHas anyone else made the switch from Spacemacs to Doom? Seems neat, but I’m not sure I can live without SPC k ….#2020-09-0621:27practicalli-johnI've tried Doom many times over the last couple of years and found it lacking the user experience of Spacemacs. Doom seems interesting if you want to custom and create your own way of doing things. Personally I want to get on and do things with Emacs, rather than spend time configuring it. The Doom keybindings feel un-natural and far less organised, especially across major modes. There were still many Clojure keybindings missing last time I tried Doom. I am still not keen on the Doom install process, I much prefer the simplicity of a git pull. I didnt find Doom any faster to run on the same machine doing the same tasks (where those tasks were supported). Doom is a great project, its just not for me.#2020-09-0722:59zaneThanks for sharing!#2020-09-0723:22zaneI’ve experienced a surprisingly large performance difference between Doom and Spacemacs, even on newer hardware.#2020-09-0502:44CameronI go back and forth, Doom has increasingly felt more polished with the features it does have to me, while I like Spacemac's raw volume of features#2020-09-0502:53zaneDid you use SPC k much when using Spacemacs, and have you found a replacement in Doom? :thinking_face:#2020-09-0502:57ericdalloWhat is SPC k?#2020-09-0503:03zaneEnters evil-lisp-state: https://github.com/syl20bnr/evil-lisp-state#2020-09-0503:10ericdalloWhy you can't use doom-emacs with that package installed and add a keybinding to SPC k for that?#2020-09-0503:11zaneI’m considering doing just that, but I’m wondering whether Doom users have a different approach that might be worth learning.#2020-09-0503:13ericdallodoom-emacs has a lot of opt-in/opt-out features and on same time allow you to install/add/set anything that you would do on vanilla emacs 🙂#2020-09-0503:14ericdalloyou can easily use doom-emacs macros for installing a package with package! and map a keybinding with map!#2020-09-0503:14ericdalloExample: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/packages.el#L10#2020-09-0503:15ericdallohttps://github.com/ericdallo/dotfiles/blob/master/.doom.d/+bindings.el#L134#2020-09-0503:15zaneI want map! and not define-key!?#2020-09-0503:17ericdalloI think map! uses define-key behind the scenes#2020-09-0504:01zaneThis achieved what I was looking for:
(use-package! evil-lisp-state
  :custom
  (evil-lisp-state-global t)
  :config (evil-lisp-state-leader "SPC k"))
#2020-09-0504:01zaneThanks, @UKFSJSM38!#2020-09-0513:58ericdalloYou're welcome 🙂#2020-09-0615:07myguidingstarI never find spacemacs comfortable enough, plus it's kinda heavy. I used Doom for a while, but ended up building my own .emacs.d with lispy-mode, use-package, ryo-modal, avyand other stuff. Stolen code from doom source code, too#2020-09-0615:12myguidingstarryo-modalin particular is super useful, I only have to maintain (and memorize) keybindings for things I really use#2020-09-0615:17myguidingstarI customize my keyboard layout a bit at operating system level starting from programmer's dvoraklayout, while most default keybinds out there are made for qwerty, so I often got conflicts here and there until I roll my own key binding system 😆#2020-09-0700:32sogaiuafter trying spacemacs and doom i also went back to my own setup, but adopted straight.el (thanks to doom and an ex-doom user). i also try to use use-package. i appreciate the existence of prelude, spacemacs, doom, etc. as they help to show what is possible.#2020-09-0711:27vemvWhat's a great package for highlighting the current word? e.g. POINT is over foo which is an arg of the defn that I'm touching I should see all foos within that defn, but ideally not outside the defn. Also it should understand well what the word boundaries are, for clojure :)#2020-09-0711:53practicalli-johnI use narrowing when working with just a function https://practicalli.github.io/spacemacs/spacemacs-basics/evil-tools/narrowing.html#2020-09-0712:04vemvnice, appreciate the alternative approach!#2020-09-0711:44dakra@vemv https://github.com/wolray/symbol-overlay you can (setq symbol-overlay-scope t) if you only want to highlight in the current function scope#2020-09-0711:48vemvlooks ace thanks! nice contributors list#2020-09-0801:48eccentric JAny guides for getting org-mode to work with Clojure? I seem to be able to execute code but I get a “Code block produced no output” no matter what I put into there.#2020-09-0801:57eccentric JNevermind. Ended up being very small. Needed # -*- org-babel-clojure-backend: cider; -*- but had 'cider#2020-09-0817:19deadghostLooking for some elisp regex help:
(replace-regexp-in-string "test/.*/" "test/\\1/unit/"
			  "/path/to/project/test/fruit/oranges.clj")
;; Desired
"/path/to/project/test/fruit/unit/oranges.clj"
;; Actual
"/path/to/project/test//unit/oranges.clj"
#2020-09-0817:32iarenaza@deadghost You need to use \( and \) (remember you need to double the \ when writing the regexp as a string) to define the match group that you are going to refer later with \\1:
(replace-regexp-in-string "test/\\(.*\\)/" "test/\\1/unit/"
                          "/path/to/project/test/fruit/oranges.clj") 
#2020-09-0818:12deadghostAh thank you, I didn't double them.#2020-09-0908:00plexusWe could use some help improving the timestamp printing/parsing in parseedn.el https://github.com/clojure-emacs/parseedn/issues/8#2020-09-0911:26mkvlrI have an issue in my emacs (27.1 from https://github.com/railwaycat/homebrew-emacsmacport) where emacs sometimes hangs when I want to undo a change. I see a spinning beachball for ~20 seconds or more. It sometimes recovers, sometimes it doesn’t and I need to kill it. Anybody have any tips or useful resources for how to debug this?#2020-09-0911:30plexusAre you using undo-tree?#2020-09-0911:40mkvlryes#2020-09-0911:41mkvlrshould I try getting rid of it? I also read about sending emacs SIGUSR2 but it stayed frozen…#2020-09-0911:50plexusundo-tree seems to be pretty buggy, I've experienced the same thing you're seeing, with it completely locking up and the only option being to kill emacs. I switched to undo-fu instead. It's much more basic and there are times where it seems to forget a lot of the undo history and only allow you to go back a few steps, but at least it doesn't hang.#2020-09-0911:51plexusin spacemacs you can't get rid of undo-tree completely, but you can disable it
(global-undo-tree-mode -1)
  (define-key evil-normal-state-map "u" #'undo-fu-only-undo)
  (define-key evil-normal-state-map "\C-r" #'undo-fu-only-redo)
#2020-09-0911:51plexusand add undo-fu to dotspacemacs-additional-packages#2020-09-0912:15mkvlr@plexus will give it a try, thank you!#2020-09-1009:33mkvlr@plexus looking good so far with undo-fu, thanks again!#2020-09-1121:12nickIs there some option in emacs/clojure-mode/evil-indent/anywhere-else that allows the automatic formatting that looks like this(preferred code style in the project):
(are [expected for-key] (= expected (get-something))
                        100001   "key1"
                        1000001  "key2")
automatic (evil-indent) (re)formats it like:
(are [expected for-key] (= expected (get-something))
  100001   "key1"
  1000001  "key2")
Sorry, I have never configured formatting options in emacs in the past
#2020-09-1121:21practicalli-john@nfedyashev align forms should do the trick https://practicalli.github.io/spacemacs/improving-code/formatting/aligning-forms-expressions.html#2020-09-1121:40nick@jr0cket Thanks John! It almost fixed the issue. What's left is one strange behavior (are) forms(from clojure.test) are not formatted properly:
(are [expected for-key]
    (= expected (get-something))
  100001  "key1"
  1000001 "key2")
And any other function/macro name instead of "are" works as expected(even is):
(is [expected for-key]
    (= expected (get-something))
    100001  "key1"
    1000001 "key2")

(for [expected for-key]
     (= expected (get-something))
     100001  "key1"
     1000001 "key2")
#2020-09-1121:42nickoh, seems like it is known issue https://github.com/clojure-emacs/clojure-mode/issues/548#2020-09-1215:50David PhamHelm is dead :(#2020-09-1215:50David Phamhttps://github.com/emacs-helm/helm/issues/2386#2020-09-1215:50David PhamI wonder how prelude will evolve.#2020-09-1222:47sogaiuouch.#2020-09-1307:31zackteoWhat's the emacs package/config that prevents Tab from inserting a Tab and instead does only autoindenting#2020-09-1308:30sogaiui don't know about that, but i have this in my ~/.emacs.d/init.el:
(setq-default indent-tabs-mode nil)
does that seem close to what you want?
#2020-09-1308:31sogaiu> Indentation can insert tabs if this is non-nil.#2020-09-1312:53zackteoIt kinda works. Doesn't work for elisp tho. Not maybe I'm remembering a behaviour that didn't exist in my config hmmmm#2020-09-1312:53zackteoThanks!#2020-09-1313:18sogaiuinteresting...when i do emacs -q and edit an emacs lisp file, pressing tab doesn't lead to any tabs being inserted afaict.#2020-09-1313:18sogaiuah no that's wrong.#2020-09-1313:19sogaiubut the indent-tabs-mode setting does seem to work (that is, during an emacs -q session)#2020-09-1313:21sogaiu(fwiw, this is with emacs 27.1)#2020-09-1408:37sogaiuwrt the helm situation, i've tried ivy and selectrum over the last couple of days and am leaning toward selectrum.#2020-09-1408:38mpenetivy has a few advantages imho > like ivy-occur and some various counsel plugins#2020-09-1408:39mpenetI'd love to use selectrum instead personally (ivy code is... involved), but no ivy-occur equivalent is a blocker for me#2020-09-1408:41sogaiuah i don't know what ivy-occur is, but i will look into it.#2020-09-1408:41sogaiuthanks for mentioning it.#2020-09-1408:41mpenetivy-occur is awesome, shotcut that opens all the candidates in an occur buffer#2020-09-1408:41mpenetit's very useful#2020-09-1408:42sogaiuthat does sound pretty nice.#2020-09-1408:42mpenetthere's also sub-selection that might be missing from selectrum#2020-09-1408:42sogaiuperhaps it's a matter of time before some similar features appear 🙂#2020-09-1408:43mpenetI hope so. I opened an issue for ivy-occur equivalent on selectrum months ago tho#2020-09-1408:44mpenetthe sub-selection feature I mentioned earlier is ivy-restrict-to-matches I think#2020-09-1408:44sogaiuah, thanks for the specifics, that should make searching easier#2020-09-1408:45mpenetit allows narrowing in steps: "show all candidates for foo" > then for all these show candidates for "bar" > etc etc#2020-09-1408:45sogaiuha ha ha -- i should stop listening now so i can "tolerate" what i've currently got 🙂#2020-09-1408:46mpenet🙂#2020-09-1408:46sogaiuin terms of features, abo-abo's stuff will likely be difficult to match
#2020-09-1408:47mpenetyes, also counsel-ag, I am not sure there's a standalone equivalent that can be run with selectrum#2020-09-1409:02sogaiuah, it looks like may be an issue where ivy-occur was discussed: https://github.com/raxod502/selectrum/issues/15#2020-09-1409:03sogaiuyes, i see you there 🙂#2020-09-1409:03sogaiuhmm, i wonder what the status is...the end of the issue seems to sound somewhat hopeful#2020-09-1409:04mpenetnot sure either#2020-09-1410:13arohnerWhen I have emacs open to a clojure source file, I’m seeing a decent amount of input lag when typing. The problem seems to be worse when using multiple emacs window divisions, or when the application window is occupying the full screen (a 5K monitor). I’ve tried using M-x profiler-start, but the results weren’t very informative:
- command-execute                                                 612  90%
 - call-interactively                                             612  90%
  - byte-code                                                     523  77%
   - read-extended-command                                        523  77%
    - completing-read                                             523  77%
     - completing-read-default                                    523  77%
      - read-from-minibuffer                                      154  22%
       + command-execute                                           11   1%
       + timer-event-handler                                        6   0%
       + nrepl-client-filter                                        1   0%
       + redisplay_internal (C function)                            1   0%
  - funcall-interactively                                          89  13%
   - execute-extended-command                                      89  13%
    + sit-for                                                      86  12%
    + command-execute                                               3   0%
+ ...                                                              56   8%
+ redisplay_internal (C function)                                   5   0%
#2020-09-1411:02sogaiui notice in that trace something about nrepl so is it the case you are connected to some repl? if you aren't connected to the repl (so just using clojure-mode.el), do you notice similar input lag?#2020-09-1411:28sogaiugrasping for straws here, but there are some tidbits in here: https://emacs.stackexchange.com/questions/598/how-do-i-prevent-extremely-long-lines-making-emacs-slow#2020-09-1411:46arohnerkilling the nrepl didn’t fix it#2020-09-1411:46arohnerswitching to M-x text-mode didn’t fix it#2020-09-1411:46arohnermultiple windows definitely makes it worse#2020-09-1411:49sogaiuif you turn off font-lock does it help at all?#2020-09-1411:49sogaiuthat's one thing i try when things get slow#2020-09-1411:50sogaiui guess using text-mode is like turning off font-lock-mode#2020-09-1411:51sogaiui presume it's the same no matter which file of clojure code you are taking a look at?#2020-09-1411:52sogaiumay be you've already tried looking at a clojure file after starting emacs with emacs -q#2020-09-1411:58sogaiuthere was mention of performance issues and a 5k display in this issue: https://github.com/sabof/org-bullets/issues/11#2020-09-1412:01sogaiudidn't know there was also emacs -Q...TIL#2020-09-1412:39arohnerhrm, looks like the problem isn’t present with emacs -nw, running my normal configuration#2020-09-1412:44sogaiuthere is a reddit thread mentioning some slowness of emacs on macos: https://www.reddit.com/r/emacs/comments/d2n2wh/emacs_is_slow_on_macos/ -- is this happening on macos?#2020-09-1412:46arohneryes, macos. I’ll see if brew has other emacs versions#2020-09-1412:47sogaiufwiw, i tried recently: https://github.com/d12frosted/homebrew-emacs-plus -- and specified version 27#2020-09-1413:15arohneremacs-plus is dramatically faster. Thanks for the help#2020-09-1414:34Josef Richterhi. this may sound stupid, but somehow I lost a file in emacs. I am positive it was there, I am positive I saved it numerous times, because I had it open for several days, and when I was creating a new file (with random clojure exercises) the previous one simply disappeared.. I though it’s just in another buffer, but it’s gone for good. No success searching for it in spotlight either, no success with recover-file nor recover-session… any ideas, please?#2020-09-1414:35borkdudeMaybe it was in your /tmp folder?#2020-09-1414:35borkdudeIf you have Time Machine running you could look for it#2020-09-1414:36Josef Richterno time machine, I am using icloud & dropbox#2020-09-1414:37Josef Richterbut is there a way to show history of open files in emacs actually?#2020-09-1414:37borkdudeyes, recentf-open-files#2020-09-1414:43Josef Richterthank you!#2020-09-1414:34borkdudedoes anyone have experience with enhancing an existing flycheck plugin by making it tramp-compatible?#2020-09-1422:20sogaiudid you not already find out that flycheck needs modification? https://github.com/flycheck/flycheck/issues/1816#issuecomment-673159577#2020-09-1722:36ChrisHi guys, I switched from doom emacs to building my own emacs from the ground up. Today I set up everything related to Clojure. However, somehow clojure-mode won‘t allow my to indent code by myself when I press TAB. The reason why I believe clojure-mode is causing this is because after removing clojure-mode I was able to use TAB again. Has anybody encountered that? Is this standard behavior? Because in doom emacs it was possible to manually indent with TAB in clojure source files. I‘m using evil-mode as well in case that‘s related to this issue.#2020-09-1722:45dpsuttonto find out what command is run by a keybinding, try C-c h tab. for me its company-indent-or-complete-common. personally i wouldn't want to indent with tab as newlines should already be correctly aligned. and for formatting i hit M-q to format the current top level form#2020-09-1722:47ChrisFor me that is the command: indent-for-tab-command#2020-09-1722:48dpsuttonand that's not indenting?#2020-09-1722:49ChrisNo, but only in Clojure source files. When I try to TAB on an empty line then nothing happens.#2020-09-1722:49dpsuttonand if you disable clojure-mode can you indent?#2020-09-1722:49ChrisYes, I tried to delete clojure mode and afterwards it works#2020-09-1722:50dpsuttoni was thinking with just m-x clojure-mode would turn it off#2020-09-1722:50dpsuttonis it the same function when clojure-mode is enabled?#2020-09-1722:50dpsuttonC-c h tab with clojure-mode is the same as a non-clojure mode buffer?#2020-09-1722:52ChrisYes, they are the same ... hmm#2020-09-1722:53dpsuttonok. so i did C-h f indent-for-tab-command and it mentions > The function called to actually indent the line or insert a tab is given by the variable ‘indent-line-function’.#2020-09-1722:53dpsuttonand in clojure-mode this is
(defun clojure-indent-line ()
  "Indent current line as Clojure code."
  (if (clojure-in-docstring-p)
      (save-excursion
        (beginning-of-line)
        (when (and (looking-at "^\\s-*")
                   (<= (string-width (match-string-no-properties 0))
                       (string-width (clojure-docstring-fill-prefix))))
          (replace-match (clojure-docstring-fill-prefix))))
    (lisp-indent-line)))
#2020-09-1722:54ChrisDoes that mean that actually „lisp-indent-line“ is called when outside of docstrings ?#2020-09-1722:54dpsuttonyes exactly#2020-09-1722:57ChrisI see! Thanks! I already spent quite some time on that, thanks to you I have a new direction which I can check.#2020-09-1722:59dpsuttoncan you post a form with | where your cursor is and what the form looks like before you indent it?#2020-09-1723:00ChrisI don‘t completely understand. At the moment I can‘t do any indentation by myself#2020-09-1723:02dpsuttonfor instance, when i type
(let [thing 1])
when i press enter after the 1 i get it automatically indented
(let [thing 1
      <cursor>])
#2020-09-1723:02dpsuttoni don't indent anything, it just indents for me#2020-09-1723:02ChrisOh yes, that works quite well for me too #2020-09-1723:02dpsuttonyeah. so i was wondering how you get into a state where indentation is necessary#2020-09-1723:03dpsuttonand if i erase all of the spaces introduced for me and hit tab, it indents it back to the correct level#2020-09-1723:04ChrisMaybe it is a bad habit. But sometimes I am in this situation:
(defn some-fn)
|
#2020-09-1723:04dpsuttonto me the only valid indentation level there is against the margin where your cursor is#2020-09-1723:05ChrisThen I would press TAB and enter [] and parinfer would put the end parentheses from above to the next line#2020-09-1723:06dpsuttonoh i see. i never use parinfer but i can see why its not indenting. not sure how to help you with that though#2020-09-1723:07ChrisI probably should just get used to the automatic indentation, seems to be generally a better way of writing Clojure #2020-09-1723:08ChrisThanks for your help !#2020-09-2112:29Robert A. RandolphI'm curious about people's setups using inferior-lisp with Clojure. I'd love to hear about the setup of anyone running it.#2020-09-2518:59Gleb PosobinIs anybody using doom emacs with clojure? Have just installed it after using spacemacs for a while. Trying to find any clojure configs to start off.#2020-09-2519:15ericdalloYes!#2020-09-2519:16ericdallohttps://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L99-L134#2020-09-2519:16ericdallohttps://github.com/ericdallo/dotfiles/blob/master/.doom.d/init.el#L100#2020-09-2519:19Gleb PosobinThank you!#2020-09-2605:05Gleb Posobin@UKFSJSM38 How do you deal with inserting in the end of the function? When I have (let [x 10] (* x 10 |)) on the top level, where | is the position of the cursor, and I am trying to insert e.g. 20 on a new line, I press enter but the cursor just moves outside the parentheses instead of moving the closing parentheses onto the new line.#2020-09-2614:11ericdalloThis is responssibility of your parenthesis manipulation package, I use paredit but there are others like lispyville , parinfer#2020-09-2614:12ericdallodoom-emacs has all of these on the init.el you just have to choose what you want to use.#2020-09-2606:13robert-stuttafordasking here, just in case someone's won this battle: https://twitter.com/RobStuttaford/status/1309737412931837952#2020-09-2606:21sogaiuit's not an answer to your situation, but having tried ivy after helm, i went on to try selectrum + prescient (by the author of straight). i have been pretty happy with the result.#2020-09-2606:38robert-stuttafordthanks! does it support showing candidates in a full buffer?#2020-09-2606:38robert-stuttafordbecause basically i love what ivy is doing, i just want it in a full buffer#2020-09-2606:52sogaiunot sure i quite get what you mean by a full buffer. don't know if this answers your question but there are some images here of what selection can look like: https://github.com/raxod502/selectrum#what-is-it#2020-09-2607:00robert-stuttafordminibuffer: that tiny section bottom of screen. full buffer: where you edit your code. i use a left+right full-height buffer system, so i want the candidate list to appear in whichever one my cursor focus isn't in, just like helm does it#2020-09-2607:07sogaiui don't think there is built in functionality for completions to appear in anything other than the minibuffer (but i'm new to selectrum). it appears there is some external package to display completions in a child frame mentioned in this section: https://github.com/raxod502/selectrum#complementary-extensions but that doesn't sound like what you describe.#2020-09-2607:15robert-stuttafordok, thank you for responding!#2020-09-2607:28sogaiugood luck in your quest :)#2020-09-2611:26practicalli-johnI'm still using helm as surprsingly it still works even without a maintainer and some how there are still updated packages coming through, so for a project that has lost its author it still seems active. I'll be sticking with helm for the rest of the year and probably much longer as I would miss many of the features not present in Ivy or other simpler approaches. Spacemacs also has a good Ivy setup, so its only one configuration value to change if I ever need to. I've tried Ivy before but I miss the features and approach that helm takes.#2020-09-2611:44sogaiuif i had known about selectrum / presicent sooner i think i would have switched regardless of whatever is happening with helm. anywhere / helm is one of the key things that helped me to start using emacs again some time back, but it's nice to see that others are also providing similar takes on the basic idea. i am happy there are alternatives -- i had not experienced ivy nor selectrum before recent events, but i'm glad i tried both out.#2020-09-2613:24Gleb PosobinWhen I have `(let [x 10] (* x 10 |))` on the top level, where `|` is the position of the cursor, and I am trying to insert e.g. 20 on a new line, I press enter but the cursor just moves outside the parentheses instead of moving the closing parentheses onto the new line, so the new state looks like:
(let [x 10] (* x 10))
|
instead of the expected
(let [x 10] (* x 10
              |))
How do I disable this behavior? I am not sure what package is responsible for that, maybe parinfer? How do I figure such stuff out by myself?
#2020-09-2613:29Gleb PosobinI am using doom emacs with clojure mode, I think those lines are the relevant ones from the config I am using: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L128-L134#2020-09-2613:37Gleb PosobinYeah, ok, it's parinfer's fault. How do I add last elements of lists then?#2020-09-2613:52Gleb PosobinSo apparently after entering a new line, I need to use C-f and C-b to position the cursor at the right indentation level and enter the form I want to add, according to the entry for smart-tabs here: https://github.com/DogLooksGood/parinfer-mode But when I do C-f, cursor indeed moves to the next indentation level, but quickly resets back to the start of the line.#2020-09-2613:54sogaiui'm not really all that experienced with parinfer, but recently tried out this other implementation: https://github.com/justinbarclay/parinfer-rust-mode -- don't know if that will be any better, but fwiw. btw, there is also a #parinfer#2020-09-2614:15Gleb PosobinUgh why is everything so painful with emacs... Have spent a couple of hours on this now.#2020-09-2616:21andy.fingerhutI would recommend that you consider disabling parinfer and trying that out for a while.#2020-09-2614:17dpsuttonParinfer sounds like the culprit here. I’ve never seen the appeal#2020-09-2614:22Gleb PosobinI can't even understand where it is being added.#2020-09-2614:22sogaiuif you are using doom i highly recommend asking at the discord server#2020-09-2614:23sogaiuthe maintainer gives great support#2020-09-3020:15gravHey! Been away from emacs for a while, but now I've installed prelude and wanted to try out clojure-lsp. I have a small toy-project, but I'm stuck at https://github.com/snoe/clojure-lsp#emacs. Do I need to write some elisp, or is prelude already configured to use clojure-lsp? How do I start it?#2020-09-3020:17gravclojure-lsp is in my path, but just opening a file with a namespace and trying eg lsp-rename yields "The connected server(s) does not support method textDocument/rename.#2020-09-3022:53sogaiuiiuc, there is an active #lsp -- may be that's a good place to ask?#2020-10-0410:26gravThanks @UG1C3AD5Z, will try that one next time. I managed to make it work, by using
(add-hook 'clojure-mode-hook #'lsp)
#2020-10-0112:41jonpitheranyone getting "wrong type argument "listp, define-clojure-indent" when jacking in?#2020-10-0112:49jonpitherfound it - some old dir-locals config#2020-10-0115:09j0nihi all, I am trying to figure out how to stop the indicators appearing in the fringe at the start of every defn form after I evaluate a buffer in cider - I am asking here, because I’ve seen screenshots of it in elisp buffers too (tho I haven’t personally seen it in my own emacs) - anyways, it stomps on my diff-hl configuration and I don’t see any point to it so I’d like to make it go away 🙂#2020-10-0115:10j0nihttps://www.dropbox.com/s/a460qswmpbgyypy/Screen%20Shot%202020-10-01%20at%2017.09.51.png?dl=0 this is what I’m talking about, the (in my case) green stripes#2020-10-0115:10dpsutton(setq cider-use-fringe-indicators nil) should do it i believe#2020-10-0115:11j0nioh wow, thanks for the fast answer @dpsutton I will try it#2020-10-0115:11dpsuttonconfirmed it worked for me after i reevaled the form. they don't fall away immediately#2020-10-0115:11dpsuttonno worries. i just greped defcustom fringe and it popped right up#2020-10-0115:13j0niyep, worked for me#2020-10-0115:14j0niit’s tricky getting the fringe to be helpful rather than crazy#2020-10-0115:15dpsuttonyeah. its so subtle that i don't think i pay attention to it#2020-10-0119:55adamfreyDoes anyone who uses lispy successfully get it working alongside magit blame? I tried to following the hint in the lispy readme and set the lispy-compat var to (edebug cider magit-blame-mode) but I still have lispy commands having priority when I'm in magit-blame-mode#2020-10-0300:35devnhello fellow humans#2020-10-0300:35devnIs there any “who calls” or “who requires” functionality in clojure-mode?#2020-10-0300:36devnI’d like to have my cursor at point over a fn, hit a hotkey and see a list of callers. Similarly, I’d like to get a list of namespaces that require the namespace at point.#2020-10-0300:38dpsuttonLsp offers this. I think cider does as well. But not clojure mode#2020-10-0302:23ericdalloYes, for #lsp, you can check here for more info: https://emacs-lsp.github.io/lsp-mode/page/lsp-clojure/#2020-10-0304:19andy.fingerhutI have looked at the clojure-lsp install instructions, and it says to download a clojure-lsp file from the github LATEST release section, which I have, and it is in a format I've not encountered before, which about 3 lines of text at the beginning that look something like a few lines of bash script, but starting with ":;" instead of "#! /bin/bash" like I see more often, and after those 3 lines of text containing binary data that my macOS's "file" command recognizes as a zip file, to the extend that "unzip -v clojure-lsp" shows what looks like a JAR file contents. Is there a name for this trick that I can look up and read more about?#2020-10-0408:04gravThe clojure-lsp that's downloadable from github is an executable thing, but you'll probably need to change its permissions in order to execute it. chmod +x /path/to/clojure-lsp Then try running it according to the troubleshooting guidelines: https://github.com/snoe/clojure-lsp/blob/master/docs/troubleshooting.md#2020-10-0408:05gravOh, d'uh - you asked about what makes it work, not why it doesn't work 😛#2020-10-0417:08ziltiYes, it is indeed normal shell script stuff. The JAR format apparently allows to add pretty much whatever you want at the beginning of the file up to the point where the jar itself starts.#2020-10-0417:26andy.fingerhutBut I have never seen a shell script that did not start with the #! characters before -- this one starts with :;, which is new to me. That is what surprised me most.#2020-10-1021:23sogaiuperhaps folks have tracked this down already, but fwiw, found this: > One day, while studying old code, I found out that it's possible to encode Windows Portable Executable files as a UNIX Sixth Edition shell script, due to the fact that the Thompson Shell didn't use a shebang line. via: https://justine.storage.googleapis.com/ape.html#2020-10-0304:33sogaiupossibly it's similar to what this does: https://github.com/BrunoBonacci/lein-binplus#2020-10-0304:34sogaiusee for example: https://github.com/BrunoBonacci/lein-binplus/blob/master/src/leiningen/bin.clj#L22#2020-10-0304:34sogaiusorry, this is not an answer to the actual question#2020-10-0304:38sogaiuhere is an article that may touch on it: https://d2iq.com/blog/executable-jars#2020-10-0313:18ericdalloYes @andy.fingerhut, this is exaclty what lein bin does, it is a jar blundled insize a executable linux file. You can learn more about it https://github.com/Raynes/lein-bin#2020-10-0523:49sogaiuit may be obvious to everyone who cares and a repeat, but fwiw there is a more up-to-date version with fixes (mentioned ealier in the channel). mentioning because of the security angle.#2020-10-0517:20Eric ScottI'm trying to use tramp to communicate with a docker image. I've installed docker-tramp.el.#2020-10-0517:20Eric ScottWhen I find-file starting with "/docker:", it correctly prompts me for ps's in the docker container, but after that point seems to think that my local home directory is the contents of that container.#2020-10-0517:21Eric ScottI can confirm from the command line that docker exec will give me the proper contents of said container.#2020-10-0517:21Eric ScottIs there some additional configuration that's needed to inform my tramp setup for docker?#2020-10-0606:08sogaiu@andy.fingerhut re: this executable trick -- coincidentally, came across this today: https://justine.storage.googleapis.com/ape.html#2020-10-0700:04gammarray@eric.d.scott I'm not sure if this helps, but here's the eshell alias I use for cd'ing to a docker container with docker-tramp:
alias dcd cd /docker:${docker ps -qf "name=$1"}:~/
You probably want to make sure you're using the docker container's absolute file path after the : in the format /docker:
#2020-10-1017:17Eric ScottThanks!#2020-10-0700:05gammarrayin the eshell alias above, you can cd into a container named example with the command dcd example#2020-10-1117:14chris_johnsonSilly question about the *grep* buffer - you can issue g to re-run the command which summoned the buffer (e.g., if you M-x rgrep you can naively “refresh” exactly that command). What I would like to do is use rgrep to specify a search string, set of files (like *.cljs) and location, often a subset of my project’s src but then re-run that command with just a different search string and not have to tell it again which files and where to look. I’ve read the docs I know about but this idea doesn’t seem to be treated anywhere. Is it not …a thing? Or just not a thing I’m clever enough to find on my own?#2020-10-1117:43practicalli-john@chris_johnson not sure of this early what your asking for... I use ripgrep binary instead of grep, which can include or exclude file extension patterns. I use helm-resume to re-run searches and the search is editable, so I can easily tweak the specific search term https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#2020-10-1206:16bozhidarOut of curiosity - what do you think on the subject of project.el vs Projectile? (https://github.com/bbatsov/projectile/issues/1591)#2020-10-1215:01practicalli-johnI understand very little about project.el, but is it the case that project aims to provide a standard way to find the root of the project. If so, then perhaps there is an opportunity for projectile to use project for that specific purpose and focus on all the additional features that projectile provides. This seems an implementation detail for the maintainers and not something I would be exposed to as a user of Emacs and Projectile. Thanks to @bozhidar and everyone who has contributed to projectile, it makes me productive every day.#2020-10-1402:25ozzloyif i'm in a clojure buffer, is there a shortcut to tell the cider repl to switch to this files namespace?#2020-10-1403:25jumar@ozzloy_clojurians_net cider-repl-set-ns (in my settings C-c M-n n)#2020-10-1403:26ozzloy@jumar thanks!#2020-10-1403:26ozzloyis there a way to get a running repl to grab new dependencies added to deps.edn?#2020-10-1403:29jumarI think there's but I don't use deps that much (using leiningen). A long time before it used to work with clj-refactor but that has been broken afaik. Check https://insideclojure.org/2018/05/04/add-lib/#2020-10-1403:31ozzloythanks!#2020-10-1403:33ozzloy@jumar that worked to switch the namespace for me!#2020-10-1418:26agWhat's the best way un-align forms that were previously aligned vertically with M-x clojure-align?#2020-10-1418:31mpenetclj-fmt 0.7.0 has a new flag for that#2020-10-1418:31mpenetWith emacs alone I dont know if that's feasible#2020-10-1418:33mpenetWith clj-fmt its with :remove-multiple-non-indenting-spaces? true#2020-10-1418:41agclj-fmt is painfully slow to execute as an external tool. jet --pretty is much faster, but it does manipulate the order of keys (not ideal). I'd like to find emacs-lisp way.#2020-10-1418:44mpenetYes but you'd do it once and then keep the codebase "clean" since by default no alignment happens.#2020-10-1418:44mpenetIf you need to do it back/forth it's another story#2020-10-1418:52ag> Yes but you'd do it once and then keep the codebase "clean" I need this not for the large codebase chunks. Mostly for selected regions or current clojure-form. Reasons: I like to vertically align things (forms read better that way), in some teams that is not an established convention, people sometimes don't like it. That is why I'm looking for the exact opposite of M-x clojure-align#2020-10-1419:08ag
(defun clojure-unalign (beg end)
  (interactive (if (use-region-p)
                   (list (region-beginning) (region-end))
                 (save-excursion
                   (let ((end (progn (end-of-defun)
                                     (point))))
                     (clojure-backward-logical-sexp)
                     (list (point) end)))))

  (save-excursion
    (save-restriction
      (narrow-to-region beg end)
      (goto-char (point-min))
      (while (re-search-forward "\\s-+" nil t)
        (replace-match " "))
      (indent-region beg end))))
#2020-10-1505:47bozhidarYou might also suggest something like this for inclusion in clojure-mode.#2020-10-1515:10agAlright, will make a PR#2020-10-1419:08ag
(defun clojure-unalign (beg end)
  (interactive (if (use-region-p)
                   (list (region-beginning) (region-end))
                 (save-excursion
                   (let ((end (progn (end-of-defun)
                                     (point))))
                     (clojure-backward-logical-sexp)
                     (list (point) end)))))

  (save-excursion
    (save-restriction
      (narrow-to-region beg end)
      (goto-char (point-min))
      (while (re-search-forward "\\s-+" nil t)
        (replace-match " "))
      (indent-region beg end))))
#2020-10-1507:35mathpunkI'm having a problem, possibly with comint, that I tried so hard to phrase for google but came up short. Maybe you folks will have an idea on a next debug step. I installed the indium package in an attempt to get a nicer repl experience when I gotta work with straight JS. When I send forms to the repl though, there is a weird phenomenon where this: let variable = "hi"; shows up in the target window like this: > > > l> le> let> let > let v> let va> let var> let vari> let varia> let variab> let variabl> let variable> let variable > let variable => let variable = > let variable = "> let variable = "h> let variable = "hi> let variable = "hi"> let variable = "hi";#2020-10-1522:38gravI've been trying to get parinfer v3 (aka "smart-mode") to work in Emacs. I've been using it in Cursive. I've found two implementations: 1. parinfer-mode, the smart branch: https://github.com/DogLooksGood/parinfer-mode/tree/smart 2. parinfer-rust-mode: https://github.com/justinbarclay/parinfer-rust-mode I've been able to get both up and running, but none of them seem to work like the reference implementation: https://shaunlebron.github.io/parinfer/demo A test that I made is to type a ( in front of the {:sum ... map. Both implementations don't automatically "slurp" the hashmap into a pair of parens (ie turning it into
({:sum sum 
  :prod prod})
Anyone had other experiences?
#2020-10-1522:40sogaiudon't have an answer to your question, but if you don't have much luck here, there is a #parinfer fwiw#2020-10-1802:09bartukawhat would be the recommended way to define the path of a file to be read by an emacs package? for example, I wrote a package pkg.el and it has a json file in the same folder that needs to be read when the user call M-x my-command but I don't know where the pkg was cloned by the user#2020-10-1802:18bartuka(file-name-directory load-file-name) (Y)#2020-10-1803:02ericdalloI'm not sure it is this what you are looking for, but there is locate-user-emacs-file which returns the user emacs path, lsp-mode use this, example: https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L6795#2020-10-1812:37bartukaIt's not the same behavior. I have a large populated json file and wanted to read from it. The following code did the trick:
(expand-file-name
  "sources/data.json"
  (if load-file-name
      (file-name-directory load-file-name)
     default-directory))
#2020-10-1812:38bartukathe full code can be found here: https://github.com/wandersoncferreira/oblique-strategies#2020-10-1812:52sogaiui don't know how robust it is, but i've used this sort of approach in the past: https://github.com/sogaiu/adorn/blob/master/emacs/adorn.el#L54-L59#2020-10-1907:15dakraThere was recently discussion about this on emacs-devel because native-comp puts files in a different directory than your normal .el or .elc files#2020-10-1907:15dakraThis is the solution in vterm: https://github.com/akermu/emacs-libvterm/blob/01a1332ebb11daca5408f7fcb8a08454b0176e79/vterm.el#L105-L112#2020-10-1909:18sogaiuthanks for sharing that#2020-10-1920:11ericdallohttps://www.reddit.com/r/emacs/comments/je3eht/emacs_user_survey_2020_is_open/#2020-10-2000:37practicalli-johnhttps://emacssurvey.org/ if you do not wish to go via Redit#2020-10-2122:47jmckitrickAnyone here familiar with paredit behavior?#2020-10-2123:57andy.fingerhutSomeone almost certainly is, but perhaps not someone who is on-line checking messages at this time.#2020-10-2123:57andy.fingerhutYou could try asking your question, and check back later to see if anyone answered it.#2020-10-2200:08practicalli-johnI use smartparens now, which is a newer version of paredit. Used paredit for the first few years of Clojure.#2020-10-2201:29jmckitrickWell, here’s the question. Paredit used to put an extra space between items when you ‘slurped’ an item into a sexp. Now, there is no whitespace between them. It seems that might be a setting. Where would it be?#2020-10-2201:30jmckitrick@U05254DQM what do you like better about smartparens?#2020-10-2207:26practicalli-john@U061KMSM7 smartparens seems more flexible in configuration and works for all languages, even non programming languages like org-mode and markdown#2020-10-2213:34frozenlockIs there a command to sort all the keys in maps? (In the source file, not with a sorted-map.) Similarly, I'd like to sort all functions arguments.#2020-10-2216:28practicalli-johnIf there is no such command, wrap the hash-map with sorted-map and use cider-eval-last-sexp-and-replace#2020-10-2402:07agThere's pretty cool, yet a tiny bit complicated way of doing this using babashka: So you're gonna need to run shell-command-on-region with a prefix C-u M-| shell-command-on-region sends marked region to an external command, when called with a prefix, it replaces the selected text in the buffer with the result of the command. So you do exactly this: C-u M-| bb '(into (sorted-map) *input*)' RET and it does it. Now, if you do this fairly often, next time you can call C-u M-|, you can press C-r and find your babashka call.#2020-10-2402:07agThere's pretty cool, yet a tiny bit complicated way of doing this using babashka: So you're gonna need to run shell-command-on-region with a prefix C-u M-| shell-command-on-region sends marked region to an external command, when called with a prefix, it replaces the selected text in the buffer with the result of the command. So you do exactly this: C-u M-| bb '(into (sorted-map) *input*)' RET and it does it. Now, if you do this fairly often, next time you can call C-u M-|, you can press C-r and find your babashka call.#2020-10-2315:57andrea.crottiI did a massive rewrite of my emacs config and now I lost a feature and I can't figure out how it was actually working before 😄#2020-10-2315:57andrea.crottiso basically I don't know if it was ido/helm or what else, whenever I had some options in the minibuffer it was showing the default even before I typed anything#2020-10-2315:58andrea.crottiI think it was helm actually, but I can't find the setting to enable that or see in the old config any difference#2020-10-2315:58andrea.crottiany idea about what could be the magic setting?#2020-10-2315:59andrea.crottimy helm settings are here https://github.com/AndreaCrotti/Emacs-configuration/blob/master/ca-init.el#L277#2020-10-2316:02andrea.crottimaybe I should switch to ivy or something else eventually tbf, but I'm curious to understand what was making it work before#2020-10-2321:44sogaiu@andrea.crotti didn't quite understand the feature description. it almost sounded like helm-M-x -- but i see that in your config. when i used helm, typing M-x was enough to show a list of recent commands. may be that's not what you are after? fwiw, all i had in my .emacs equivalent was:
(use-package helm
    :bind ("M-x" . helm-M-x)
    :config
    (require 'helm-config)
    (setq helm-M-x-always-save-history t))
regarding alternatives to helm, i recently tried ido and then selectrum + prescient. i found the latter pair to more closely match my taste and needs: https://github.com/raxod502/selectrum
#2020-10-2716:26fentonI've got some elisp questions...any recommendations on good online forums where to discuss them?#2020-10-2716:35dpsuttonthrow them in here. probably the relevant stack overflow section might have the biggest chance of success#2020-10-2718:23solfthere's also (comparatively) a lot of traffic on https://old.reddit.com/r/emacs#2020-10-2718:26fenton@dpsutton @dromar56 thanks guys.#2020-10-2721:37Louis Kottmannfor Emacs questions, the freenode channel #emacs is very active#2020-10-2820:32SchmohoHey I'm finally migrating from IDEA, however there is one feature I am kind of missing so far in CIDER and I'm trying to reproduce it. I want to bind the evaluation of code snippets in the REPL to keys - been using that a lot for system setup stuff. I've found cider-read-and-eval so far which seems to go in the right direction, but I thought I'd ask if there's something already implemented before I start digging into elisp#2020-10-2822:29EdYou could look into something like this? https://github.com/clojure-emacs/cider/pull/2920#issuecomment-716300891#2020-10-2918:18SchmohoThat seems to be about it, yup. I'll give it a try one of these days. The whole namespace thing with the registers solution is still a nuisance. That's actually part of the IDEA feature I was talking about, it let's you specify the namespace to evaluate the code in and that's rather crucial for the system setup stuff I have in mind (i.e. starting/restarting states, reloading hugsql files etc.). I guess it would be fairly easy to write some code to wrap a form to be sent to the repl so it's evaluated in the proper ns and the repl ns restored consequently, but the way I imagine it right now seems rather weird. Then again, no experience working with either nrepl or cider on that level, so maybe it's not even that bad. I haven't really dabbled with Elisp so far, so it might take me some time to understand the cider eval namespace properly. By then you guys might have already thrown something together, if not I'd be happy to contribute.#2020-10-2820:53Schmohoalso: should smartparens-strict-mode work in yasnippet?#2020-11-0217:09theeternalpulseis there any package that would convert html input to another type of structured layout, specifically hiccup#2020-11-0217:11Louis Kottmanncan pandoc do it?#2020-11-0217:26aghttps://melpa.org/#/html-to-hiccup#2020-11-0217:28ag@theeternalpulse ☝️#2020-11-0218:02theeternalpulsethanks, seems like it does the job, though I have to see how it handles multiple classes, I'm using tachyons and need something to convert the components to hiccup, but use the class as an array attribute version for ease of modification#2020-11-0223:16omendozarHi, how can a fix this color from the IntelliJ theme in emacs? The evaluations are horrible#2020-11-0315:19TMacMight want to post in #cursive#2020-11-0316:27omendozarI'm using emacs with intellij theme#2020-11-0519:24andrea.crottiWell you can customise the theme if you want#2020-11-0519:26andrea.crottihttps://joshrollinswrites.com/help-desk-head-desk/20200528/#2020-11-0516:44arthurI'm looking for a theme that has good color choices for clojure in a brightly lit room#2020-11-0517:05practicalli-johnI use doom-gruvbox light theme with Spacemacs, it works very well on sunny days and gloomy days 🙂 https://github.com/hlissner/emacs-doom-themes#2020-11-0521:26Ben SlessSpacemacs light, gruvbox light, solarized light. All very nice themese#2020-11-0610:13kimimthis is my home brewed two themes: https://github.com/kimim/kimim-emacs/blob/master/site-lisp/kimim-night-theme.el https://github.com/kimim/kimim-emacs/blob/master/site-lisp/kimim-light-theme.el#2020-11-0605:36theophilusxI'm trying out clojure-lsp and have a config quesiton. I'm using Spacemacs (develop branch) and have got clojure-lsp working. I'm working on a library project and am seeing warnings for all defn forms about the from being unused. Obviously, this is a common situation when developing a library. I'm assuming there is an option I can put in configure.edn which will turn off this warning (unused declaration). I've gone through the docs and found other options for unused namespaces, unused-reference-var etc, but nothing for this warning. Anyone know what setting I need?#2020-11-0606:17sogaiuif you don't get an answer here, you might have more luck in #lsp#2020-11-0607:16theophilusx@sogaiu Thanks, will try there as well#2020-11-0718:20jmckitrickSome years ago, paredit would automatically add whitespace after inserting a sexp and after slurping a term into a sexp. Is this an option anymore?#2020-11-1009:20kimimHello anyone know how to enable cider-mode after C-c ' in org-mode clojure source block? Thanks.#2020-11-1023:21papachanDid you tried to put this to your org-mode file?
-*- org-babel-clojure-backend: cider; -*-
#2020-11-1110:15kimimnot working in my emacs. Thanks.#2020-11-1119:46zhuxun2clojure-mode allows customization of indentation for macro forms [1]. But it doesn't have a wildcard. When using Om, Fulcro or Helix, I want all the (dom/* ... ) be indented with 1 space, but is there any better way than listing all the possible dom elements? [1] https://github.com/clojure-emacs/clojure-mode#user-content-indentation-of-macro-forms#2020-11-1307:48eunminIs there any package that shows the definition of the spot where the cursor is at like the image I attached? This is the image I just made for explanation :)#2020-11-1307:59hkjelsI’m not an lsp-mode user myself, but I do believe it has something like that. There are some functions prefixed with peek in lsp-ui-mode I believe#2020-11-1308:13eunminThanks, I'll try that. 🙂#2020-11-1308:28hkjelsYou’re probably already aware of Cider I guess. It will show you the relevant bits, like parameters and documentation, but not the implementation itself AFAIK#2020-11-1412:07eunminI wrote some code for this function. It works like the image below! But it may has some bugs because it's experimental version. 🙂 https://github.com/eunmin/cider-show-def/blob/main/cider-show-def.el#2020-11-1419:22ericdalloHey, lsp-mode has lsp-ui-doc that does exaclty what you want 🙂 https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/#2020-11-2216:36tianshuI think posframe is a good option to build a popup window.#2020-11-1317:19Louis KottmannI use emacs, cider and company(-box) and I would like to show the company-box popup "on demand" (i.e: while not completing) For example: without candidates, just the cursor on a name, and it would show what company-box displays when in the candidate list#2020-11-1317:19Louis Kottmannhow can I achieve that?#2020-11-1420:56Louis Kottmann(basically just show doc but in a poup)#2020-11-1420:57Louis KottmannI'm guessing the answer is "use lsp" since the question above is similar, I'll see if I can enable lsp-mode just to show doc & source on hover#2020-11-1508:56anonimitorafI'm on the native-comp branch and there's this issue with sayid: https://github.com/clojure-emacs/sayid/pull/59 Any ideas for workarounds?#2020-11-1510:11IulianHi! I am using emacs with cider and lein. I can get the repl started, but I cannot get buffer sexp eval at point, and the buffer itself seems unaware that cider is running. I read the documentation and watched videos demonstrating the interactive use, but I still cannot solve the problem.#2020-11-1510:13Louis Kottmannhello lulian, do you have cider/cider-nrepl in your project.clj? is the cider-mode activated in your current buffer?#2020-11-1510:18IulianNo, adding it now. Do I have to write a version, or if I don't, it will get the latest?#2020-11-1510:20Louis Kottmannyou have to write a version I believe#2020-11-1510:21Louis Kottmann[cider/cider-nrepl "0.25.4"]#2020-11-1510:21Louis Kottmannmind you, it you should be added as lein plugin (i.e: in the :plugins key)#2020-11-1510:24IulianOk, I added it as a plugin, and it builds the project and starts the repl#2020-11-1510:25Iulianbut if I turn on cider-mode it still says not connected#2020-11-1510:25Louis Kottmanndid you cider-jack-in-clj?#2020-11-1510:27IulianI cider-jack-in-cljs#2020-11-1510:27IulianDo I have to also run the clj part?#2020-11-1510:27Louis Kottmannthat, I don't know, I don't use clojurescript#2020-11-1510:27IulianI thought they are made to work the same#2020-11-1510:27Louis Kottmannbut once you did cider-jack-in-cljs you should be able to C-M-x a sexp and it would be evaluated in the CIDER REPL#2020-11-1510:27Iulianalright, I will try clj#2020-11-1510:28Louis Kottmanndo you code in clojurescript or clojure?#2020-11-1510:29Iulianclojurescript#2020-11-1510:29IulianBut I may be able to solve the problem with clojurescript myself, if I manage to run clojure correctly#2020-11-1510:30Louis KottmannI know there are a couple of gotchas with cljs, but clj should work out of the box yes#2020-11-1510:30IulianThe thing is, I do cider-jack-in-clj, it starts the repl correctly, but the buffer is still cider [not connected]#2020-11-1510:31Louis Kottmannany interesting error in C-h e ?#2020-11-1510:31IulianNo, just the usual "starting server, connecting to server"#2020-11-1510:31Iulian
[nREPL] Starting server via /usr/bin/lein update-in :dependencies conj \[nrepl\ \"0.8.2\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.25.4\"\] -- repl :headless :host localhost
You can run the command ‘cider-jack-in-clj’ with C-c M-j
[nREPL] Starting server via /usr/bin/lein update-in :dependencies conj \[nrepl\ \"0.8.2\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.25.4\"\] -- repl :headless :host localhost
[nREPL] server started on 36699
[nREPL] Establishing direct connection to localhost:36699 ...
[nREPL] Direct connection to localhost:36699 established
```
#2020-11-1510:32Louis Kottmannlooks good#2020-11-1510:33Louis Kottmanncan you access your namespaces in the repl at all?#2020-11-1510:33Louis Kottmann, ns in CIDER buffer#2020-11-1510:34IulianYes, I switched it to cider-nrepl just now#2020-11-1510:34Iulianto try out the command#2020-11-1510:34Iuliancider.nrepl, sorry#2020-11-1510:35Louis Kottmannwell, it's working#2020-11-1510:35Louis Kottmann^^#2020-11-1510:36IulianI got it working in the buffer as well#2020-11-1510:36Iulian#2020-11-1510:36Louis Kottmann👌#2020-11-1510:36IulianThank you!#2020-11-1510:36Louis Kottmannhere begins the fun#2020-11-1510:36IulianI will now debug the cljs one#2020-11-1520:51practicalli-johnThe figwheel-main template is a useful way to create a new project that should work as is with cider-jack-in-cljs Here is an example https://practicalli.github.io/clojurescript/web-design-basics/clojurebridge-london-website/create-project.html#2020-11-1600:22kimimthat depends. When connecting to repl, cider will prompt several options. Choose the correct one, and remember also open a navigator to run the cljs code.#2020-11-1600:25IulianThe main problem, that I still have not solve yet, is that when I choose the figwheel option, emacs opens the repl in a new buffer, but the original buffer remains in the cider [not connected] state#2020-11-1600:25IulianWhen I choose the browser option, it actually works and connects correctly#2020-11-1600:36practicalli-johnIf figwheel-main fails, then the project is probably not configured to run figwheel-main build tool for Clojurescript#2020-11-1600:38IulianIt fails with plain figwheel only in the sense that it does not connect the buffer to the repl. Everything else works. The browser renders the application.#2020-11-1608:29mpenetis there a cider function that will (spec) instrument a namespace/project? I wrote stg based on cider-eval-* but I am wondering if I am not re-inventing the wheel#2020-11-1717:54mpenetSure but that's not what I want. I already have that in some projects but I want this at the cider level too for when I work on code.#2020-11-2001:22quollHi. So, not really being an emacs person, I tried to update some packages today. 2 things came from this: • Starting emacs now has a split screen with help in the lower frame. • paredit is no longer enabled by default in any file I can just close the help frame when I start the app, but needing to enabled paredit for every file I open is getting painful, and is leading to mistakes when I start editing without noticing that my parens are not balanced (I use paredit on both emacs and vim). Does anyone have a suggestion for how I might enable paredit automatically on .clj/.cljc/.cljs files please?#2020-11-2004:35joshmiller@quoll You can enable Paredit in Clojure buffers with (add-hook 'clojure-mode-hook #'paredit-mode) in your init.el#2020-11-2005:14quollI’m sorry. I should have said. That line does appear in my init.el file#2020-11-2005:21quollother packages appear to be working. For instance, I have syntax highlighting, and I use evil mode, which is enabled by default. Just not paredit#2020-11-2005:24quollSo my installation isn’t disconnected from the packages in the ~/.emacs.d/elpa directory. And it’s able to autoload some of them. But not paredit#2020-11-2005:25quollAh… I just tried moving the line to immediately after the package installs, and it worked!#2020-11-2005:31quollIt used to say:
...stuff...
(package-initialize)
(dolist (p my-packages)
  (when (not (package-installed-p p))
    (package-install p)))

(require 'evil)
(evil-mode 1)

(load-theme 'deeper-blue)

(require 'evil-leader)
(global-evil-leader-mode)

(add-hook 'clojure-mode-hook 'paredit-mode)
...more stuff...
And this did not work. It worked earlier today, but like I said, after a package update it stopped. The init.el now says:
...stuff...
(package-initialize)
(dolist (p my-packages)
  (when (not (package-installed-p p))
    (package-install p)))

(add-hook 'clojure-mode-hook 'paredit-mode)

(require 'evil)
(evil-mode 1)

(load-theme 'deeper-blue)

(require 'evil-leader)
(global-evil-leader-mode)
...stuff...
And this is working just fine. The only part of that code that I ever messed with was loading the deeper-blue theme, so I thought that maybe if I moved the add-hook above it (and the evil setup) then it might work. I think I only tried something that silly because it’s after 12am 🙂
#2020-11-2005:31quollThank you for the response#2020-11-2012:54andrea.crottiI switched from Helm to selectrum+prescient and in the process I lost auto completion for shell commands in the minibuffer (with M-!) for example#2020-11-2012:55andrea.crottiany idea how to get that working again?#2020-11-2408:33anonimitorafAnyone have any luck/workarounds for sayid on emacs native-comp branch? Specifically https://github.com/clojure-emacs/sayid/pull/59#2020-11-2419:33eccentric JAny ideas how to make the cider-pprint-eval-defun-at-point format with line breaks so it’s not one continuous line?#2020-11-2811:34joetagueHi. I'm looking for some help on my first elisp code. I'm using (async-shell-command) but I don't understand how to stop the *Async Shell Command* buffer being created (it contains no output). Here's my code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;; For react dev when CIDER offers to ;;
  ;; visit the url for the started cljs ;;
  ;; project, open using Google Chrome  ;;
  ;; and auto open the DevTools         ;;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (defun browse-url-react-dev-chrome-devtools (url &optional new-window)
    "Assume Google Chrome is installed on MacOS, use open command to start Chrome with DevTools open at the passed url"
    (async-shell-command (concat "open -a \"Google Chrome\" --args --new-window --auto-open-devtools-for-tabs " url) nil nil))

  (defadvice cider--offer-to-open-app-in-browser (around cider--offer-to-open-app-in-browser activate)
    "Wrap around the CIDER function, update the browse-url to use my function that start Google Chrome instead of Safari"
    (let ((browse-url-browser-function
           'browse-url-react-dev-chrome-devtools))
      ad-do-it))
#2020-11-2812:55dakraYou can name the buffer different but I'm not sure if you can not create the async buffer. I would use start-process-shell-command where you can set the buffer to nil to not create a buffer for the process.#2020-11-2813:20dakraFYI https://emacsconf.org/2020/ starts soon#2020-12-0114:00bartukahi, I am trying emacs on wsl2, how can I integrate both clipboards? would like to M-w something and C-v on windows apps#2020-12-0114:06genmeblogUse XServer for that. You can use X410 (paid) or XOrg free server from Cygwin (for example). Cygwin X should be run with the following arguments: Xwin :0 -multiwindow -ac +iglx -wgl -clipboard -listen tcp#2020-12-0114:07genmeblogClipboard is passed both ways, ie win->wsl and wsl->win#2020-12-0114:08bartukaI am using X410 and the option to share clipboard is enabled.#2020-12-0114:08bartukaidk if I need to do something on the ubuntu side (or emacs)#2020-12-0114:11bartukauhm.. I restarted the X410 and emacs and now M-w is hanging 😕#2020-12-0114:13genmeblogOh, strange... it works for me well.#2020-12-0114:14bartukaeven using emacs -Q does not work#2020-12-0114:16genmeblogmaybe Windows firewall is blocking something?
#2020-12-0114:23bartukaidk, I'm new to windows .. still trying to figure out how to debug this#2020-12-0114:26genmeblogI don't know how to do this 😕#2020-12-0114:28genmeblogJust a random reddit post from the past (3y ago): I use Emacs (25.3) with VcXsrv (X Server for Windows) and clipboard sharing works like a charm (but only after latest Creator Update for Windows 10, earlier you had to patch sources of Emacs to prevent it from hanging). (here: https://www.reddit.com/r/bashonubuntuonwindows/comments/6xx3k5/emacs_functions_for_the_windows_clipboard/)#2020-12-0114:28genmeblogSo maybe you haven't updated Windows to the newest one?#2020-12-0114:33bartukauhm.. there are a couple of updates pending here. let me try. thanks#2020-12-0114:34genmeblogthe bigger updates should be initiated manually by you, they are not automatic anymore.#2020-12-0114:40bartukagot it!#2020-12-0114:58bartuka@tsulej it worked! thanks for the help#2020-12-0114:59bartukaI am being so brave and not cursing windows too much bc of every annoyance. I'll give myself a cookie now =)#2020-12-0116:08genmeblogthat's great! cookie is obligatory now 🙂#2020-12-0203:14ZorHow can I paste code without parinfer rebalancing all parens ?#2020-12-0207:25hkjelsI don’t use parinfer, but from the name, it sounds like that’s exactly what it does. You could just turn it off#2020-12-0210:16practicalli-johnParinfer infers where the parens should go based on the position of characters. So I assume you would have to write an Emacs lisp function to wrap the paste command that disables parinfer, then calls the usual past command and then enables parinfer again. Although I assume parinfer will still update the pasted code at some point, especially if you edit it. I prefer using structured editing as I like to control the structure of my code. I use smartparens in strict mode, it works very well and is unobtrusive https://github.com/Fuco1/smartparens#2020-12-1016:33ZorThanks for the pointers!#2020-12-0301:10zaneCreated #doom-emacs for discussing the https://github.com/hlissner/doom-emacs.#2020-12-0311:32Ian Fernandezjust asking, anyone knows how I can define more than 1 repl profile on .dir-locals.el ?#2020-12-0311:37Ian Fernandez@UCTNL1JNN thread for u#2020-12-0311:32Ian Fernandez
((clojure-mode
  (cider-clojure-cli-global-options . "-A:cljs:dev:test")
  (cider-default-cljs-repl . shadow)
  (cider-shadow-cljs-global-options . "-A:cljs:dev:test")))
Like, most part of my company/side projects I do something like this
#2020-12-0311:33Ian Fernandezbut I've seen some projects that people does in IntelliJ that requires more than 1 repl (remote-repl, dev repl, sandbox repl) that contains some other mix of aliases#2020-12-0311:34Ian Fernandezanyone knows here how to make some other "cider-jack-in profiles" like Repl profiling on IntelliJ?#2020-12-0322:42futuroIn the event no one else has a cleaner solution, you could make a small function which opens each of the repls you want, then bind it to a key with .dir-locals#2020-12-0401:02Ian Fernandezok, thanks 😃#2020-12-0311:34Ian Fernandez🙂#2020-12-0410:08Charles FourdrignierAn "everyday" Emacs question. What do you use as "empty buffer" when you want to put some writings (long Slack message, ...) in Emacs, but not in a file ? Until now, I tend to use *scratch* disabling elisp-mode (or just ignoring red lines). Is there "better" solutions ?#2020-12-0410:10practicalli-john@charles.fourdrignier scratch buffer in fundamental-mode for pasting weird stuff into Emacs... this will prevent Emacs font locking and so shouldn't hurt Emacs or slow it down... or give you red lines:) In Spacemacs you can set the default mode the scratch buffer uses, so I assume there is some variable that can be set to do this globally...#2020-12-0410:11Charles Fourdrignier> pasting weird stuff into Emacs Perfect ! :) Thank you.#2020-12-0410:17Charles FourdrignierJust find this article by Bozhidar Batsov https://emacsredux.com/blog/2014/07/25/configure-the-scratch-buffers-mode/#2020-12-0410:20practicalli-johnYes, its the same in Spacemacs, it sets initial-major-mode to text mode (which also speeds up loading). Although I configure it to use org-mode as I use that for organising content into sections#2020-12-0410:51kimimI also bind F5 key to switch to scratch. When ever I need to write some stuffs, I just press F5 for refresh air.#2020-12-0411:51Eamonn SullivanI often use buffers in Emacs that aren't connected to a file, just to take advantage of the major modes and anything else I've set up for particular modes. For example, when examining a big blob of JSON from a REST API, I'll copy it, switch to a buffer called "whatever.json" and paste it into there. That way I can navigate, reformat, etc., but don't save to a file. I'll do the same with temporary message editing sometimes (a .txt extension turns on spell-checking, etc.)#2020-12-0412:03Charles FourdrignierThank you for your tricks. Forgot that you could C-x b to non-existing buffer !#2020-12-0700:11pcjHello everyone 🙂 Is there an easy way to change the indentation of a user macro in clojure mode? I have code that looks something like this:
(|> 1
    |> inc
    |> inc)
But would like to have my indentation like so:
(|> 1
 |> inc
 |> inc)
Looking at https://github.com/clojure-emacs/clojure-mode#indentation-of-macro-forms it only seems that one can define indentation for built-in macros... but maybe I'm missing something?
#2020-12-0701:18ericdalloI think you can use something like:
(define-clojure-indent
    (your-macro 'defun))
#2020-12-0701:19ericdallodefine-clojure-indent is a elisp macro, that's why accepts anything that may be a clojure macro like your-macro#2020-12-0701:19ericdalloor
(define-clojure-indent
    (your-macro 1))
#2020-12-0702:20pcjThank you for the response! Trying
(define-clojure-indent
  (|> 'defun))
changed the indentation 🙂 Only problem is is that it's 1-off from being what I'd like it to be 😞
(|> N
  |> inc
  |> inc)
The way I want it is a weird case and I doubt much clojure code would be styled like that (and I am only doing it for fun).
#2020-12-0806:51danielgrosseHello, I have a strange issue within emacs, I can't get rid of. When I type in some code, the company mode popup appears and shows me the suggested methods. But when I want to browse through them, the popup is closed and the cursor moves to the next line. Also when I try to hit enter, or click on the suggestion, the same happens. Strangely this happens not all the time. Also I have the feeling, that it works better with internal methods than with libraries. But this is not proven. I use Emacs 28 with the doom config and the latest Cider.#2020-12-0821:29anonimitorafMind posting your doom config? I'm also on Emacs 28/native-comp and it's all good for me I think my company boxes use LSP to populate the options. In any case, it seems like whether it uses Cider or LSP is irrelevant. Issue is probably with how your company is configured#2020-12-0910:30danielgrossehttps://github.com/Ninerian/doom.d#2020-12-1407:05danielgrosseFinally I found the solution, as it is described here: https://github.com/hlissner/doom-emacs/issues/1335#2020-12-0807:01danielgrosse#2020-12-0911:54andrea.crottisometimes I use eshell to run commands inside Emacs, and I have multiple shells open#2020-12-0911:55andrea.crottiit would be great if switchiing to eshell could switch to the one related to the project I was just on#2020-12-0911:55andrea.crottiit should not be too hard in theory, anyone did something like that already?#2020-12-0913:20bartukahttps://github.com/hying-caritas/project-shells seems like what you want#2020-12-0915:13Kevin FIf you use projectile then I believe projectile-run-eshell does what you’re describing. Bound to <projectile-mode-map> x e (likely C-c p x e if you’re using suggested projectile-mode-map of C-c p#2020-12-0916:14andrea.crottiah yeah that works, just have to remember to always use that though also to switch to the right shell#2020-12-0916:14andrea.crottinice thanks#2020-12-0915:14bartukahow can I find what application is using a specific hotkey on windows? I am trying to use C-) in paredit but Emacs is not receiving this command. C-h k C-) does not show anything. I already disabled Ctrl+Shift that was used to Language Switching. In fact I receive the command C-(#2020-12-0915:17Kevin FI haven’t dealt with this before, but https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows-Keyboard.html suggests w32-register-hot-key as a potential solution#2020-12-0915:21bartukaOh, I should be in trouble.. I think this function w32-register-hot-key only exists in the native windows installation. I am using through WSL2#2020-12-1120:19MitchAm I overlooking something for wanting vertical alignment of vectors as an option? My team makes heavy use of map var-args and this would make them align as if they were maps. I have hacked this functionality into my config by setting
clojure-align-reader-conditionals t
clojure--beginning-of-reader-conditional-regexp "\\["
#2020-12-1200:53cheppreyI'm trying out Emacs Prelude. Does anyone know how to make it stop complaining about using cursor keys ( <down> keybinding is discouraged! Use <C-n> instead )#2020-12-1200:56dpsuttoni think that's guru-mode to help you become a guru#2020-12-1200:57dpsuttonhttps://prelude.emacsredux.com/en/latest/troubleshooting/#warnings-on-arrow-navigation-in-editor-buffers#2020-12-1200:57cheppreyor weed out those who shall never ascend#2020-12-1200:57cheppreythanks @dpsutton that did the trick 🙂#2020-12-1200:57dpsuttonhaha. no way. its customizable. i will say i love the emacs keybindings because they are system defaults and work in browser text areas, intellij, etc (on osx at least. control gets a bit abused on linux/windows)#2020-12-1200:58dpsuttonbut the point of emacs is to make it your emacs. anyone who says differently is missing the point 🙂#2020-12-1203:16kimimguru-mode is interesting. I will give it a try, I want to be a guru.#2020-12-1411:52bozhidarIt's some of my earlier work, but it's just as relevant 10 years later 😄 (https://github.com/bbatsov/guru-mode)#2020-12-1420:23zachHi! I was wondering if anyone had advice/experience with working with doom-emacs and clojurescript (specifically a project created using https://github.com/day8/re-frame-template ? I cannot connect my emacs to the repl created by this template, but am uncertain if it’s an issue with my doom setup, the template, or my expectations about either.#2020-12-1501:55Gleb PosobinI am not using this template, but I am using Cider repl in Doom Emacs with a shadow-cljs and re-frame project. What's the problem you are seeing?#2020-12-1503:49zachAh, thank you for replying, @UQ4RJ22EA! The issue I am having is that after I start up the project with lein watch and then go into doom and run cider jack-in cljs, I get an error of server already running#2020-12-1503:49zachI assume this is because emacs is trying to create and start a repl which was already made by running lein watch, and so I try to do cider connect cljs and choose the nrepl created which is port 8777.#2020-12-1503:50zachThis will open up a repl in doom set to the namespace cljs.user. I can write functions in this repl, and I can send stuff to the browser (e.g. (js/alert ’something”)), but I can’t evaluate any functions in my buffer.#2020-12-1503:51zachThe hot reloading is working, if I adjust views i see that reflected in the browser…but if i wrote (+ 1 2 3 4) in one of the files, then did ,ee to evaluate….nothing happens. If I do ,eE to send a form to the repl I get the message file is not connected to any repl session#2020-12-1503:52zachthis also means I can’t look up a variable with cider docs or any other useful stuff i’m used to with a straight clojure project#2020-12-1513:13Gleb PosobinCider-jack-in starts a new server for the repl, yes. I think I was also having problem with running shadow through lein so instead I am starting the shadow-cljs watch through cider-jack-in-cljs. Can you try that?#2020-12-1513:14Gleb PosobinEmphasis on shadow-cljs watch as opposed to lein watch.#2020-12-1519:29zachah, I shall try that!#2020-12-1519:56zach@UQ4RJ22EA, that worked! It took a minute, but I have a connected doom session. Thank you!#2020-12-1502:24Felix MHi, I'm looking for any reference materials that translate vanilla emacs keybinds to their evil-mode equivalent? e.g C-x C-f = SPC ff#2020-12-1508:39practicalli-johnI haven't seen anything like that, so I wrote a book on using Spacemacs using Evil https://practicalli.github.io/spacemacs/spacemacs-mini-cheatsheet.html#2020-12-1515:28Felix M@U05254DQM Thanks, your guide looks very easy to follow, just what I need. I use Doom and was struggling to follow Clojure for the Brave's Emacs tutorial with the vanilla keybinds, hence the search for a translated reference.#2020-12-1516:19practicalli-john@U01GD44GX2P the brave Clojure config is quite dated unfortunately, but otherwise it's a great book I am not sure if Doom is as complete with its Clojure key binding, compared to Spacemacs, but I have been adding the command name to make it easier to use the Practicalli Spacemacs book with other Emacs setips#2020-12-1516:19practicalli-johnOf you have any questions, please ask#2020-12-1514:35David PhamDid anyone try the native version of emacs? I just compiled it, and it is really faster.. I was wondering about downside if anyone had any?#2020-12-1514:54ericdalloI'm using with doom-emacs for a while and it's working very good#2020-12-1515:01David PhamI am using it with prelude 🙂#2020-12-1516:51dakraI use it as well and works really well. When I started there where a couple of packages that needed some fixes to compile cleanly but now iirc only jupyter is the last package in my config that doesn't work out of the box with native-comp. (and a PR I made is outstanding to fix it)#2020-12-1522:45richiardiandrea@UFAP0C8KU which packages required adjustment? I am curious cause I am seeing some crashes and I wonder if I am missing something#2020-12-1610:11dakraHmm. Don't remember all packages as most of them are fixed by now. I remember treemacs https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41112 and currently outstanding jupyter https://github.com/nnicandro/emacs-jupyter/pull/248 But I don't think anything should actually cause a crash. If you can reproduce a crash you should report it with M-x report-emacs-bug#2020-12-1622:34richiardiandrea@UFAP0C8KU I can reproduce consistently when I copy and paste stuff so I will definitely report it#2020-12-1808:36anonimitorafIt works perfectly for me except for sayid :(#2020-12-1821:09richiardiandreaIn my case XLIB_SKIP_ARGB_VISUALS=1 was breaking copy/paste 🤷#2020-12-1914:40Ben SlessAnyone here successfully compiled it on ubuntu 20?#2020-12-2005:44anonimitorafYep. Im on ubuntu 20.04#2020-12-2007:18Ben SlessCan you please share how you went about it @UR37CBF8D? Whatever I try I get a segfault temacs starts the dump process#2020-12-2007:53David PhamI am also on 20.04. I followed this stackoverflow post: https://emacs.stackexchange.com/questions/59538/compile-emacs-from-feature-native-comp-gccemacs-branch-on-ubuntu#2020-12-2009:29Ben SlessI did that, too, still crashed and burned 😞#2020-12-2009:33anonimitorafOh, yea I essentially did the same as https://emacs.stackexchange.com/a/60858#2020-12-2009:36Ben SlessFor some reason starting in a clean directory from scratch did work#2020-12-2010:39David PhamCongrats! Tell us what you think about it.#2020-12-2013:06Ben Slessdo you know where it saves the compiled .eln files?#2020-12-2013:08David PhamIn /usr/lib/emacs/emacs-28.../native-libs #2020-12-2013:08David PhamFor me#2020-12-2013:09David Pham[i got it trying to make a symlink but I had to make a bash file haha]#2020-12-2013:09Ben SlessI think it's misbehaving and generating them in the library where the binary is run (i.e. in pwd)#2020-12-2013:17Ben SlessI think the biggest issue I found until now is that it can't be built in the same directory twice#2020-12-2020:00David PhamI found an issue with json where one of the deps renders kill-buffer impossible to use.#2020-12-1710:51nmkip#2020-12-1710:59kimim (setq org-babel-clojure-sync-nrepl-timeout 1000)#2020-12-1711:12nmkipI tried setting 20000 instead of 1000 and I'm getting the same error 2-4 seconds after executing cider-connect-clj#2020-12-1711:16kimimsorry, please try this line: (setq nrepl-sync-request-timeout 100)#2020-12-1711:22nmkip100 milliseconds ? I tried 1000 and it's been trying to execute the command for 5 minutes now 😛#2020-12-1711:23nmkipit doesnt timeout, but it doesnt complete#2020-12-1714:21dpsuttonIt was answered in cider but putting here for clarity: cider does not support socket tells#2020-12-1714:22dpsuttonRepls #2020-12-1808:57zackteoHi guys, by any chance does anyone run emacs with EXWM and CIDER and use Zoom for screen sharing? I'm not sure if the issue lies with my hardware or with EXWM but the resulting set up ends up with a lot of latency such that in that sense screen sharing properly is impossible. Any thoughts about it?#2020-12-1812:29dakraI use exwm, cider and zoom.. But for me zoom takes 100% CPU even without sharing, so as soon as I start zoom I basically can't do much anyway 😞 jitsi, google meet etc all works fine. I read reports that other people complained about the zoom client as well (especially under linux)#2020-12-1812:42ericdalloI don't use EXWM, use BSPWM with NixOS and it works really nice without any issues.#2020-12-1813:24practicalli-john@zackteo for latency in the user interface it's probably the compositing manager used. EXWM supports several, so try using a different one of see if there are settings to tweak. I had the same thing with a different tiling window manager and I switched off the compositor and it ran very smoothly.#2020-12-1816:10ziltiQuestion to the Spacemacs users in here: how do I disable the Clojure layer from using clojure-lsp? It's an annoying memory hog for me#2020-12-1816:19practicalli-john@zilti The Spacemcs Clojure layer does not include any configuration for clojure-lsp, so you cant disable it in the Clojure layer. I assume you have the Spacemacs lsp layer installed and clojure-lsp binary, and some configuration in your .spacemacs file (probably in dotspacemacs/user-config) that configures clojure-lsp to run when in clojure-mode.#2020-12-1816:20practicalli-johnRemove the lsp layer from .spacemacs and restart Emacs, this should be the quickest way to remove it. I would need to see your .spacemacs config to help further#2020-12-1816:22ziltiYes, it does now: https://develop.spacemacs.org/layers/+lang/clojure/README.html#optional-lsp-server#2020-12-1816:22ziltiI need lsp-mode for other things, so I want to keep the lsp layer#2020-12-1816:38practicalli-johnThats very bad if someone just added it without telling people. Its also using quite negative tone against the well established CIDER approach. I will investigate and raise this with the Spacemacs maintainers...#2020-12-1816:46ziltiEspecially having it enabled by default. All other languages I use require you to set a variable to enable it#2020-12-1816:51practicalli-johnYes, this is really badly though through. It forces anyone who does not want lsp for clojure to add another vairable to their .spacemacs layer config. I believe this should switch it off..
clojure :variables 
        clojure-backend 'cider
#2020-12-1816:52practicalli-johnThanks for raising this. Using clojure-lsp would kill my startup times, turning a few seconds into several minutes whilst clojure-lsp goes and re-indexes all the project where I have a clojure buffer open....#2020-12-1816:59ziltiSure. And thank you for the off switch 🙂 it works.#2020-12-1817:09practicalli-johnYes, they didnt even bother documenting how to switch it off properly either... I would be interested in using clojure-lsp but is very heavyweight around the UI and I found a lot of clashes with CIDER when I ran them both together earlier in the year. I also need to tell it to not index all my projects on Emacs startup, otherwise its there for minutes each time... clojure-lsp doesnt seem to work with Java 11 unless you compile it yourself, so some more work there. I would like to see some documentation that explains how to configure clojure-lsp before I try it again.#2020-12-1817:25ericdalloIt's in my backlog adding a tutorial using CIDER with clojure-lsp 😅 https://emacs-lsp.github.io/lsp-mode/tutorials/CPP-guide/#2020-12-1817:25ericdalloBut I agree, it's missing docs explaining how to use both, after some tweaks they work together and work really nice#2020-12-1818:45practicalli-johnLooking forward to this, as I can see the potential. Thank you.#2020-12-1817:43mpenetAny of you tried the gcc branch already?#2020-12-1817:44ericdalloYes, we discussed recently here: https://clojurians.slack.com/archives/C099W16KZ/p1608042920265000#2020-12-1817:45dpsuttonthanks for the link!#2020-12-1906:33jumarI’ve tried with spacemacs - looks good so far#2020-12-1909:52Carmine Casciatoit's pretty snappy. No major issues so far.#2020-12-1914:40Ben SlessAnyone here successfully compiled it on ubuntu 20?#2020-12-2113:33Eamonn SullivanI've been using the native-comp version from the snap store: sudo snap install emacs --edge --classic. It's working well for me, but updates frequently and everything has to be recompiled each time. That used to be more of a pain, but seems to happen automatically now.#2020-12-2318:41Carmine Casciatodidn't know there was a snap for that, seems handy#2020-12-1817:44dpsuttonis there an easy way to do so from brew? On my older linux box i compiled from source but now on my newer mac i just pull from brew#2020-12-1817:46ericdalloFor nix users there is the easy way emacsGcc : https://github.com/nix-community/emacs-overlay#emacs-from-git-and-latest-including-pre-releases#2020-12-1817:47ericdalloI use NixOS so this is the canonical way, but MacOS users can use nix too 😅#2020-12-1817:47ericdalloFYI: https://dev.to/louy2/use-nix-on-macos-as-a-homebrew-user-22d#2020-12-1817:51tvaughanFYI, https://github.com/d12frosted/homebrew-emacs-plus/pull/188#2020-12-2312:26PiotrI feel ashamed for not knowing this but since i updated my OS to Big Sur my emacs no longer works in GUI mode, all I get is terminal, which is workable, but I can’t get over this. Can anyone point me in the right direction?#2020-12-2312:37Eamonn SullivanDid you brew install emacs? Try brew cask reinstall emacs --no-quarantine#2020-12-2313:13PiotrOne bridge furhter:#2020-12-2313:16PiotrOK, got it to work. Thank you @UR71VR71S#2020-12-2321:55David VujicI ran in to similar issues, and before Big Sur had issues with flickering windows in emacs. Now I’m running https://github.com/railwaycat/homebrew-emacsmacport #2021-12-2807:35PiotrThanks!#2020-12-2405:53David PhamSomeone over Twitter said that we could rewrite emacs in Clojure. I believe it is too extreme, but did anyone think of a library that could interact with babashka/clojure server for emacs feature? My idea is we could launch a babashka nrepl server [to avoid the starting time penalty?] having a few gluing function for emacs <-> babashka, and write the logic in Clojure. #2020-12-2405:55David PhamDistribution of package is a problem though, but we could have a clojar folder under /.emacs.d.#2020-12-2408:05David PhamMaybe this is what I am thinking about https://github.com/clojure-emacs/clomacs :)#2020-12-2412:54lreadThere was deuce, but it halted due to licensing issues: https://github.com/hraberg/deuce/issues/20#2020-12-2413:19David PhamI quickly clomacs and babashka, and thanks to the nrepl server the experience is quite good: launch a bb script that read the deps edn and import the libraries and set the classpath, and launch the nrepl server, connect with cider and clomacs will send the string arguments a problem.#2020-12-2413:19David PhamIt is really cool, you can just write all your data manipulation in clojure now 🙂#2020-12-2520:13David PhamHello, does anyone has an exemple of a callback, in clomacs-defun? [line 510] https://github.com/clojure-emacs/clomacs/blob/master/src/elisp/clomacs.el I tried to passe the identity function but failed to make it run. #2020-12-2615:12David PhamI don't know where I should write this feedback, so please, forgive me if it is the wrong channel. I have been trying the emacs clojure-lsp with cider, and for the most part, it goes well. I have only an issue: the interaction between lsp and cider breaks a few goodies I liked in Cider. One of which is when inside a function call, cider displays the signature of the verb in the bottom message bar. (For example for max-keys, it would show the 3 arities, wheras LSP only displays the first in the UI). Moreover, it seems LSP confuses cider and cider can't lookup any core docs or definition. I like the refactoring abilities of LSP, but not sure I am ready to give up on cider for that.#2020-12-2615:23ericdalloThanks for the feedback! It would be nice if you could open a issue on clojure-lsp with a sample how to reproduce the bug, this will help track the issue 🙂#2020-12-2615:26David PhamI will do 🙂 Thanks#2021-12-2720:46Mark NaylorWhy does emacs put an empty (ns ) definition at the beginning of any newly created *.clj file? Can it be overridden? Version: GNU Emacs 26.3 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 3.18.9) of 2019-08-29#2021-12-2720:51ericdalloThis is done by clj-refactor (and if you use clojure-lsp)#2021-12-2720:52ericdalloYou can disable it for clj-refactor setting
(setq cljr-add-ns-to-blank-clj-files nil)
#2021-12-2720:53ericdalloand for clojure-lsp adding to your config.edn :
{:auto-add-ns-to-new-files? false}
#2021-12-2723:06practicalli-johnclj-refactor has always added a populated namespace definition when used without clojure-lsp Is there some conflict here between the two?#2021-12-2723:07ericdalloif you have enabled both flags, it will add duplicated ns, that's why we added to clojure-lsp the flag to disable it too#2021-12-2723:35andy.fingerhutYeah, that is definitely not stock Emacs doing that for you, for sure. Mine doesn't.#2021-12-2817:17bartuka@U05254DQM it is not always populated. If you create a empty folder and add a core.cljfile in there, it will create the (ns )#2021-12-2817:17bartukaI believe the plugin needs to find a "valid" project structure (either deps or lein) so it can work properly.#2021-12-2817:30practicalli-john@UBSREKQ5Q that makes sense, if you dont have a valid project structure you dont get a valid namespace definition. It seems I've always used valid projects 🙂 Do people still use core.clj, I though that convention had been dropped a long time ago?#2021-12-2817:31bartukalein new <projName> still creates the core.clj file by default#2021-12-2822:00Mark NaylorThank you for all the responses. I sent the clojure-mode maintainer an email; he pointed me to the clj-refactor functions and hooks. Since I was creating the new file in elisp, I shadowed the cljr-add-ns-to-blank-clj-files variable in a let* block.#2021-12-2918:12Mark Naylor@U05254DQM I have leinengen 2.9.1, and it still creates core modules.#2021-12-3110:02vemvanyone has a command that duplicates a line, while doing an effort to not unbalance parentheses? a naive duplication would also duplicate closing parentheses: )))) easily breaking code so I'm looking for something that given a line like this a b c))) inserts <newline><indentation>a b c. and given a line like this: let [a 42 inserts <newline><indentation>a 42 (i.e. skip let [, because that would unbalance parentheses)#2021-01-0110:11yuhanLispy has a lispy-kill command which does this#2021-01-0113:05vemvthanks! I'll check it out#2021-01-0713:45motformI think the same is also found in smartparens/evil-smartparens, if you are still looking.#2021-01-0719:10vemvI have it in my TODO list yeah. The smartparens hybrid functions look useful thanks!#2021-01-0310:05AndrosThis script alert if the battery exceeds certain percentage charge limits to maintain health. Only for MacOS. Emacs Lisp 100.0% https://github.com/tanrax/macos-battery-alert-to-maintain-health.el#2021-01-2009:37daboone72Any org guru's here. How do I store a search for a TODO like SOMEDAY and the abscence of a a tag like @office? I can see the string I want +TODO="SOMEDAY"&/cdn-cgi/l/email-protection in the manual but don't know to put it in the org-agenda-custom commands.#2021-01-2009:40daboone72Wll try tags-tree one more attempt here#2021-01-2009:49daboone72Ok figured it need to escape quotes and just tags. ("ru" "Review Next Unused 9" tags "-use+TODO=\"NEXT\"")#2021-01-2012:41caumondHi. Does anyone using plantuml mode can tell the flow he uses ? I have difficulties to understand how preview are sent in which buffer. Personnaly I have more and more buffer opening each time I launch a preview. As the focus stay in the source buffer it is uneasy to close preview buffer.#2021-01-2114:04zackteoPreviously when I have used plantUML, I use it in a org-mode src block and I don't actually have any pop ups. Not the most ideal workflow but I will make changes, and sometime open a window with the png file. If i want to see changes I do a revert-buffer#2021-01-2114:04zackteoa block like
#+begin_src plantuml :file usecase.png
       left to right direction
       actor Switch

       Switch -- (Send Message to Subscriber)
       (Send Message to Subscriber) -- (Send Ringtone) : <<includes>>
       (Send Message to Subscriber) -- (Send Dialtone) : <<includes>>
       (Send Message to Subscriber) -- (Send Busytone) : <<includes>>

     #+end_src
#2021-01-2115:14caumond@UUSQHP535, I'll try this, the only point is that your file is not a valid plantuml file. Is there a way to refer to a real plantuml file?#2021-01-2204:49zackteo@U018QDQGZ9Q oh it isnt? I'm not too sure about this. Did you explore the readme of plantuml-mode? https://github.com/skuro/plantuml-mode#2021-01-2204:52zackteoIf you want the plantuml file generated from the code as well I belive you are looking to have :tangle yes in the options#2021-01-2204:53zackteoOtherwise I'm not too sure ^ but you can probably look at this https://orgmode.org/manual/Extracting-Source-Code.html#2021-01-2114:19zackteoThis issue has been bugging me for very long When type outside of a parenthesis block in clojure, after a few seconds , a mini buffer that says "Lisp expression:" if it any input it will not do anything, so it completely just disrupts my workflow. From some investigating, it give in Messages
Company: An error occurred in auto-begin
Company: backend company-capf error "Symbol's function definition is void: jrfklsjufkljaklfjklajfklajfkl" with args (candidates djfsklfjs)
So it seems company-auto-begin is triggering. Does anyone know what make this trigger different from when I am in a () and how I might want to fix this behaviour?
#2021-01-2203:25sogaiu@zackteo this is a long-shot, but: https://github.com/hlissner/doom-emacs/issues/4235 has similar looking errors. iiuc, there are two suggestions there: 1) doing something about stale bytecode 2) removing some packages and adding them back the following SO answer has some tips on obtaining more info regarding this type of error (i think): https://stackoverflow.com/a/23509501#2021-01-2514:41vemvAnyone has a lot of these in iTerm so that his emacs accepts a variety of keybindings smoothly?#2021-01-2514:41vemv#2021-01-2514:46andy.fingerhutYou are running emacs on macOS system from within iTerm window, such that emacs does not create a separate window, but stays within iTerm?#2021-01-2514:47vemvcorrect, I'm using emacsclient lately#2021-01-2514:50andy.fingerhutThere are probably dozens of variations here, and good reasons for each, but I've been running GNU Emacs for Mac OS X https://emacsformacosx.com/ for a while now, so it creates its own separate window from the terminal where I start it, and I believe it supports emacsclient (I don't often use that). If I had any problem getting keystrokes through to it, I may have forgotten what those were now. The biggest change I recall making was in overall Keyboard preferences for the system to check the box labeled "Use F1, F2, etc. keys as standard function keys", since I prefer using them that way, which means I have to hold down Fn key when they work as their Mac-specific behaviors (e.g. audio louder/quieter, screen brighter/dimmer)#2021-01-2514:53vemvRight, I'm used to GUI emacs and it provides a smooth experience including everything related to keybindings :) now I'm assessing emacsclient for a different use case, namely a quick edit of a given file without interrupting my iterm 'flow'. It mostly works fine but the keybindings part is a bit challenging#2021-01-2515:00andy.fingerhutCertainly the quick-and-dirty options are "keep plugging away at adding bindings manually to cover your common use cases", or "learn to live with less keybindings for quick edits of files" 🙂. Hopefully someone else may have gone down this road and have better suggestions for you.#2021-01-2518:17daemianmackFWIW i’m down this road and it is annoying to maintain a robust set of iTerm keybindings for terminal emacs, but it works well for my needs :)#2021-01-2514:42vemv(I only have a few but suspect that expanding these would be the simplest solution to my keybinding limitations. But don't know where to start)#2021-01-2616:05pithylessMy emacs freezes up once in a while - could just be a spinning UI thread or an actual crash, but it is completely unresponsive and all I can do is kill the process, restart emacs, and restore the file. Any suggestions on how I can go about debugging or tracking this to identify what is the culprit? (My initial suspicion is perhaps aggressive-indent-mode - but I've got no proof :))#2021-01-2616:07tvaughanSame. Is this on macOS? I'm hoping this problem doesn't exist on Linux. I don't use aggressive-indent-mode, but I've noticed this happens when moving around and editing a clojure buffer which could trigger font locking#2021-01-2616:08pithylessyep, it's macOS and doom-emacs (if that's relevant)#2021-01-2616:12Max DeinekoIs it unresponsive even to receiving a SIGUSR2?#2021-01-2616:14Max Deineko(I had encountered lsp-mode freezing when combined with clojure-mode ~lately~, but nothing the usr signal would not interrupt)#2021-01-2616:49pithylessI'm not using clojure-lsp, but thanks @U9TGHG3LP - I was not aware of SIGUSR2; (I was just forcing quit via Activity Monitor (which I assume does a pkill -9 ).#2021-01-2616:50pithylessNext time I get it to reproduce (and manage to rescue it via SIGUSR2), is there anything I can run to help debug what was hogging the UI?#2021-01-2616:58Max DeinekoUsually usr2 will cause emacs to enter the debugger, so that you should be able to pinpoint at least some execution point related to the problem.#2021-02-0210:45rickmoynihanI’ve had this same issue/symptom too… It happens quite frequently, but not enough to easily debug it. Also on macos M-x emacs-version
GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
 of 2020-08-12
#2021-02-0216:40pithylessIt's happening less frequently now (I think), but unfortunately in my setup pkill -SIGUSR2 just exits emacs (without putting it in a debugger state). This maybe something with the way doom-emacs is configured by default, but I had not investigated further yet.#2021-02-0216:41pithyless
GNU Emacs 27.1.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G6042)) of 2020-11-17
#2021-02-0218:44tvaughanThis just happened to me again. Looks like it had something to do with the modeline, telephone line specifically#2021-02-0308:57rickmoynihanInteresting, @U0P7ZBZCK what makes you think that? FWIW I’m running doom-modeline (but my own emacs config)#2021-02-0311:09tvaughanThat’s what came up in the debugger. I didn’t see anything that looked incorrect though. Could have just been a coincidence that’s where emacs was at the time when I sent USR2. I’ll see what happens next time. Hopefully there’s at least a consistency to this problem #2021-02-0412:14rickmoynihanFYI I disabled doom-modeline out of interest yesterday, and so far I’ve not seen emacs crash — so could be promising, but too early to say for sure#2021-02-0416:23pithylessthanks everyone for contributing data points to this thread!#2021-01-2802:38richiardiandreaIs anybody here using .org.gpg files? I started receiving weird errors like Thank you sounds good, I receive "These default coding systems were tried to encode text in the buffer ‘ *temp file*': (utf-8 (1 . 4194180) ...." However, each of them encountered characters it couldn't encode:" and a bunch of codes like \204 \366#2021-02-0106:47Adrian ImanuelHi All, I'm sorry, newbie here... i'm using doom emacs now, and I don't know the shortcut for : 1. how to make my cider repl move to right panel? 2. [C c M p] >> is this the correct shortcut to send code from buffer to REPL? much appreciated for the help 😄#2021-02-0108:02Max Deineko1. There are probably better ways to achieve this, but you can manually create a new window with one of the evil-window- and evil+/window- commands (bound to "SPC w" prefix by default) and switch to repl buffer using "SPC b B" 2. You usually don't want to send code to repl directly (or, equivalently, paste, which "C-c M-p" does iianm) but let cider evaluate it (former evaluates it in whatever namespace the repl currently is in, latter switches to the namespace your code defined last for span of evaluation), e.g. via "SPC m e e" (cider-eval-last-sexp) -- see "SPC m e" and "SPC m p" prefixes for more commands#2021-02-0108:07practicalli-johnSet the CIDER variable cider-repl-pop-to-buffer-on-connect to nil and then the REPL buffer doesn't get in the way. Evaluation in source code buffers is far more effective and is always in the context of the correct namespace. https://practicalli.github.io/clojure/repl-driven-devlopment.html#evaluating-source-code#2021-02-0113:11Adrian Imanuel@U9TGHG3LP thank you so much for the tips, it works like charm for point no 1. I'll try point no 2... Thanks again! 🙏#2021-02-0115:53localshredIf your cursor is in the repl, I believe C-w L will move the window to the right vertical split#2021-02-0107:49caumondHi @adrianimanuel, in spacemacs, I would launch a spacemacs/cider-send-xx-to-reploption and have a look to the suggested key binding. Look for the windows menu in doom in cheatsheet: https://gist.github.com/hjertnes/9e14416e8962ff5f03c6b9871945b165#2021-02-0108:07practicalli-johnSet the CIDER variable cider-repl-pop-to-buffer-on-connect to nil and then the REPL buffer doesn't get in the way. Evaluation in source code buffers is far more effective and is always in the context of the correct namespace. https://practicalli.github.io/clojure/repl-driven-devlopment.html#evaluating-source-code#2021-02-0113:14Adrian Imanuel@caumond somehow, i couldn't install spacemacs. it stuck in downloading resources. someone told me to use doom for the time being. Thank you so much for your answer#2021-02-0309:22LuI’ve got a small problem only when using a cljs repl with cider. When I use cider-pprint-eval-last-sexp , I sometimes get the evaluated data structure in one line, which makes it very hard to read esp when dealing with a big one.. Do you guys know how to work around this?#2021-02-0311:28solfDo you use shadow-cljs? If so, try setting nrepl-pprint to true: https://shadow-cljs.github.io/docs/UsersGuide.html#_repl_3#2021-02-0311:32solfIf you're not using shadow-cljs, then maybe this can point you to the right direction: https://github.com/nrepl/piggieback#pretty-printing#2021-02-0312:06Luthanks for the pointers!#2021-02-0322:32practicalli-johnUse the cider-inspect tool to view / navigate data structures#2021-02-0402:05solfDoes cider-inspect work for cjls? It throws an error in my last shadow-cljs project, I didn't push further as I thought it was just clojure-only#2021-02-0409:54andrea.crottiit works for cljs for me#2021-02-0409:54andrea.crottiwe don't use shadow though, we use clj#2021-02-0410:30LuYeah not working in shadow in my proj :)#2021-02-0423:20practicalli-johnOther alternatives are Portal and Reveal. Or raise an issue against cider (sorry, I don't have any specific ideas for this)#2021-02-0403:47tianshuIs that the clojure-mode can't correctly recognized the position of method docstring in defprotocol?#2021-02-0701:19nmkipHi! Is there a way I can override some evil keys for a specific mode (cider-inspect-mode)?#2021-02-0701:58fedregI do this to override evil keys for the cider debugger. I imagine you should be able to do something similar for inspect-mode?
(defun my-cider-debug-setup ()
  (evil-make-overriding-map cider--debug-mode-map 'normal)
  (evil-normalize-keymaps))

(add-hook 'cider--debug-mode-hook 'my-cider-debug-setup)
#2021-02-0713:24nmkipThanks!! I'll try to figure out what that does and come back later#2021-02-0714:27nmkipThis worked for me:
(defun nmkip/cider-inspector-mode-hook ()
    (general-override-local-mode)
    (general-define-key
     :states 'normal
     :keymaps 'local
     "h" 'cider-inspector-pop
     "H" 'cider-inspector-prev-page
     "j" 'cider-inspector-next-inspectable-object
     "k" 'cider-inspector-previous-inspectable-object
     "l" 'cider-inspector-operate-on-point
     "L" 'cider-inspector-next-page
     "q" 'quit-window
     "r" 'cider-inspector-refresh
     "s" 'cider-inspector-set-page-size
     (kbd "RET") 'cider-inspector-operate-on-point
     [mouse-1] 'cider-inspector-operate-on-click
     ))
#2021-02-0803:23fedregGlad you got it working! Sorry, realized I didn’t give you any explanation of the snippets I posted above 😁#2021-02-1012:37clyfeAnyone on prelude+ergoemacs ?#2021-02-1012:38clyfeWarning (bytecomp): reference to free variable 'ergoemacs-modify-transient-maps' ^ ergoemacs from melpa, I get that with prelude (is ok without prelude)#2021-02-1013:04clyfeAdding (defvar ergoemacs-modify-transient-maps 1) does away with the warnings. Likely a hack, but I don't know better.#2021-02-1018:12vemvYou can ls ~/.emacs.d/elpa to verify the exact versions that you have downloaded So you can e.g. delete that dir's contents, start prelude, and write down the exact contents. Then repeat without prelude, and diff#2021-02-1022:31practicalli-johnThere has been some discussion about stability issues with Emacs in MacOSX, especially on the latest Mac hardware. There have been some rendering issues, hangs and crashes. I have reports that building Emacs from source using the native compile branch, has produced stable builds. I wonder what Emacs distributions the community is finding stable for Emacs 27 (or 28)#2021-02-1110:59tvaughanhttps://clojurians.slack.com/archives/C099W16KZ/p1611677112010600#2021-02-1022:32practicalli-johnI haven't experienced any issues running Emacs on Ubuntu Linux, event night builds of 28 have seemed fairly stable.#2021-02-1022:33ericdalloI'm using native-comp Emacs 28 with doom-emacs on NixOS for a while without issues#2021-02-1022:34practicalli-johnGood to know. Did you compile Emacs yourself, if so any particular build process used?#2021-02-1022:36ericdalloI use NixOS, so the canonical way to install anything is via the nix way, for Emacs, I use this nix overlay: https://github.com/nix-community/emacs-overlay#2021-02-1022:37ericdallohttps://nixos.org/ is a pure functional declarative package manager (that also works for Mac), so everytime I build the same Emacs version, it will always be the same 🙂#2021-02-1200:37practicalli-johnUnfortunately this doesn't help anyone running MacOSX.#2021-02-1200:38ericdalloAs I said, Nix is available for Mac users as well: https://wickedchicken.github.io/post/macos-nix-setup/#2021-02-1102:11ag@jr0cket John, /cdn-cgi/l/email-protection homebrew formula (since recently) includes --with-native-comp option.#2021-02-1105:02practicalli-johnReally useful, thank you.#2021-02-1111:56Yehonathan SharvitWhat’s the exact command line to install a stable emacs version via homebrew? Should I include --with-native-comp?#2021-02-1115:59Yehonathan Sharvit@U0G75ARHC ^^ ?#2021-02-1116:14grazfatherAre you really not able to just… try?#2021-02-1117:09ag> install a stable emacs native-comp is an experimental feature. First you need to tap it brew tap d12frosted/emacs-plus and then depending of what you want, do something like: brew install I for example built it with xwidget support as well#2021-02-1205:23Yehonathan SharvitI just installed it. How do I tell this emacs instance to use my emacs.d (so that it runs spacemacs)?#2021-02-1206:36tvirolaiNote that unfortunately Emacs 28 seems to be currently incompatible with for example evil-mode and org-mode: https://github.com/hlissner/doom-emacs/issues/4534.#2021-02-1118:39grazfatherIs there a list somewhere I can see the differences between 27 and 28?#2021-02-1118:43Bret HorneC-h n can bring up news and changes for your version of emacs. Otherwise you can find news files in etc in the emacs repo. https://github.com/emacs-mirror/emacs/tree/master/etc dont see 28 there in the mirror yet though.#2021-02-1118:53ag@grazfather https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS#2021-02-1119:05grazfatherThank you both 🙂#2021-02-1217:09vermais this the most definitive guide for setting up clojure-lsp on emacs? https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#2021-02-1217:16ericdalloNot sure is the most definitive 😆 but it should help#2021-02-1217:16ericdalloIs the only guide for clojure-lsp AFAIK#2021-02-1217:17verma🙂 thanks#2021-02-1217:18vermaI will try it out#2021-02-1217:18ericdalloGood luck 😄#2021-02-1419:01Ian FernandezHello, any one knows how can I support a project folder with subproject folders inside?#2021-02-1419:01Ian Fernandezthe only option is to have .dir-locals.el & .projectile for every project/subproject ? 😞#2021-02-1502:38solf@d.ian.b you can customize the files that projectile consider as root files, for example I have this on my config:
(setq projectile-project-root-functions '(projectile-root-top-down))
(setq projectile-project-root-files
	'("project.clj" "package.json" ".git" ".bzr" ".svn" ".hg" "_darcs" ".projectile" "Makefile"))
So any subdirectory containing a project.clj would be considered as a separate project. Reminds me I need to add deps.edn to the list. I don't remember why I changed the default value of projectile-project-root-functions though. Might be needed, might not :man-shrugging:
#2021-02-1815:12Ian Fernandezthanks 😄#2021-02-1509:42LuDoes your cider dynamic font locking work when you connect a cljs repl to a running process? I see that core fns are not highlighted at all .. mm i.e. assoc . I can see it working for custom fns, but not for built in cljs functions…👀#2021-02-1509:47LuI guess this is the relevant option, but the checkboxes are properly set so not sure..#2021-02-1616:46aaelonysomehow I rediscovered hs-minor-mode recently and am enjoying code-folding in emacs greatly. It works amazingly well in Clojure, Python, R and probably other languages I have yet to try 🙂#2021-02-1712:06Mikko KoskiThanks for sharing! I didn't know about this but it looks handy! Definitely gonna give it a try#2021-02-1816:10vemvI have a little setup that always folds the ns form by default For the rest of the form personally I never use folding. IMO the need can reveal other issues (e.g. ns size)#2021-02-1820:07aaelonyI have a few colleagues that have 10,000 line python files per project. I find it useful for those and also for perusing lengthier codebases#2021-02-1820:19vemvsure, I don't question code-folding :) I simply reflected my views for greenfield clojure development#2021-02-1820:19vemvcurious, does emacs handle a 10kLOC file gracefully? I'd imagine the AST parsing could slow down things#2021-02-1820:56aaelonyno problems so far#2021-02-1820:57aaelonyperhaps it has more to do with the RAM on the box#2021-02-1823:51kingcodeWoaw! Thanks for sharing, I love hs-minor-mode :)#2021-02-2015:18sogaiui use this to collapse comment blocks sometimes:
(add-hook 'clojure-mode-hook
              (lambda ()
                (hs-minor-mode)
                (setq hs-hide-comments-when-hiding-all nil)
                (setq hs-block-start-regexp "\\s(comment")))
#2021-02-1616:46aaelonythought I'd share#2021-02-1621:56caumondHi, I have modified my test source directory to test/src instead of test . My objective was to be able to add some test/resources.... and so on. The issue I have is with projectile which projectile-between-implementation-and-testis still trying to create test file directly to testand not test/src. Is there a way to fix that? I don't find reference to that, it that a so bad practise to set directories like that?#2021-02-1703:32solfHmm I don't see an option to customize that (might have overlooked it), maybe you can try overriding the following function in your config:
(defun projectile-test-directory (project-type)
  "Find default test directory based on PROJECT-TYPE."
  (projectile-project-type-attribute project-type 'test-dir "test/"))
#2021-02-1703:33solfchanging "test/" for "test/src"#2021-02-1715:15caumondSo if I understand the answer you gave and the lack of other answers, this use case is not a classical one. I guess people leave their test in the test directory ?#2021-02-1713:31danielnealAnyone using counsel-git-grep and knows how to get it to ignore files/directories?#2021-02-1715:09agstandard .gitignore should work, why not use that?#2021-02-1715:54mpenetyou can also specify patterns just for git grep in your git config#2021-02-1715:54mpenetbut these would be global#2021-02-1715:55mpenet-> https://git-scm.com/docs/git-grep#2021-02-1716:39danielnealI don't use gitignore because some of the files I don't want to search are checked in#2021-02-1716:39danielneale.g. some minimized js for swagger docs#2021-02-1716:59agthen you can call it with a universal argument and use -e option for a pattern https://git-scm.com/docs/git-grep C-u M-x counsel-git-grep#2021-02-1812:04slipsetSo peeps on emacs and macos. How have you configured `Super` ? I realize that I now reveal myself as a total emacs n00b.#2021-02-1816:14vemvwhat emacs are you on? GUI or terminal? I use GUI emacs, have three modifiers:
(when (eq system-type 'darwin)
  (setq mac-control-modifier 'super)
  (setq mac-option-modifier 'meta)
  (setq mac-command-modifier 'control))
(you might need to assign different values - IIRC my assignments are non-standard)
#2021-02-1818:05Bret HorneI use a qmk board
#2021-02-1812:11hkjelsFor us Norwegians, I think it’s difficult to have Super work alongside regular editing. I myself use evil-mode and other bindings to achieve the things that Super is usually used for#2021-02-1812:11hkjelsI rebind caps-lock to esc, but that could have been used for super instead I guess#2021-02-1812:19slipsetI’m on a us keyboard, and my caps is control. I guess I could map it to right-shift?#2021-02-1812:22hkjelsI tried that for a while; thinking I didn’t use it that much, but I apparently use it a lot! So it wasn’t a good option for me, but it may be different for you#2021-02-2013:02Illia DankoGood day dear Clojurians. I have the hard time straggling of passing elisp keymap to a custom function. I expect that after major mode has loaded (in my case it’s clojure-mode) my new keybindings become available, but they don’t:
;;; Settings.
(straight-use-package 'paredit)

(defun my/shared-lisp-mode-hook ()
  (require 'paredit)
  (my/vim-paredit-init clojure-mode-map))

;;; Clojure.
(straight-use-package 'cider)

;; This doesn't work.
(defun my/vim-paredit-init (map)
  (evil-define-key 'normal map (kbd "<localleader>r") #'paredit-raise-sexp))

;; This works, but not what I want.
;; (defun my/vim-paredit-init (map)
;;   (evil-define-key 'normal clojure-mode-map (kbd "<localleader>r") #'paredit-raise-sexp))


(defun my/clojure-mode-hook ()
  (my/shared-lisp-mode-hook))
  
(add-hook 'clojure-mode-hook #'my/clojure-mode-hook)
I know I miss something conceptual and trivial, but couldn’t come up to any, but duplicating paredit key bindings for all major modes: elisp, clojure, which I want to avoid...
#2021-02-2019:03ACI can’t easily test it here, but I would guess you need to call my/vim-paredit-init with a quoted arg --
(my/vim-paredit-init 'clojure-mode-map)
#2021-02-2020:10Illia DankoI’ve tried, doesn’t work#2021-02-2218:52slipsetAnyone else having problems with projectile? After a package-upgrade projectile-find-file has stopped “working” as in, it doesn’t suggest completions anymore?#2021-02-2221:24anonimitorafI'm on Projectile 2.4.0snapshot and it works perfectly. Which version do you have? (`M-x projectile-version`)#2021-02-2307:06slipsetProjectile 20210125.726#2021-02-2307:22slipsetOk, seem to have figured it out. I needed to switch projectile-completion-system from auto to ido#2021-02-2307:26slipsethttps://github.com/bbatsov/projectile/issues/1606#2021-02-2313:20Illia DankoI updated all my packages from melpa yesterday and everything is OK including projectile#2021-02-2313:23Illia DankoGNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19#2021-02-2400:57mikejcusackDoes anyone have a working doom+lsp+rebl set up? I'm following the directions from the REBL docs, but the communication between Doom and REBL isn't working.#2021-02-2403:17mikejcusackHow do I configure cider to not generate -Sdeps when jacking in?#2021-02-2405:09dpsuttonhttps://github.com/dpsutton/rebl-example#2021-02-2602:59Adrian Imanuel#2021-02-2809:16clyfeIs it possible to make an elisp function bound to left or right arrow key that: • if no active region, moves the point arg places in arrow direction (standard stuff) • works with shift translation (selects text when shift pressed, standard stuff) • if region is active, deselects text and places the cursor at the start or end of region (depending on arrow direction) The tricky part afaict is shift translation deselects before function runs, and I can't tell if text was selected on last point.#2021-02-2813:57clyfeManaged it with advices on handle-shift-selection & call-interactively & such#2021-02-2815:22grazfatherCould you please share the mapping for curiosity’s sake?#2021-03-0114:58dpsuttonGNU organization requests more compliance with gplv3 from spacemacs: https://github.com/syl20bnr/spacemacs/issues/14444#2021-03-0119:43nivekuilyou think that person is an official representative? no links no https://gnu.org and I thought it was the fsf that did enforcement (and probably not via a github issue). seems like a crank#2021-03-0119:44dpsuttonyes i believe so. they mentioned stuff on the mailing list#2021-03-0119:47dpsuttoni believe the user posting this issue has control of {:tag :mailto:bugsgnu.supportbugsgnu.support, :attrs nil, :content nil}. Ah, on further inspection, the gnu.support website says > We are not endorsed by GNU or Free Software Foundation. We just love GNU and FSF!#2021-03-0307:58Ben SlessTheir interpretation is quite far fetched IMO Spacemacs is more of a package manager and a suite of packages than an emacs distribution. Also, emacs, being a sort of overlay OS, is modified by emacs lisp code the same way the JVM is modified by running byte code. I wonder what they're trying to achieve#2021-03-0308:00Ben SlessI also wonder if gnusupport is a lawyer#2021-03-0315:09dpsuttonHeh. I do not wonder that at all#2021-03-0115:23grazfatheryuck#2021-03-0115:26ennwhy yuck?#2021-03-0115:30grazfathergplv3 pollutes everything#2021-03-0510:17teodorluQuick question. I find that using find . -iname '*.go' | xargs bat (or use cat instead of bat, if you don't care about syntax highlighting) is an excellent way to quickly read a bunch of files. There's one caveat: I can't treat it as an Emacs buffer. Are anyone else doing something similar to what I'm doing to "collect a bunch of files to read linearly"? Suggestions on how to "Emacsify" the workflow? Thanks!#2021-03-0511:04vemvfrom a quick googling, it looks like emacs can't make a buffer out of stdin directly So maybe I'd persist find . -iname '*.go' | xargs bat to a tmp file and open that#2021-03-0511:33teodorluGood point. I suppose I'd loose syntax highlighting then?#2021-03-0511:34teodorlu:thinking_face: It might not be too hard to write a script that takes a list of filenames as input, and produces an org-mode file with those files listed.#2021-03-0511:52vemv> Good point. I suppose I'd loose syntax highlighting then? You can always M-x clojure-mode (or w/e mode it is) to activate it#2021-03-0512:01teodorluGood point. Or save the temp file with the right extension. :thinking_face:#2021-03-0514:43andy.fingerhutDoes M-x grep using the -r recursive option to grep do what you need? Or does it include files that you want to leave out?#2021-03-0514:44andy.fingerhutI have heard that Emacs packages like projectile and a few others might be able to help you create sets of files to operate upon that might be useful here, but I haven't tried it myself.#2021-03-0514:45andy.fingerhutIf you take the output of the find ... xargs grep command you mentioned, and put it into an Emacs buffer, and then change its mode to whatever the minor/major mode is used for M-x grep output, (maybe compilation-mode? I forget), then it might let you step forward and backward to found lines quickly.#2021-03-0616:30teodorluhttps://clojurians.slack.com/archives/C099W16KZ/p1614955438005200?thread_ts=1614939450.002500&amp;cid=C099W16KZ Would that leave me a complete listing of a subset of files? Running M-x grep left me an option to grep, but I'm not sure how this helps me read a bunch of files linearly in a project.#2021-03-0616:33teodorluhttps://clojurians.slack.com/archives/C099W16KZ/p1614955531005800?thread_ts=1614939450.002500&amp;cid=C099W16KZ I've been thinking something along these lines.
find . -iname '*.go' | orgcat > 
Where orgcat is an Emacs Lisp script that reads file contents, and creates an org-mode file with approperiate #BEGIN_SRC lang blocks for the files.
#2021-03-0616:34teodorlu(I haven't made any attempts to write orgcat yet)#2021-03-0620:47ag@U3X7174KS if you need the output of a command in a buffer, one way could be running shell-command-on-region in a buffer with a prefix basically, create an empty buffer in the project, and run C-u M-| then type your command find . -iname '*.go' | xargs bat the output of the command will be yanked into the buffer#2021-03-0620:50agbut if I understand it right, you're simply trying to have "occur" buffer with the files. Ivy-occur, or helm-occur.#2021-03-0620:53teodorluI might have to read up on occur.#2021-03-0620:53agdepending of what you use, helm-rg or counsel-rg - they both can be called with a prefix#2021-03-0620:53agthat way you can pass any arbitrary command line params to rg (cmd utility)#2021-03-0620:59Phil ShapiroEshell is a shell for emacs that lets you do a lot of interesting things, including redirect the output of a shell command to a buffer. https://www.gnu.org/software/emacs/manual/html_mono/eshell.html#2021-03-0621:02Phil ShapiroBut if you want to process the output of a command like grep, using compile mode might be best. M-x compile RET and replace the default compile command with the thing you want it run. #2021-03-0621:06agivy, and helm are the best for the output of grep, rg, ag, etc. Once you have the occurrences, you can call occur-mode command, i.e. C-c C-o in ivy/counsel buffer#2021-03-0621:10ag#2021-03-0512:26danielnealFor some reason my .dir-locals.el with my cider-clojure-cli-global-options have stopped being picked up#2021-03-0512:26danielnealanyone have any ideas why that might have happened#2021-03-0512:27danielnealatm I'm doing C-u M-x cider-jack-in and typing in the options manually like a caveman#2021-03-0515:24dpsutton@danieleneal there was a version of cider that removed them and then later they were re added. What is the contents of them?#2021-03-0515:33danielneal
((clojure-mode . ((cider-clojure-cli-global-options . "-A:dev:test"))))
#2021-03-0515:33danielnealI'm on cider 1.0.0#2021-03-0515:33danielnealbut if I do describe-variable cider-clojure-cli-global-options its nil#2021-03-0515:50dpsuttonTry (hack-local-variables)#2021-03-0516:00danielnealyeah, that sets it#2021-03-0516:01danielnealhow does that work?#2021-03-0516:05dpsuttonthat just kinda refreshes the dir locals stuff. it's a way to slap the top of emacs like you would slap an appliance to make it work#2021-03-0516:51danielneal😂 😂#2021-03-0516:56danielnealhttps://www.youtube.com/watch?v=tAGlUUAmjxk#2021-03-0517:05grazfatherhahaha that guy is from snatch#2021-03-0616:40teodorluBeginner question. I accidentially made a text buffer readonly, and now I can't write to it 😅 I've found a var called `buffer-read-only`. I tried setting it to nil, but I still can't edit the buffer content. I presume I could just restart Emacs to escape, but I'd prefer to learn. Any advice?#2021-03-0616:42teodorlucontext: i messed around with a buffer. Made it eshell-mode when I wanted emacs-lisp-mode. Then I suddenly coudn't edit stuff. When I try to delete my content, I'm getting a message "Text is read-only".#2021-03-0616:46teodorluI've managed to disable `read-only-mode`, but some text is stuck.#2021-03-0616:49teodorluI'm on DOOM Emacs (`Doom v2.0.9 (HEAD -> develop 01b447a12 2021-03-06 10:36:33 -0500)`)#2021-03-0617:07teodorluI restarted my Emacs server, that removed the problem. Still curious, though.#2021-03-0620:21bobI'm a non-evil Doom user. C-x C-q toggles buffer read-only mode for me.#2021-03-0710:57hindolTip: You can check what modes are currently active by typing SPC h m. There may be some other minor mode (apart from read-only-mode) at play.#2021-03-0711:02hindolYou can also explore what buffer-read-only is by typing SPC h v and then searching for it. SPC h <key> is very useful in general.#2021-03-0711:08hindolP.S. I just redid what you did. I could safely exit eshell-mode by simply switching to emacs-lisp-mode. Changing the major mode also resets all the minor modes (I think).#2021-03-0717:23teodorluThanks!#2021-03-1015:41Illia DankoGood day. Is there any way to prevent vanilla emacs hanging on long cider-repl buffer output? Or maybe there some guide in the Internet how to mitigate the issue? Personally I read that so-long mode (emacs 27.1) should address this issue but I haven't found any differences. Be honest, clojure tends to work with data so huge text output on the cider-repl buffer is common use case, and that's very unfortunate.#2021-03-1015:44ericdalloI think there is cider-interrupt#2021-03-1015:45ennI also didn’t see any difference with so-long. I don’t have a real solution for this, but you can mitigate it a bit with *print-length* and *print-depth* , and by defining print-method on classes that are known to print very large strings. It’s also helpful to bind cider-repl-clear-buffer to an easy key.#2021-03-1015:49Illia Dankoyes, most of the time I found myself using either first or spit output to file and then check this output in other editor, but if I forgot to do this or output was to much, I need to restart emacs, that super annoying.#2021-03-1015:55Illia DankoI just want to know how other people organize their workflow in this regard#2021-03-1015:58ennif it gets wedged sometimes I can use C-c M-o, which I have bound to cider-repl-clear-buffer, and then eventually (maybe after a minute or so) that will clear everything in the buffer and it will become responsive again.#2021-03-1015:58dpsuttondon't need to restart emacs. cider-repl-clear-output (`C-c C-o`) will clear the last repl output and C-u C-c C-o (same command but with a prefix arg) will clear the whole buffer#2021-03-1015:58ennWe have also implemented print-method s for things we know are a problem, like in-memory Datomic databases and our internal state map that gets passed around everywhere.#2021-03-1016:10Illia Dankothank you everyone, checking this#2021-03-1018:37practicalli-john@ilyuha21st Suggest not using the Repl buffer directly. Instead evaluate expressions in the source code buffer, seeing results in line It's much more efficient as you don't need to change namespaces. Evaluation results are truncated so the buffer doesn't slow down Emacs cider-inspect shows the full results of an expression and pages through very large data sets and deeply nested data structures. With the cider-inspect buffer open, it's updated when expressions are evaluated.#2021-03-1219:06bmaddyHere's a puzzler for someone. I need to change this
[datomic.api ...][wrapper.datomic.api ...]
to this
[datomic.api ...]
            [wrapper.datomic.api ...]
in 217 different files. I tried helm-ag-edit, but it didn't let me create newlines. Is there an easy way to do this in emacs?
#2021-03-1509:15dotemacsDon’t know about that package, but if you’re entering a newline try C-q C-j, it should enter a newline. But you can also do this, if you’re just replacing a ][ with ]\n[: M-x replace-regexp RET ][ RET ] C-q C-j[ RET#2021-03-1619:39bmaddyNice, that would have been great for adding the newline. I ended up using sed and then manually indenting each file. Thanks for the suggestion!#2021-03-1219:11mpenetconsult-git-grep + embark occur, then wgrep on the occur buffer#2021-03-1219:15bmaddyI've never heard of these. I'll look into them. Thanks!#2021-03-1219:11lukaszsed? :-)#2021-03-1219:14bmaddyYeah, something like this is my fallback. I was just hoping I wouldn't have to write code for it. I have to learn sed over from scratch every time I use it. 🙂#2021-03-1219:18andy.fingerhutAt least some ways of doing string search and replace in Emacs let you type Ctrl-Q Ctrl-J in the middle of a replacement string to mean a newline#2021-03-1219:18andy.fingerhutwell, anywhere in the replacement string I mean, not just the middle.#2021-03-1219:19andy.fingerhutCtrl-Q being an Emacs 'escape' character prefix kind of thing, and Ctrl-J being the ASCII code for a newline#2021-03-1219:23lukaszI had to write a post-it note with the C-q C-j thing as I never remembered it. @U067Q76EP other (I'd say preferable) approach is to get the cljstyle binary and run it against the whole codebase.#2021-03-1219:31bmaddyI just tried the c-q c-j thing in helm-ag-edit. Sadly, the newline it adds doesn't make it to the actual edit, so the line just gets truncated. Good idea though and I'm really happy to have found that key combo! I've been trying to figure that out for years. 😂#2021-03-1309:45solf@bmaddy There's also https://github.com/clj-commons/rewrite-clj as a non-emacs option#2021-03-1619:30bmaddyThanks for the suggestion. I'd looked into this but it seemed like a lot of work for such a simple edit. I ended up adding the newline with sed and then manually indenting each file.#2021-03-1320:35ag@bmaddy whenever I need to get some tiny in-buffer manipulations with clojure structures I'd use jet, babashka or zprint, e.g.: with <C-u |> - shell-command-on-region:
zprint '{:map {:comma? false :justify? true}}'
straightens up a map, removes commas and aligns things nicely
#2021-03-1619:34bmaddyI ended up adding the newline with sed and then manually indenting each file. Reformatting all of our files would have resulted in too many changes and merge conflicts in this case. I appreciate the suggestion though!#2021-03-1616:15aaelonyreally cool advances happening with libpython-clj (https://github.com/clj-python/libpython-clj) community where you can be working in a Python interactive session and then embed a Clojure process that can access python variables from clojure and vice-versa. Wondering how people are thinking about this in terms of Emacs use? Will people use elpyor Python IDE stuff like here (https://github.com/daviwil/emacs-from-scratch#emacs-ide) or CIDER (https://github.com/clojure-emacs/cider) or both or some combination of components? Curious as to people's thoughts and ideas!#2021-03-1619:17blak3mill3rThat is cool! I would probably always write clojure and use libpython-clj from emacs+cider... however copy/pasting python example code into the interactive python session and then accessing those from Clojure definitely sounds handy.#2021-03-1616:26aaelonyI guess this begs the question for cljs as well?#2021-03-1616:29ericdallo#2021-03-1821:12ribelono one encountered an identation problem after upgrading to the latest version of doom & emacs/native-comp?#2021-03-1904:32hindolI faced it yesterday. Some lines will not indent at all. I thought it's an issue with Lispy mode but not sure. Have you figured out why it is happening?#2021-03-1910:38ribelohttps://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode.el#L1498#2021-03-1910:39ribeloI'm far from an elisp hacker#2021-03-1910:39ribelobut after removing (,method) everything works#2021-03-1910:40ribelowithout this method "resets" and becomes nil#2021-03-1910:40ribeloI have no idea and I don't understand why#2021-03-1910:56ribelohttps://github.com/clojure-emacs/clojure-mode/issues/587#2021-03-1917:38hindolInteresting. I am also on the pure GTK native comp branch of emacs.#2021-03-2011:38ribelounfortunately this "patch" does not fix everything ;(#2021-03-2217:57hindolThe correct patch is here: https://github.com/clojure-emacs/clojure-mode/pull/585/files#2021-03-1915:30grazfatherMan I switched from spacemacs to doom and it’s so much better for me#2021-03-1915:32localshredsame same, did that last year and definitely enjoying it more#2021-03-1915:32grazfatheryep, simpler and faster plus a few more#2021-03-1915:32grazfather‘sane’ (to me) defaults#2021-03-1915:33localshredthere's also a #doom-emacs channel#2021-03-1915:40grazfatheroh, you’re right, I am even in there, I just didn’t have it starred. Ty!#2021-03-2120:40agilecreativityI am trying to prevent the comment in Clojure code that starts with single ; to be align to the right. Is there a way to customize this in Emacs? e.g. I would love to get the same result when commenting the Clojure/Lisp code ;; and ;#2021-03-2201:36vemvthere isn't a way (without major hacking) although there's some desire from the clojure-emacs people to implement it As of today, IMO the right approach is to avoid ;. Under Lisp/emacs tradition ; has a very specific meaning, but 99% of Clojure developers don't know about it, or decide to disregard it. So it is counterproductive to use it, given that emacs will apply assumptions that don't match our reality.#2021-03-2209:09dotemacsThere was this discussion about this a while back: https://github.com/clojure-emacs/clojure-mode/issues/516#2021-03-2209:30practicalli-john;; is the recommended line comment for Clojure, please consider using this style. Clojure aware editors typically have a key binding that comments using this style (or are easily configured to do so)#2021-03-2214:40grazfatherI was wondering why my editor kept changing my comments to two ;#2021-03-2215:33cgoreAs someone who came from Common Lisp, I'd instead rather implement the Emacs behavior in IntelliJ 😄#2021-03-2215:33cgoreSo people comment correctly.#2021-03-2218:23practicalli-johnCursive can be configured to use ;; for comments#2021-03-2305:36ag> is the recommended line comment for Clojure There are line comments and "end of line comments". They are not the same thing. This SO post illustrates the difference perfectly: https://stackoverflow.com/a/8825101/116395#2021-03-2313:59cgoreAlso:
;;; Let's talk about this block of code below ...
(some-code 
   doing-things
   ...)
And also:
;;;; Big huge section commentary, like a file header or something
#2021-03-2314:30agFor the "Big huge section commentary, like a file header or something", there's M-x comment-box#2021-03-2316:35cgoreHow do you make IntelliJ do that anyway? Asking for a friend who for some reason doesn't use Emacs 🙂#2021-03-2317:26practicalli-john@U06DP0SAV In the IntelliJ settings: Editor-&gt;General-&gt;Smart Keys-&gt;Clojure-&gt;Use ;; for line comments#2021-03-2322:33agilecreativityI always use ;; for my parts, but when I have to contribute to some project and they are using the ; then my Emacs always pushed it to the right and I hate to introduce these changes when possible.#2021-03-2400:34cgoreI view it as a teaching moment troll#2021-03-2400:34cgore(Actually sadly no, I just silently tweak the comment blocks in my PR.)#2021-04-0711:11Ben Sless@U45T93RA6 can you shed some light on the special meaning attached to ; ? Is there anything to it besides margin comment?#2021-04-0717:03vemvAside from https://github.com/bbatsov/clojure-style-guide/tree/d096eaadf63a7899cda1e5051597a99f1d51b10f#comments I'd add the observation (not hinted in that link?) that margin comments can span multiple lines. I'd say Emacs is optimized for multi-line margin comments, which is why a single-line margin comment can be auto-aligned in an odd-looking position (which in the context of a multi-line comment, would be less odd) Another good read: https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html#2021-04-0718:18cgoreWhat that Emacs link says matches my memory from Common Lisp.#2021-04-0718:19cgoreI think that must have been a convention in Lisp for quite a few decades, no idea how long.#2021-03-2216:29teodorluHey! Do you have a nice workflow for cleaning up local branches? Care to share? I'd love something like dired's ddddddxy, but from what I can see, Magit doesn't provide a buffer-of-branches that works like this.#2021-03-2217:52agI don't do that very often; that's why I never bothered about automating this. Basically, I would turn off the read-only mode, copy the names of the branches, paste in a scratch buffer, join the lines, then go back to Magit buffer and press ! ! then run git -D branch-1 branch-2 ... branch-n#2021-03-2221:06hindolIs this similar to what you want? https://emacs.stackexchange.com/a/19013#2021-03-2306:45teodorlu@UJRDALZA5 yup, that would solve my problem! Though I'm using Ivy, and would prefer not dragging in Helm for a Magit mode.#2021-03-2306:50hindolI just tried it. Works without Helm. Not sure why Helm is mentioned. For me, the delete key was x and not k as mentioned.#2021-03-2308:51teodorluHuh, interesting. Thanks for investigating!#2021-03-2316:52bozhidarThere's also https://emacsredux.com/blog/2021/03/23/deleting-git-branches-with-magit/#2021-03-2316:52bozhidar😉#2021-03-2318:18teodorluGreat timing, @U051BLM8F! 😄#2021-03-2318:23teodorluThe DOOM Emacs configuration for Magit seems to be using y for yanking stuff, not opening a branch list.#2021-03-2318:25teodorluThe branch "dispatch ground" doesn't seem to list a way for me to do this either. Guess I should learn how to open packages with unconfigured key bindings.#2021-03-2318:33teodorluFor DOOM users:
M-x magit-dispatch y C-v jjj x
This does: 1. Bring up the "other" dispatch menu, that you perhaps didn't know you have (I didn't) 2. y to list refs 3. start visual mode and select 4. Press x to delete selected.
#2021-03-2319:17hindolThis is what is suggested in the StackExchange thread also. The answer is by none other than https://github.com/tarsius. You are right about y being bound to yank. But I can just type ? in the Magit buffer which is bound to magit-dispatch (in Doom).#2021-03-2321:26teodorlu> But I can just type `?` in the Magit buffer which is bound to `magit-dispatch` (in Doom) Ah, thanks. I thought that was the "help menu", I wasn't aware that the key bindings were different from the key bindings in M-x magit-status. Learn something new every day!#2021-03-2400:24solfAnyone with a apple M1 computer here? What emacs do you use? I've tried compiling from source, but it segfaults. I've also downloaded a x86 binary which works okay (kinda slow though), except for magit that takes like 3 seconds for any action.#2021-03-2400:45andy.fingerhutI do not have an M1-based Mac, but this web site seems more likely to do a good job for Mac builds of Emacs than some others: https://emacsformacosx.com/#2021-03-2400:46andy.fingerhutYou may also want to try MacPorts or Homebrew -- again I do not have an M1-based Mac, so don't know how well those tools support M1's yet, but lots of devs enhancing the build scripts for those things are likely to be early M1 adopters.#2021-03-2400:49solfThe one I have is from that website, I don't know why magit is so slow. Supposedly, that issue was fixed on osx. Macports segfaults during compile for me. As for homebrew... I tried installing from that yesterday, but it failed telling me bad CPU. I later learned that it's because I need to manually install rosetta 2 (x86 emulator), so I think I'll try homebrew again#2021-03-2400:50solfAll in all, this macbook air is kinda cool, but definitely some rough edges to replicate my clojure dev environment#2021-03-2400:50andy.fingerhutSorry, bad guesses on my part, sounds like. I am waiting until M1's are out in a bigger screen and memory footprint before I shell out for one, and as a side benefit other devs will hopefully have smoothed things out for me by then 🙂#2021-03-2400:51solfahah yeah#2021-03-2400:53solfI'm also waiting for a bigger screen and ram. Which is why I took a cheap refurbished air model. From what I've seen, macs retain a lot of resell value, so I hope I'll be able to switch without breaking the wallet. Specially if I resell if after coming back to europe (I'm in singapore right now). Macs there seem a good 30% more expensive#2021-03-2401:27ACI use gnu emacs-27 branch + Mitsuharu Yamamoto’s patches. I had to recently downgrade my version of autoconf to 2.69 because 2.71 caused a sigkill.#2021-03-2401:28ACI don’t know why yet, but 2.7x has some big changes and rewrites some of the build files. no issues building with 2.71 on my intel macs.#2021-03-2403:18solfooh thanks, maybe the autoconf was my issue too#2021-03-2422:25LuHello! This one is for the clojure-lsp users. I am running lsp-rename and after writing the new symbol and hitting enter nothing is renamed and I see no error in the messages buffer.. Any idea? Other lsp commands work just fine so not sure what the problem might be#2021-03-2422:26ericdalloCheck cloure-lsp logs#2021-03-2422:26ericdallohere you have more info where to find it: https://clojure-lsp.github.io/clojure-lsp/troubleshooting/#2021-03-2422:27LuThanks#2021-03-2422:34Lummm nothing useful I’d say
2021-03-24T22:33:39.628Z  DEBUG [clojure-lsp.main:?] - :hover 14ms
2021-03-24T22:33:39.631Z  DEBUG [clojure-lsp.main:?] - :codeAction 18ms
2021-03-24T22:33:43.670Z  DEBUG [clojure-lsp.main:?] - :rename 4ms
#2021-03-2422:34Luit just ends with a rename#2021-03-2422:35ericdallowhat is your clojure-lsp --version?#2021-03-2422:36ericdallocheck emacs clojure-lsp stderr buffer as well#2021-03-2422:36LuI literally just got it so
clojure-lsp 2021.03.21-23.29.19
clj-kondo 2021.03.04-SNAPSHOT
#2021-03-2422:38Luemacs msg and stderr buffers say pretty much nothing.. I wonder If the feature might be conflicting with something else I use#2021-03-2422:39ericdalloI don't know any emacs feature that could conflict with that#2021-03-2422:39ericdalloit could be a lsp-mode issue, to make sure, we need to check client<->server json request/response#2021-03-2422:40ericdallocheck lsp-log-io section: https://emacs-lsp.github.io/lsp-mode/page/troubleshooting/#2021-03-2422:41Luhold on I tried in a shadow-cljs project and it worked#2021-03-2422:41Luto test that I was initially using a fresh lein project.#2021-03-2422:42ericdalloyeah, minimal repros always help to find the issue#2021-03-2422:51LuOk I think I figured it out.. when renaming the project dir I needed to kill and reopen all buffers for clojure-lsp to work properly.. I was getting errors like db being nil or server couldn’t start#2021-03-2422:52ericdalloHum, probably some kind of out of sync with lsp-mode#2021-03-2422:52ericdalloin those cases, lsp-workspace-restart should fix#2021-03-2422:53Luon dir rename I got again the prompt to point to the new project root but maybe something goes wrong.. anyways thanks for getting back so quickly .. it’s really not a common scenario tbh#2021-03-2422:53Luoh I see haven’t tried that command#2021-03-2422:54ericdalloglad it works now 🙂#2021-03-2517:16ericdalloemacs 27.2 released: https://www.gnu.org/software/emacs/#2021-03-2911:29sogaiu
** Emacs now builds with dynamic module support by default.
Pass '--without-modules' to 'configure' to disable dynamic module support.
iiuc, this means that emacs-tree-sitter will be easier to setup
#2021-03-2614:55teodorluHello! Another newbie Emacs Lisp question. I'm trying to launch an external program from Emacs. I found async-shell-command, which seems to be doing what I want. But I just want my app launched, I don't want to see any more buffers. From the docstring, I think that should be possible. I've managed to evaluate display-buffer-alist, and got a lot of values. Do I need to imperatively change this in-place in order to do what I want? Or is there an equivalent to Clojure's binding? Or can I just pass in an argument and I've misread the docs? Any advice is appreciated! > You can configure `async-shell-command-buffer' to specify what to do > when the `*Async Shell Command*' buffer is already taken by another > running shell command. To run COMMAND without displaying the output > in a window you can configure `display-buffer-alist' to use the action > display-buffer-no-window' for the buffer *Async Shell Command*'.#2021-03-2615:01teodorluI've got this now:
(defun teod/shell ()
  (interactive)
  (async-shell-command "th-terminal"))
, but when I run it, I'm getting an empty *Async Shell Command* buffer that I'd like to avoid.
#2021-03-2615:08hindolDo you want Emacs to control the lifecycle of the external process or do you just want a fire and forget process?#2021-03-2615:08teodorlufire and forget please.#2021-03-2615:12hindolI mean, should the process shutdown when emacs is stopped?#2021-03-2615:15hindolIf you want your process to live beyond Emacs, it may be simpler to start it outside Emacs.#2021-03-2615:15Phil ShapiroI think start-process is what you want.
(start-process "test" "ls" nil)
#2021-03-2615:15Phil Shapirohttps://www.gnu.org/savannah-checkouts/gnu/emacs/manual/html_node/elisp/Asynchronous-Processes.html#2021-03-2615:19Phil ShapiroIf you don’t want it to close when emacs exits, nohup might work.#2021-03-2615:21hindolcall-process if you want to completely detach. https://www.emacswiki.org/emacs/ExecuteExternalCommand#2021-03-2615:36teodorluJust want to say that I really appreciate the pointers, digging through docs and trying things out now :thumbsup:#2021-03-2615:39teodorlu
(start-process "RUN" "RUN" "nohup" "th-terminal")
Seems promising. Trying to understand how to use call-process now.
#2021-03-2615:39hindolI am no Elisp programmer myself, but I like to dig around when I see an interesting question. Thanks to you, I am also learning new things, 🙂#2021-03-2615:44hindolWith display-buffer-alist, you can hide (or control other aspects of) any buffers matching a specific RegEx. You can append to the alist your own RegEx and configs. alist is kind of like a hash map. This is one key-value pair for example,
("^\\*Command Line"
  (+popup-buffer)
  (actions)
  (side . bottom)
  (size . 8)
  (window-width . 40)
  (window-height . 0.16)
  (slot)
  (vslot)
  (window-parameters
   (ttl . 5)
   (quit . t)
   (select . ignore)
   (modeline)
   (autosave)))
And the configs will apply to any buffer names matching the "^\\*Command Line" RegEx.
#2021-03-2616:02teodorluAlso seems to do what I want without going through nohup:
(call-process "th-terminal" nil 0)
#2021-03-3115:08dpsuttonmy emacs fu is drawing a blank. is there a proper way to combine parts of a path into a single path? ie (f "project" ".shadow-cljs" "socket-repl.port") will return the path to project/.shadow-cljs/socket-repl.port using proper separator, etc?#2021-03-3115:16nivekuil(string-join '("a" "b" "c") "/")#2021-03-3115:28dpsuttonyeah that works on unix-y type things#2021-03-3115:29Phil ShapiroIf you’re wondering how emacs knows what the path separator character is, I think it hardcodes it to /. I haven’t run emacs on windows in a while but I seem to recall there’s cygwin APIs to munge paths back & forth.#2021-03-3115:29dpsuttoni think the proper way is (concat (file-name-as-directory ...))#2021-03-3115:30nivekuiloh, misread your q. I've used f.el before, it has f-join#2021-03-3115:31Eamonn SullivanI use expand-file-name a lot: (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) Something like that, maybe?#2021-03-3115:35dpsuttonyeah that's what i ended up using at the top level#2021-03-3115:35dpsutton(expand-file-name "socket-repl.port" (file-name-as-directory (concat (file-name-as-directory proj-dir) ".shadow-cljs")))#2021-03-3115:35dpsuttonbut it requries a well formed directory at the end and only one.#2021-03-3115:36dpsuttonbut it took me a bit to get there. thanks everyone#2021-04-0707:32hindolHi, anyone know how to verify all elements of a sequence/list is a string in Emacs lisp? I need it here: https://github.com/clojure-emacs/cider/issues/3000#2021-04-0709:18hindolIgnore. Issue already fixed upstream.#2021-04-0713:51grazfatherI never understood why people would fix the issue without at least a comment in the issue thanking you 😕#2021-04-0714:02hindolMaybe it was known to him already? I don't know and I don't mind, 🙂#2021-04-0720:46bozhidarIf I had to guess - because they are very busy. 😉#2021-04-0717:33lukaszI have a not Clojure related question, but it's been bugging me for a while now: I use use-package to manage everything, one of core pieces of my setup is of course Projectile. What's bugging me is that Projectile's keyboard map is not working until I manually invoke one of its functions via M-x (like projectile-find-file) - once that happens, then I can use C-c p f to do the same. Is there any solution to this? (My Google-fu failed me so far)#2021-04-0720:48bozhidarHere's how the author of Projectile does it https://github.com/bbatsov/emacs.d/blob/master/init.el#L307 He's not an expert in use-package, though, so there might be a better approach. 🙂#2021-04-0720:50lukaszThanks @U051BLM8F - great to hear from the author ;-)#2021-04-0717:36dpsuttoni think use-package is lazy loading things. if you want that loaded on startup you can add :demand t i think?#2021-04-0718:24lukaszDidn't work unfortunately, for now I just call project-version in my init.el ¯\(ツ)/¯#2021-04-0717:37Phil ShapiroI’m not familiar with use-package. I use require, and I haven’t had this problem using it.#2021-04-0718:21dakraHaving everything lazy loaded until you need it is actually nice as you don't pay the startup price if you don't need the functionallity. For use-package and projectile I use :bind-keymap in my config (https://github.com/dakra/dmacs/blob/master/init.org#projectile)#2021-04-0720:50bozhidarI never had an issue with require myself, as I don't start Emacs often and I don't care if I load everything eagerly. That being said - I like that use-package forces you to structure your config. It's not like you can't do it without it, but you don't have such a strong incentive to do so. 🙂#2021-04-0800:51blak3mill3rI use use-package and :demand t for every single package, and then use CRIU to reduce the startup time to almost nothing with all the elisp eagerly loaded#2021-04-0800:52blak3mill3rhttps://gitlab.com/blak3mill3r/emacs-ludicrous-speed for the curious I absolutely LOVE this setup#2021-04-0800:54blak3mill3rI start emacs quite frequently (because I like having a separate instance of emacs for each project) so I care about startup time a lot, and having all the elisp eagerly loaded is a nice little performance boost#2021-04-0820:46jjttjjI have a chromebook with "Linux Development Environment" setup and emacs and clojure CLI installed and both work independently. But when I try to start a repl with inf-clojure I get
Couldn't find 'java'. Please set JAVA_HOME.
Process inf-clojure exited abnormally with code 1
even though JAVA_HOME is in fact set. (Using sdkmon directory) echo $JAVA_HOME works correcly in the emacs shell and eshell, however the java command only works in shell and not eshell. Any tips to figure this out?
#2021-04-0820:49lukaszI have these in my init.el - https://github.com/lukaszkorecki/command-center/blob/master/init.el#L17-L25 fixed the issue for me, for both ansi-term and eshell#2021-04-0820:49jjttjjAlso, I have (setenv "JAVA_HOME" "/home/me/.sdkman/candidates/java/current/bin/java") in my init.el#2021-04-0820:49dpsuttonno idea. inf-clojure works best with socket repls though so it might be easier to just clj -M:socket where socket has a socket repl option and then inf-clojure-connect to that port. that's what i've been doing. I don't actually know the specifics of what needs to be set to start up java#2021-04-0820:50dpsuttonprobably (add-to-list 'exec-path "/home/me/.sdkman/candidates/java/current/bin")#2021-04-0820:53dpsuttoni have "/Users/dan/.sdkman/candidates/java/current/bin/" on my exec-path. i didn't do anything special to get it there though besides using
(use-package exec-path-from-shell
    :demand t
    :init
    (exec-path-from-shell-initialize))
#2021-04-0821:10jjttjjThanks @dpsutton and @lukaszkorecki it's working now. I believe I needed to both add the java dir to the exec path, use the exec-path-from-shell-initialize, and (setenv "PATH" (concat (getenv "PATH")... but it's working now#2021-04-0821:11dpsuttonare you sure you need it with (setenv "PATH" ...)?#2021-04-0821:11dpsuttoni would expect the other two to fix it all up. my experience is only using exec-path-from-shell-initialize#2021-04-0821:21jjttjjYeah, can confirm I need that line#2021-04-0908:55yuhanDoes anyone know a structural editing package that treats pairs in a map / let binding as a single unit? I just had a look at Calva and was impressed to see its implementation of paredit handle this nicely: https://calva.io/paredit/#drag-bindings-forwardbackward#2021-04-1305:21bozhidarPretty cool, indeed! Outside of a generic solution, I assume it won’t be very hard to do this in clojure-mode.#2021-04-0908:57yuhanie. I never realised how much I needed these commands, always resorting to textual editing when dealing with pairs#2021-04-0909:35blak3mill3rI saw something like that in emacs, quite some time ago... I'm struggling to recall the name of it#2021-04-0909:35blak3mill3rI wanted to use it, tried it, and couldn't get it to work... there was a youtube video#2021-04-0914:40hkjelsit just worked for emacs-lisp, but for Clojure it seems to be broken#2021-04-0914:48hkjelsAhh. It was just missing implicit functions and structures for Clojurescript#2021-04-0914:48hkjelscopying the one for Clojure works fine#2021-04-0914:49hkjelsyay! Thanks for the tip#2021-04-0909:36blak3mill3rI'll try to track it down#2021-04-0909:37blak3mill3rbada boom https://www.youtube.com/watch?v=vI1l-oC7HvI#2021-04-0909:37blak3mill3rhttps://github.com/promethial/paxedit#2021-04-0909:37blak3mill3r@qythium#2021-04-0910:33yuhanNice! I've got to check that out (and see if I can hook into it from lispyville-drag instead of relearning another system 😛)#2021-04-0914:02pezI was lacking this quite badly in some cond-> forms today. 😃#2021-04-0914:16jjttjjIs there a way to interactively change a font face and browse the different options while seeing what they look like? I'm looking to change the clojure-keyword-font-face#2021-04-0914:16jjttjjcustomize-group just gives me a text field for the font face to use#2021-04-0914:26yuhanI use Ivy which provides M-x counsel-faces#2021-04-0914:29yuhanit gives an interactive completion list showing what they all look like, and forwards to describe-face when you select any one#2021-04-0914:37jjttjjcool, thanks!#2021-04-0914:43practicalli-johnspacemacs/helm-faces for the same kind of thing with helm and Spacemacs#2021-04-0915:00hkjels
(use-package paxedit
  :commands (paxedit-mode)
  :hook (paredit-mode . paxedit-mode)
  :bind (:map paxedit-mode-map
              ("M-<right>" . paxedit-transpose-forward)
              ("M-<left>" . paxedit-transpose-backward))
  :config
  (let ((paxedit-implicit-clojure '(paxedit-implicit-functions-clojure
                                    paxedit-implicit-structures-clojure)))
    (add-to-list 'paxedit-assoc `(clojurescript-mode . ,paxedit-implicit-clojure))
    (add-to-list 'paxedit-assoc `(clojurec-mode . ,paxedit-implicit-clojure))))
For those who wants to try paxedit mentioned above
#2021-04-0915:02hkjelsIt worked just fine with Clojure, but I thought it didn’t because I was in clojurescript context when I tried it#2021-04-0915:07hkjelsapparently there’s a PR from a year ago to fix it#2021-04-1305:19bozhidarHmm, the 3 modes are essentially the same (clojure, clojurescript, clojurec), so in general if you setup something for clojure-mode it should work for everything. Of course, this was depends on how exactly paxedit has been implemented.#2021-04-1305:23bozhidarIt’s interesting that paxedit has been mostly dormant for 4 years, and yet it has only 1 open issue.#2021-04-1310:10danielnealNice work on fixing the http debugging issue!#2021-04-1313:45dpsuttonlsp-execute-code-action is apparently bound to s-l a a. I don't recognize that keybinding. my best guess is super-l a a, but on a mac that doesn't seem to trigger it, although i believe the cmd key is remapped to meta. does anyone recognize that offhand?#2021-04-1313:51ericdallohttps://emacs-lsp.github.io/lsp-mode/page/keybindings/#keybindings#2021-04-1313:51ericdalloyou can change it with lsp-keymap-prefix#2021-04-1313:52ericdallofor doom-emacs the prefix is SPC c l for example#2021-04-1317:48jcsimsfor me on macos, s-l is Cmd-l#2021-04-1317:48jcsimsusing the homebrew emacs-plus recipe#2021-04-1314:24Eamonn SullivanOn Ubuntu, s-l locks the screen, instantly, and is never seen by Emacs. I've never successfully used lsp-keymap-prefix. I set it in my config, but it's just ignored, so maybe I'm not doing right: (setq lsp-keymap-prefix "C-c C-l") -- I've tried that with various keys, in either the :init or :config sections of use-package lsp-mode, etc. All ignored. M-x lsp-... come up with "s-l ..." as the keybindings. What am I doing wrong? (I've also tried changing the mapping for the super key in Gnome with the same level off success...)#2021-04-1314:25Eamonn SullivanWhat I do instead (and it's a poor workaround) is to create a hydra menu of lsp functions bound to C-c l, but that is always limited to what I happen to know about...#2021-04-1314:27dpsuttonyeah i made my own hydra as well. i think the s-l is space l and only makes sense when you have modal editing. not often do you see packages where the default keybindings are geared for evil#2021-04-1314:28Eamonn SullivanI thought it was "Super", as in the Windows key.#2021-04-1314:28dpsuttoni did too. but i think that may be incorrect#2021-04-1314:28dpsuttonnot sure#2021-04-1314:29andy.fingerhutI personally think that any Emacs packages that expect any key modifiers other than Shift, Control, and Meta to be something the user figures out how to use is expecting expert level knowledge. Even figuring out Meta on multiple machines (e.g. your host OS and inside a Linux VM) can be a challenge.#2021-04-1314:32yuhanlowercase s is definitely Super, but I've never seen other packages bind it by default#2021-04-1314:32yuhanhttps://emacsredux.com/blog/2020/12/11/super-keybindings-for-magit/#2021-04-1314:33yuhan@eamonn.sullivan Looking at the lsp-mode source:
(defvar lsp-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map (kbd "C-<down-mouse-1>") #'lsp-find-definition-mouse)
    (define-key map (kbd "C-<mouse-1>") #'ignore)
    (define-key map (kbd "<mouse-3>") #'lsp-mouse-click)
    (define-key map (kbd "C-S-SPC") #'lsp-signature-activate)
    (when lsp-keymap-prefix
      (define-key map (kbd lsp-keymap-prefix) lsp-command-map))
    map)
  "Keymap for `lsp-mode'.")
So it may be that you set the prefix too late, after this map has already been defined
#2021-04-1314:34yuhanWorkaround is to just bind it manually (define-key lsp-mode-map (kbd "C-c l") lsp-command-map)#2021-04-1314:53Eamonn Sullivan@qythium, thank you! That worked, finally. I had to define-key it outside of (and after) the (use-package ...) declaration. That was harder than it probably should be...#2021-04-1314:56dpsuttoni just did this and it worked for me
(use-package lsp-mode
    :ensure t
    :hook ((clojure-mode . lsp)
           (clojurec-mode . lsp)
           (clojurescript-mode . lsp))
    :init
    (setq lsp-keymap-prefix "C-M-l")
    :config
    (setq lsp-enable-indentation nil)
    (setq lsp-enable-file-watchers nil) ;; annoying and i can't specify paths
    ;; add paths to your local installation of project mgmt tools, like lein
    (dolist (m '(clojure-mode
                 clojurec-mode
                 clojurescript-mode
                 clojurex-mode))
       (add-to-list 'lsp-language-id-configuration `(,m . "clojure"))))
#2021-04-1314:56dpsuttonhaving it in init is sufficient for me#2021-04-1315:01Eamonn SullivanMight be something to do with straight.el, but setting it init like that definitely doesn't work for me. Odd.#2021-04-1315:07Eamonn SullivanSeems to be a common issue that people run into, though: https://github.com/emacs-lsp/lsp-mode/issues/1672. The define-key thing is recommended here, but I still don't understand why ☝️ works for you, but not me.#2021-04-1315:25yuhanProbably straight.el is loading the package before use-package does? I recall there were some strange interactions if you use both managers together#2021-04-1319:05viestiTrying out clojure-lsp and was wondering why it complained about watching too many files (over 1000). Ignoring .clj-kondo and .shadow-cljs directories (via lsp-file-watch-ignored-directories ) seemed to help.#2021-04-1319:06ericdallothe .clj-kondo dir is already ignored by default on lsp-mode, I'll add the shadow-cljs as well#2021-04-1319:07dpsuttonthe lsp-mode watches all files under the project root. with cljs projects this can get enormous with vendored projects, npm_bundle directory, cljs compilation output, etc#2021-04-1319:08ericdallo@U11BV7MTK Do you known common dirs to be excluded for cljs projects? then I can add to default ignore list of lsp-mode#2021-04-1319:08dpsuttonhonestly i think the correct answer is a way to specify directories to watch#2021-04-1319:08dpsuttonotherwise it'll always be a game of whack-a-mole
#2021-04-1319:08ericdalloyeah, it makes sense#2021-04-1319:09dpsuttonwatch-directories: src, shared-src or whatever#2021-04-1319:09dpsuttonattempt was made here: https://github.com/emacs-lsp/lsp-mode/pull/1829#2021-04-1319:12ericdalloLGTM the idea, why it was closed?#2021-04-1319:13dpsuttoni closed it when i noticed it had been a year#2021-04-1319:13dpsuttoni didn't know how multi-projects impacted it and i switched jobs and ended up not using lsp for a bit. i've finally readded it and just turned off the watchers#2021-04-1319:13ericdalloAlright, I'll bring that issue again and try to understand if we can make it happen#2021-04-1319:14dpsuttoni think someone mentioned that lsp servers can be configured to report what they are watching. this might be an alternative#2021-04-1319:14dpsuttoni don't remember the details of it though#2021-04-1319:17ericdalloclojure-lsp don't handle that, it should be configured on lsp-mode ATM, meanwhile, what are the common dirs for cljs libs?#2021-04-1319:17ericdallowhy that wouldn't work for you?#2021-04-1319:18dpsuttonwhat do you mean common dirs for cljs libs?#2021-04-1319:18dpsuttonlike classpath roots?#2021-04-1319:18ericdallono, like folders we don't want to filewatchers, like .clj-kondo .shadow-cljs#2021-04-1319:19ericdallois there any more common lib folders from famous cljs frameworks you remember?#2021-04-1319:19dpsuttonnode_modules for sure. anywhere there could be cljs output, and that is an arbitrary property to the cljs compiler. anywhere there could be vendored js, anywhere you might have lots of translations files (again arbitrary)#2021-04-1319:20dpsuttoni think your question is how could we create a blacklist of random files that aren't clojure source files and i don't think that there's any good answer to that question#2021-04-1319:20ericdallonode_modules is already excluded: https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L318#2021-04-1319:21ericdallo> anywhere there could be vendored js, anywhere you might have lots of translations files (again arbitrary) I agree, but we can reduce that adding those known folders, is not easy to have more than 10000 compiled js/otherfiles#2021-04-1319:23dpsuttonlooking at just the top level of our project, i see .babel_cache, docs, locales, resources, and target as dirs that have lots of files that shouldn't be watched#2021-04-1319:24ericdallonice, target is excluded already, I think we can add .babel_cache along with .shadow-cljs#2021-04-1405:56viestiah, think I updated lsp-mode, but maybe was on an older version, which didn't have .clj-kondo for ignore#2021-04-1405:57viestiI wondered where the files came from, then scripted some stats:
for d in `find . -maxdepth 1 -type d | sort`; do echo $d; find $d | wc -l; done
#2021-04-1405:57viestimaybe could even include a script like that in the lsp-mode docs to help people uncover hidden black holes of stuff in project directory 😄#2021-04-1412:27ericdalloYeah, you are the second person to ask for the same thing this week, I'll try to improve lsp-mode log to log the folders scanned into lsp-log buffer#2021-04-1412:55ericdallo@U06QSF3BK https://github.com/emacs-lsp/lsp-mode/pull/2779#2021-04-1412:56viestinice, thank you! 🙂#2021-04-1412:59viestiI also went to lsp logs to get to that watch info, then checking project directories and adding filters to lsp-mode configuration, until I got below the default 1000 file limit warning. This logging will be helpful in the future I think 🙂#2021-04-1413:00ericdalloyeah, also I added .shadow-cljs, babel cache folders to default ignore list#2021-04-1413:03viestiNice! Better defaults make people trip less 🙂 (takes a bit of time to get good defaults, in a case like this)#2021-04-1417:00ericdalloMerged @U06QSF3BK#2021-04-1506:08viestiThank you! I had tried clojure-lsp in Emacs a couple of times, might have been other reasons earlier that I gave up, but got a hang of that dir watch this time and then it just occurred to me that might even post that observation to Clojurians Slack. I guess it was just good timing that things end up as improvement into lsp-mode, this make me happy 🙂#2021-04-1512:27ericdalloGlad to hear it :)#2021-04-1416:58eggsyntaxMostly in the interest of getting it into the clojurians slack archives: I prefer to have word motions in Clojure buffers treat hyphens/dashes as part of a word. For a while Timothy Pratley's solution (https://timothypratley.blogspot.com/2014/08/clojure-friendly-word-definitions-in.html) did that for me, but starting in emacs 25 that stopped working (as described at https://github.com/emacs-evil/evil/issues/565). I've been living with it for a long time, but finally found a solution. It turned out that subword-mode wasn't handling this properly, and for some reason was always on in my Clojure buffers. So in addition to using Timothy's solution,
(dolist (c (string-to-list ":_-?!#*"))
  (modify-syntax-entry c "w" emacs-lisp-mode-syntax-table))
I also added a hook to disable subword-mode in clj/s buffers:
(add-hook 'clojure-mode-hook       (lambda () (global-subword-mode -1)))
I'm not especially skilled with emacs lisp, so if anyone has a cleaner solution I'd love to hear it.
#2021-04-1417:36Steven KatzHi, im new to emacs…cider seems to be starting in a window at the bottom of emacs, it used to start to the right…any idea what changed and how I can change it back?#2021-04-1417:53grazfatherTry in #cider maybe#2021-04-1418:42Steven Katzwill do#2021-04-1421:27Linus EricssonI used projectile to full-text-search filenames, which very, very convenient. A month or so ago it suddenly stopped working (after som upgrade or something). What do you use to like C-x f <write part of file name> enter to open it in emacs?#2021-04-1421:37Rolfe PowerI use (selectrum)[https://github.com/raxod502/selectrum] to do the incremental search for files. However, I do use projectile with consult to do project file searching.#2021-04-1423:55blak3mill3rcounsel-find-file I like, it does fuzzy matching of file names and is quite fast#2021-04-1423:56blak3mill3ralthough I might have to take a look at selectrum now 🙂#2021-04-1519:42hipster coderI keep my tools under version control... and do incremental changes... I can run git bisect to find when a commit introduced a bug#2021-04-1519:43hipster coderthat's one of the big advantages of text based tools like Vim, Emacs... opposed to compiling VS Code#2021-04-1523:22aptthere’s the built-in project-find-file in Emacs 27.2 as well#2021-04-1607:58bozhidarLinus what exactly stopped working in Projectile? There were definitely no material changes to the core functionality in a very long time. (I’m Projectile’s author)#2021-04-1607:59bozhidarFor the record - these days I’m a selectrum user myself, having used before this ido and ivy.#2021-04-1608:00bozhidarI did remove ido as the default for Projectile which may have surprised a few people, as now if you don’t have any minibuffer completion package enabled you’ll have to press tab for the completion candidates.#2021-04-1608:01bozhidarSee https://docs.projectile.mx/projectile/configuration.html#completion-options for more details.#2021-04-1520:42hipster coderany suggesitons for the best code-snippets plugin?#2021-04-1602:10practicalli-johnYasnippets#2021-04-1616:11ericdalloIf you use clojure-lsp, check latest release: https://clojure-lsp.github.io/clojure-lsp/features/#snippets#2021-04-1620:07hipster coderI will try both... LSP looks awesome. Snippets and more.#2021-04-1615:56escherize@nathantech2005 I have a few abominations like this:
(defun fib! ()
      (interactive)
      (insert
       "(take 20 (map first (iterate (fn [[a b]] [b (+ a b)]) [0 1])))"))
#2021-04-1616:05vemvhaha, how come that you have a snippet just for fibonacci? it's not a very usual need#2021-04-1620:20hipster coderhmm... maybe he does a lot of interviews. And shows them that. Emacs users should go to the top of the pile :)#2021-04-1615:56escherizethen, M-x fib! inserts that text.#2021-04-1910:37bartukahow can I fix this display issue in *cider-error* buffer?
Unhandled clojure.lang.ExceptionInfo
   [38;5;32m-- [0m[38;5;45mRouter creation failed
   [0m[38;5;32m----------------------------------
   [0m[38;5;45mNO_SOURCE_FILE:6[0m [38;5;32m--[0m
   
   [38;5;253mRouter contains conflicting route paths:[0m
I think ansi colors are not properly parsed
#2021-04-1910:37bartukathere is a way to fix it or at least ignore ansi and consider only text?#2021-04-1914:18ericdalloI'm having the same issue with matcher combinators here: https://github.com/clojure-emacs/cider/issues/2901#2021-04-1914:22bartukaoh 😕#2021-04-1914:22bartukabetter to move this to #cider channel#2021-04-1914:17grazfatherit’s exactly that it’s not doing anything with ansi escape codes. does your error handler add colours? I don’t know how to hide them in emacs, but your exception handler could/should not use colour unless it detects its output writer is a TTY#2021-04-1918:00bozhidaryeah, those make sense in a terminal setting, but I'd never include them in something that's meant to be used programmatically.#2021-04-1922:08bartukaI can't remember if reitit was raising errors like this before. Will investigate their exception handler#2021-04-1922:12bartukalooking at the code seems like this is the printing function https://github.com/metosin/reitit/blob/1ab075bd353966636f154ac36ae9b7990efeb008/modules/reitit-core/src/reitit/exception.cljc#L28 and nothing weird pops out#2021-04-1922:13bartukaand my cider-print-fn is using 'pprintas default#2021-04-1922:22bartukafound it, https://github.com/metosin/reitit/blob/1ab075bd353966636f154ac36ae9b7990efeb008/modules/reitit-dev/src/reitit/dev/pretty.cljc#L270 reitit pretty/exception namespace#2021-04-2103:41WestAnybody know a good org mode parser for Clojure? I want to make a reagent component that can display org mode documents.#2021-04-2104:34solf@c.westrom Here’s a list of parsers: https://orgmode.org/worg/org-tools/ There’s two clojure ones in there. I haven’t tried any of these personally. Good luck though if you want to go beyond basic parsing. Only org-mode truly understands org-mode 😅#2021-04-2104:36solfThis one seems to be the your best bet: https://github.com/200ok-ch/org-parser#2021-04-2111:20West@dromar56 Thank you. I took a look at it, and it seems like it’s not very developed. I’m thinking I’ll try using asciidoc instead.#2021-04-2118:26vemvyeah I've repeatedly researched parseable org (for good reasons) and there's just no good solution. org-mode is a non-regular language or something like that, I forget the exact technical term. So it's not parseable and therefore you can only really work with org within org-mode (vs. clojure or any other lang)#2021-04-2118:28vemv200ok-ch's parser is a very laudable attempt but as you sensed, it's in a POC phase. it's super slow for inputs beyond a small threshold#2021-04-2121:26anonimitorafIn theory, one could just translate the org parser from elisp -> clojure right?#2021-04-2123:47West@UR37CBF8D Never thought of that. Yes I suppose you could.#2021-04-2208:48Rupert (All Street)If you only need to support a limited subset of the syntax of org mode it's reasonably straightforward to build your own parser. We have created a super quick parser for it at work for the limited subset of syntax we needed (headings, lists, code blocks and paragraphs).#2021-04-2213:19WestFor some reason, when I passed my org document through it, it would not process lists and code blocks properly.#2021-04-2315:25kingcodeI just upgraded macOS from High Sierra to Catalina, and Emacs from 25.1.1 to 27.2.2 and am experiencing a real Meta key headache: the Command key is no longer recognized as Meta, and I have to use the Option key instead. Has anyone come across this? Is there any way to fix this short of rebinding everything? I don’t want to remap macOS Cmd to Options key, which would break the Cmd key for non-Emacs usage. This seems to come from macOS change - any advice?#2021-04-2315:26dpsuttonterminal or gui?#2021-04-2315:28dpsuttonif gui i have the following:
(when personal/osx-p
  (setq mac-command-modifier 'meta))
might also work in terminal, not sure. i think iterm has a way to hijack that in the terminal emulator. and (defconst personal/osx-p (string= system-type "darwin")) is the osx-p predicate
#2021-04-2315:31kingcodeThanks @dpsutton, I can use either - I got a ‘Symbol’s value as variable is void’#2021-04-2315:31eggsyntax& FYI there are similar ones for alt and hyper. From mine:
(setq mac-option-modifier 'alt)
(setq mac-command-modifier 'meta)
(setq mac-function-modifier 'hyper)
I believe those work for me in terminal as well.
#2021-04-2315:37kingcodeThanks @eggsyntax, this worked for both gui and term!#2021-04-2315:45kingcodeI was seeing a very dark horizon with this issue, and a possible return to vi - yikes 🙂#2021-04-2315:46kingcodeI am shocked the online Gnu Emacs wiki doesn’t mention this…they more or less tell you to live with it.#2021-04-2315:48kingcodeSorry for the mistake in attribution#2021-04-2315:52dpsuttonit might be because they are weird about osx. or perhaps the gurus who run that website use escape as their meta key. i've seen people do that and it is crazy to me#2021-04-2316:01kingcodeIndeed - since there are option keys on both sides I could get by for a while, but Escape then x in sequence?? Forget it…also, that seemed to completely go against the mantra of ‘make Emacs do want you want it to’. Thanks!#2021-04-2316:15kingcodeI have added a suggested change to the Emacs wiki https://www.emacswiki.org/emacs/EmacsWikiSuggestions#h5o-1#2021-04-2317:03kingcode@dpsutton Your solution works also in both modes - sorry, I omitted to paste in the osx-p declaration! This is very handy for switching b/w hardware. Thanks!#2021-04-2317:04kingcodeEmacs is still great 🙂 !#2021-04-2319:11eggsyntax> perhaps the gurus who run that website use escape as their meta key. i’ve seen people do that and it is crazy to me That’s ridiculous! You need the escape key to activate caps lock. 😉#2021-04-2519:02ericdallohttps://www.reddit.com/r/emacs/comments/myej3z/the_nativecompilation_branch_was_just_merged_into/?utm_medium=android_app&amp;utm_source=share#2021-04-2712:00Ben SlessIs there a way to update a variable in dir-locals instead of overriding it? Thinking about cider-clojure-cli-global-options#2021-04-2712:08yuhanyou could use eval to run arbitrary forms#2021-04-2712:13yuhansomething like
((clojure-mode . ((eval . (add-to-list (make-local-variable 'cider-clojure-cli-aliases)
                                       "dev")))))
#2021-04-2714:54gonAlso you could use the C-u prefix before cider-jack-in to rewrite the default command line#2021-04-3018:47Janne SauvalaWhich Emacs “distribution” you consider to be the best for macos and you are using? I tried emacs-plus (https://github.com/d12frosted/homebrew-emacs-plus#no-titlebar), emacs-mac (from https://github.com/railwaycat/homebrew-emacsmacport) and emacsformacos (https://emacsformacosx.com). I guess emacs-plus (28) is the only one offering native comp but I noticed that scrolling felt a little sluggish compared to the other two. emacs-mac had some nice macos specific features (pixel scrolling, touchbar zoom etc) but seems to offer only the latest staple version. One options is that I just wait for the native-comp to be released in the next major release and go with the smoother stable releases for now 🙂#2021-04-3018:49DerekI use the railwaycat/mituharu ‘emacs-mac’ and stay on latest stable personally#2021-04-3020:48andy.fingerhutI've been using https://emacsformacosx.com/ Emacs 26.3 on macOS 10.14.6 (yes, a couple major versions behind latest) without trouble, but I am pretty minimal in my use of Emacs add-ons, so might not notice issues you would.#2021-04-3021:48Janne SauvalaThanks for replies! It seems that the Emacs macos community is indeed a little spread between the different options and Emacs versions 😄 Luckily it is quite easy to have multiple Emacses installed so I can keep switching between them and check which one I like the most 🙂#2021-05-0114:49borkdudeWhich clojure emacs tool can align EDN files like this: https://gist.github.com/mikeananev/c87c1596aed50b7bb095a816f6921737 So the vals on the right are aligned on the same column?#2021-05-0115:03practicalli-johnI thought it was just setting options in clojure-mode, one or both of these?
clojure-indent-style 'align-arguments                
clojure-align-forms-automatically t
#2021-05-0117:02dakraI think the command to manually format like that is clojure-align (Bound to C-c SPC by default)#2021-05-0119:04borkdudeI have tried that but it doesn't seem to align all the keys and values in one map at the same column. I expect the vals from :enter and :leave to go more to the right because of the following key/val Am I misunderstanding how it should work?#2021-05-0119:17dpsuttonI think the line breaks introduce new alignments. So that if you have long keys you can put a line break so that other keys don’t get crazy indentation#2021-05-0119:17dpsuttonIt might be configurable#2021-05-0119:20dpsutton
(defcustom clojure-align-separator clojure--align-separator-newline-regexp
  "The separator that will be passed to `align-region' when performing vertical alignment."
  :package-version '(clojure-mode . "5.10")
  :type `(choice (const :tag "Make blank lines prevent vertical alignment from happening."
                        ,clojure--align-separator-newline-regexp)
                 (other :tag "Allow blank lines to happen within a vertically-aligned expression."
                        'entire)))
#2021-05-0211:11borkdude@dpsutton That did the trick!
(setq clojure-align-separator 'entire)
https://github.com/clj-kondo/clj-kondo.lsp/blob/master/bb.edn
#2021-05-0213:55SchmohoI am currently trying out lsp-mode with clojure and I do somewhat like it so far, but what's driving me insane is that it won't align any forms, although align automatically is set to true#2021-05-0213:55Schmohodoes anybody know how to fix that?#2021-05-0213:57SchmohoI've read it uses cljfmt internally and this should be configurable, but I couldn't find out how#2021-05-0214:08ericdalloDo you have lsp-enable-identation to t?#2021-05-0214:08ericdalloIf so, you can just call lsp-format-buffer#2021-05-0214:51Schmohothat does not align forms#2021-05-0214:53ericdallowhat do you mean with align forms? like vertically?#2021-05-0214:54ericdalloIf so, this is not possible with clojure-lsp yet because of https://clojurians.slack.com/archives/CHB5Q2XUJ/p1619891221242100#2021-05-0214:54ericdallothe onlyt possible way to do that is with clojure-align built-in in clojure-mode for emacs#2021-05-0215:08mpenetI personally really dislike this kind of alignment. It's quite inconsistent between editors and when done manually it ends up full of random/personal rules. When working with code bases with many contributors it ends up quite messy in my experience.#2021-05-0215:09mpenetI also don't think it makes code more readable, but I get that part is personal.#2021-05-0215:10mpenetclj-fmt can enforce the "non justified" style too: :remove-multiple-non-indenting-spaces?#2021-05-0215:19ericdallobut cljfmt can't align forms vertically yet, right?#2021-05-0215:20ericdalloref: https://github.com/weavejester/cljfmt/pull/77#2021-05-0215:50mpenetNo it can't afaik#2021-05-0409:21rickmoynihanI recently switched to Emacs with native-comp, and have a new issue in counsel, e.g. counsel-find-file where it when trying to backspace over a directory it says [Text is read-only] The main issue report I see when digging into this is: https://github.com/abo-abo/swiper/issues/2761 but AFAIK I’m not running hungry-delete. Any ideas on how to fix this?#2021-05-0609:53LuQuick question about clojure-lsp and cider.. I noticed that when I try the cider command M-. -> cider-find-var and the function definition is not in my working directory but say in core.cljs (so presumably in a jar), everything hangs and I have to force kill emacs.. has anyone experienced that at all?#2021-05-0611:05hindolInstead of force killing Emacs, did you try Ctrl + g?#2021-05-0611:11Luyeah tried Ctrl + g many times .. but thanks for suggesting that 🙂#2021-05-0611:16Juλian (he/him)cider can be interrupted using C-c C-c , or using the function cider-interrupt - that may help, too#2021-05-0612:04ericdalloBTW if you are using cider command especifically, clojure-lsp is not being used there#2021-05-0613:33LuWhen I run M-x cider-find-var I get a LSP:: Connected to.. message and everything just hangs from there..#2021-05-0613:35ericdalloSo the issue is not related with cider, but when lsp-mode connect to a new jar buffer, do you have an updated lsp-mode and clojure-lsp?#2021-05-0613:36ericdalloIs the jar buffer file content big?#2021-05-0613:57Luupdated and problem went away :face_palm: thanks 🙂#2021-05-0613:57Lubtw the buffer was the core.cljc namespace of ClojureScript#2021-05-0613:59ericdalloNice, yeah, we fixed this performance issue recently on lsp-mode side some weeks ago#2021-05-0920:02aptHi folks. I’ve been working on vilpy [1], a fork of lispy [2], a vi-like paredit. In regards to Clojure, these are the main differences compared to the original lispy: - Do not inject Clojure code to cider. lispy does that for adding some niceties but it gets in the way depending on the project setup. - Do not rely on internal details from cider. For evaluation, just use cider-eval* functions. - Do not assume that cider is used at all. Supports inf-clojure. Furthermore, In general, vilpy is less featureful by design. I removed tons of obscure commands and language-specific functions. For more difference, please consult [3]. Feedback is welcome. [1]: https://github.com/Andre0991/vilpy [2]: https://github.com/abo-abo/lispy [3]: https://github.com/Andre0991/vilpy#lispy#2021-05-0920:12grazfatherWhy are you writing a fork? just curious what part of lispy bothered you enough to write your own#2021-05-0920:14grazfather(I see the section now)#2021-05-0920:15grazfatherHave you seen lispyville?#2021-05-0920:19aptI confess I didn’t understand lispyvilles README when I read it for the first time. It seemed pretty complicated. After working with vilpy, I think I would grok it today, but I was always fine using lispy commands in insert mode and vim commands in normal mode. (ironically, I’m experimenting with Emacs bindings today anyway.) But thanks for reminding me, I’ll add a section about lispyville in the README.#2021-05-0920:26grazfatherfor sure! I happen to hate the lispy minor mode, it’s madness. I use lispyville to basically bind some lispy functions when I am in evil-normal mode. I would be interested to trying yours out. To me navigating sexps, moving them, and slurp/barf are the most important#2021-05-0920:28grazfatherfwiw:
; Lispyville needs Lispy, but I don't want to ever use the insane lispy-mode
; bindings.
(use-package! lispy)
(use-package! lispyville
  :hook ((lisp-mode . lispyville-mode)
         (emacs-lisp-mode . lispyville-mode)
         (ielm-mode . lispyville-mode)
         (scheme-mode . lispyville-mode)
         (racket-mode . lispyville-mode)
         (hy-mode . lispyville-mode)
         (lfe-mode . lispyville-mode)
         (dune-mode . lispyville-mode)
         (clojure-mode . lispyville-mode)
         (fennel-mode . lispyville-mode))
  :init
  (setq lispyville-key-theme
        '((operators normal)
          c-w c-u                       ; Ctrl-w and Ctrl-u are sexp aware
          (atom-movement t)
          slurp/barf-lispy              ; >/< to 'grow' and 'shrink' sexps
          additional                    ; M-j/k to swap atoms forward/back
          additional-insert))           ; M-{i,a,o,O} for sexp-aware enter insert
  :config (lispyville-set-key-theme))
#2021-05-0920:35aptGot it. In this case, I guess vilpy won’t help you much: its minor mode is identical to lispys. It’s just ‘vimmier’ in the sense that its keybindings are more vim-like. In my case, when using evil, I just got used to staying in insert mode for editing lisps. I tried to avoid normal mode as much as possible since lispy is generally enough (albeit not familiar or comfortable for one that expects vim). However, I’ll add in the README one could replicate lispyville with vilpy. That would require another package (say a vilpyville), but creating such package shouldn’t be too difficult: I guess it’s mostly a matter of replacing lispy with vilpy and possibly fixing some renamed functions. I don’t have the motivation for doing this right now, but I might try it someday.#2021-05-0920:40aptOr, better yet, maybe simply aliasing vilpy functions to the lispy equivalents would make lispyville work already.#2021-05-0921:41grazfatherCool. Thank you for the explanation. We have a different philosophy here :)#2021-05-1002:29aptJust to further clarify this issue (for people that are not aware of all those packages): both lispy and vilpy are not aware of evil. This is by design. Using their minor modes while in insert mode and evil’s commands in normal mode is possible and works for some people. However, for a real integration with evil, a package on top of lispy is required, and that’s usually lispyville.#2021-05-1014:40andrea.crottidoes anyone know what's the best way to add another middleware to the options of cider/nrepl?#2021-05-1014:43andrea.crottiI just have to add another middleware before all the others without really changing anything from the rest of the config#2021-05-1016:50aptyou might want to ask this in #cider#2021-05-1117:45naomarikCan anyone point me to settings to tweak so that printing large lines in the REPL doesn't lock up emacs? My M1 Mac seems very prone to this, hardly ever happens to me on in WSL2.#2021-05-1117:54winkywoosteri’ve been using https://github.com/railwaycat/homebrew-emacsmacport on an m1, and haven’t had any performance issues. I can’t say specifically about large lines specifically though.#2021-05-1118:07practicalli-johnSetting the repl buffer size may help with the issue
(setq cider-repl-buffer-size-limit 100)
You may want to experiment with the right number for you. I dont use the REPL for meaningful output so I have it quite low If you are using the REPL to browse evaluation results, suggest using the cider-inspector instead as it can handle very large amounts of data, e.g. https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html
#2021-05-1118:10naomarikThanks @U05254DQM, setting size limit seems to work.#2021-05-1523:51Zachary FontenotDoes anyone know why typing say ^:export hangs emacs? Basically, it happens after either trying to move past whatever is typed after the ^: and I’m not sure if it’s related to the caret being self-insert-command? Also think it only happens in a defn I basically have to spam ctrl-g until it quits whatever thing it’s doing. Maybe, I’ll try and see some logging output or something.#2021-05-1523:53dpsuttondo you have lsp running? that would be my first guess#2021-05-1523:53Zachary FontenotNah, no lsp. Lemme try on emacs -Q and see if I can get it to happen.#2021-05-1523:58Zachary FontenotBut it is something going on with modes other than merely clojurescript mode.#2021-05-1600:03dpsuttonyou can try m-x profiler-start and then trigger the hangup and then m-x profiler-report#2021-05-1600:10Zachary FontenotFrom the profiler, the highest percentage was clojure-match-next-def which uses imenu to index the file. Which sounds like something that could cause a buffer to hang. that is, if I’m reading the profiler output correctly#2021-05-1600:41dpsuttonHow old is your clojure mode. Maybe update that#2021-05-1600:47Zachary Fontenotit’s from march 🤷 but I will try#2021-05-1601:00Zachary FontenotI have a config that doesn’t have the issue, so I am going to use that for now and make an issue for it. This was happening also months and months ago, on my other computer, but it’s cropped up again#2021-05-1616:02Zachary Fontenot@bozhidar https://clojurians.slack.com/archives/C099W16KZ/p1621122712235800 Have you encountered this issue at all? I’m essentially using Prelude off the shelf for my Clojure setup#2021-05-1618:47bozhidar@bozhidar I haven't seen the issue myself, but it seems likely that's a bug in clojure-mode's code.#2021-05-1618:47bozhidarI think it'd be best to report the issue there, together with whatever data you've obtained from the profiler.#2021-05-1618:48Zachary FontenotI will do that#2021-05-1910:12hindolDoes Emacs have a REPL like experience for Bash scripts? I am trying to avoid running the script from beginning after every minor change.#2021-05-1918:09motformThere are a few things like that, on the top of my head:#2021-05-1918:10motformhttps://github.com/Overdr0ne/shelldon#2021-05-1918:10motformhttp://www.howardism.org/Technical/Emacs/piper-presentation.html#2021-05-1918:11motformI also recall seeing someone using fzf as a kind of interactive shell script engine, but I could not find that (reddit?) post#2021-05-1918:11motformhttps://ambrevar.xyz/lisp-repl-shell/index.html#2021-05-1918:21hindolUnfortunately, I need to write Bash scripts only (for work). Since a shell is pretty REPL like, is there a workflow where I can "send" a few lines from a script.sh file to be evaluated in another window/buffer where shell is running?#2021-05-1923:17Young-il ChooHave you tried sh-script-mode? It has a function sh-execute-region for evaluating part of the script.#2021-05-2120:40naomarikI'm having an issue where projectile isn't respecting .projectile within the project directory on my Mac. WSL2 within Windows same project, same everything is working fine. Using spacemacs, everything updated, tried changing indexing method from hybrid to alien. What else can I look at?#2021-05-2121:15naomarikOh, I just edited .projectile on Mac saved it and it works. No idea what that's about.#2021-05-2121:07WestI’m using Emacs with native compilation? I’m getting a ton of warnings that cover the entire buffer. Why is this? Should I just hide them?#2021-05-2121:14dpsuttonlooks like persp.el could use some cleanup#2021-05-2201:47Westseems like all the messages stopped once I started using emacs for awhile#2021-05-2202:30ahungryThey show up when compiling to elc or eln#2021-05-2202:30aptthose warnings are shown when emacs is compiling some package for the first time they’re expected, yes (if authors don’t fix them, of course)#2021-05-2305:01WestI guess it’ll be some time before spacemacs works with native-comp without all those errors.#2021-05-2404:59blak3mill3rThat's pretty much normal. I also see plenty of warnings from compiling all my packages.#2021-05-2500:28grazfatherhm, so all of a sudden opening an edn file hangs emacs for > 30 seconds. I am using doom emacs, clojure lsp + kondo + cider. How might I root cause this?#2021-05-2720:31ericdalloHi, could you test with latest version later please? https://clojurians.slack.com/archives/CPABC1H61/p1622139221073300#2021-05-2503:04Westhow big is said file?#2021-05-2503:04WestIt’s not very large I suppose yeah? Maybe post your config? (gh/pastebin)#2021-05-2508:44hindol@grazfather You can run the Emacs profiler to see which function is taking the bulk of the time. SPC h T => open EDN => SPC h T.#2021-05-2509:38borkdude@grazfather I can confirm I'm having the same issue. I think mentioning this in #lsp is your best bet.#2021-05-2509:38borkdudeI don't think a tool should block opening a buffer, ever#2021-05-2511:58grazfatherthank you both, will do that, and I agree#2021-05-2511:58grazfatherI just didn’t know which tool to blame#2021-05-2708:32Mukund ZI seem to be having a problem with launching the Cider Repl in emacs using the cider-jack-in command. "Unable to resolve symbol : create in this context". The error stack seems to originate from the Java libraries and not from my code. I am a newbie and have no idea how to go ahead with this. Any hints?#2021-05-2708:55hindolUpgrading all Clojure related packages from Melpa is worth a shot.#2021-05-2709:47Mukund ZThanks, but I tried upgrading then but the problem still persists.#2021-05-2710:01Mukund ZDeleting cider and reinstalling it worked for me!#2021-05-2710:03Mukund ZOkay, the problem was that I had removed the ns declaration from my core.clj#2021-05-2913:27pavlosmelissinosI can't believe I didn't know about async-shell-command (`M-&`) until today...#2021-05-3118:35bozhidarI wrote a blog post about it recently https://emacsredux.com/blog/2021/04/07/run-shell-commands-from-the-minibuffer/ 🙂#2021-06-0120:13caumondHi, I used to be in a mode where all the block was reindented- reformated while I was typing. Can somebody what to look at to have this behavior back?#2021-06-0120:20futuroFor what language?#2021-06-0120:21futuroI know parinfer has a mode that works like this#2021-06-0121:14caumondfor clojure#2021-06-0123:04agcheck if you have aggressive-indent-mode enabled#2021-06-0210:25practicalli-john@caumond Using LSP the variable lsp-enable-on-type-formatting t will format while typing as ag mentioned, use a clojure-mode hook to add aggressive-indent-mode (add-hook 'clojure-mode-hook #'aggressive-indent-mode) Do not use both of these together unless you want to see Emacs will go crazy :)#2021-06-0622:26agilecreativityHi @jr0cket Is it possible to make aggressive-indent play well with cljfmt with specific rules in the profiles? It seems aggressive-ident ignore these rules used by cljfmt (e.g. in project.clj for example. Is there ways to make this work together?#2021-06-0622:28agilecreativitye.g I have the following rules in project.clj and I want aggressive-indent to use it I format the code via indent-region
:cljfmt
  {:remove-surrounding-whitespace? true
   :remove-trailing-whitespace? true
   :remove-consecutive-blank-lines? true
   :insert-missing-whitespace? true
   :align-associative? false
   :split-keypairs-over-multiple-lines? true
   :remove-multiple-non-indenting-spaces? true
   :indents {async [[:inner 0]]}}
#2021-06-0700:11practicalli-johnI haven't found a way to make aggressive-indent work with LSP format as you type. It seems to be one or the other. When cljfmt supports aligning of argument forms, then aggressive-indent shouldn't be needed.#2021-06-0700:13practicalli-johnThere is an issue around this on cljfmt and @UE21H2HHD is kindly looking at ways to add this feature#2021-06-0711:48lread@U39K1NXHP the here’s https://github.com/weavejester/cljfmt/issues/36 and there has been some discussion in #cljfmt too. Input and ideas are welcome.#2021-06-0800:39blak3mill3rIf aggressive-indent-mode could be configurable to the degree that it would match cljfmt or the nrepl-middleware that cider et al use to format code, it would help allow people (me) to continue using it in the context of a larger project with other people who aren't using aggressive-indent-mode#2021-06-0800:41blak3mill3rI personally love aggressive-indent-mode but if not everybody on the team is using it, and the various formatting tools disagree about how to format the code, the result is so expensive that I feel like I have to accept that I cannot have my preference#2021-06-0916:15agilecreativityI want the same thing and I really like aggressive-indent-mode and wish I can customize it to make it produce the same output as cljfmt so the same rules can be used with other team member.#2021-06-0211:26caumondThat's it, aggressive indent mode#2021-06-0211:27caumondthank you very much !#2021-06-0622:26agilecreativityHi @jr0cket Is it possible to make aggressive-indent play well with cljfmt with specific rules in the profiles? It seems aggressive-ident ignore these rules used by cljfmt (e.g. in project.clj for example. Is there ways to make this work together?#2021-06-0500:34pinkfrogWhy the imports have different colors?#2021-06-0504:20ericdalloYou can check the face of a word, I just don't remember the command right now :/#2021-06-0510:54dakraM-x describe-text-properties ?#2021-06-0815:15pinkfrogThanks. I updated the package, and it turns into underscore. The above command show some lsp-xxx properties since the code is unused.#2021-06-0815:15pinkfrog#2021-06-0815:16ericdalloOh, so this comes from clojure-lsp/lsp-mode, it's the unused face lsp-mode is using indeed#2021-06-0815:17ericdalloUsually the face is just a dim grey, not underscored#2021-06-0815:20ericdalloYou can change it, the variable for that is the lsp-diagnostics-attributes#2021-06-0815:34pinkfrogYup. Thanks for that info.#2021-06-0914:20agilecreativityHi, Does anyone know how can I get the backspace to skip pass just one char when using it with dired from top level directory to base directory? e.g.
Find file: ~/projects/some-project/sub-dir

# When I press Backspace at the sub-dir level I want it to go directly to 
~/projects/some-project/ not by one char e.g.
~/projects/some-projec 
#2021-06-0914:21agilecreativityIn Spacemacs, it seems I can get the effect by pressing Ctl-h, but what I want is this to be the default behavior when pressing backspace.#2021-06-0914:26agilecreativityProbably dired-up-directory?#2021-06-0914:28lukaszYou can use ^ to jump up. That said, one of the packages I have installed (ivy?) enables the mode you're asking about - pressing delete/backspace removes a single path segment not a single character#2021-06-0914:28tvirolaiIdo does this https://www.masteringemacs.org/article/introduction-to-ido-mode#2021-06-0914:29tvaughan
(defun tvaughan/parent-directory (path)
  "Return the parent directory of PATH."
  (or (file-name-directory (directory-file-name path)) ""))

(defun tvaughan/backward-delete-directory (arg)
  "Delete characters backward until encountering the end of a word.
With ARG, do this that many times."
  (interactive "p")
  (let ((contents (minibuffer-contents)))
    (delete-minibuffer-contents)
    (insert (tvaughan/parent-directory contents))))

(use-package selectrum
  :config
  (selectrum-mode +1))

(define-key selectrum-minibuffer-map (kbd "DEL") #'tvaughan/backward-delete-directory)
#2021-06-0914:31tvaughanido does this much better. This still doesn't replicate it as well. Granted, this is used with selectrum, but should be adaptable#2021-06-0915:22grazfatherIs Ido basically a competitor for help or ivy?#2021-06-0916:24agilecreativityThanks @U01KUQRDMLG after adding ivy, and now I get the desired effect that I want. I am trying a new config and can’t remember how this work with my old config. And ivy package seems to be the one that I really need.#2021-06-1616:10gregoltsovHi everyone! I’m having a strange issue with .dir-locals.el and not certain what’s causing it. I’m using shadow-cljs, and just wanted to make it super easy to start REPL. My whole file is
((nil . ((cider-default-cljs-repl . shadow)
         (cider-shadow-default-options . "app")
         (cider-shadow-watched-builds . ("app" "test")))))
However, when I visit any file in the project, emacs gives this error: Ignoring unsafe file local variable: cider-shadow-watched-builds . It never errors for other 2 variables. So I have to manually set it, which breaks the flow a little bit. Any idea why that variable would be causing issues? I’m using doom-emacs, and it doesn’t even give me an option to trust that variable.
#2021-06-1616:33hindolThis is a fixed issue. Not sure if the fix is released though. https://github.com/clojure-emacs/cider/issues/3000#2021-06-1616:54jkxyzDoom Emacs sets enable-local-variables to :safe. I have it set to t in my config so that it will prompt to set unsafe variables and mark them as trusted #2021-06-1616:54jkxyzhttps://www.gnu.org/software/emacs/manual/html_node/elisp/File-Local-Variables.html#2021-06-1622:48gregoltsovThanks for the replies! Will try these first thing tomorrow morning#2021-06-1701:29JohanHi, I think I'm missing a piece in my use of cider, I spend my time editing a file and then evaluating a form. So I always have to move back to that form and evaluate then back where I need to edit the code. How could I make a shortcut to easily re-eval the form without navigating back to it's location in the source ?#2021-06-1705:00pavlosmelissinosThe docs might be useful: https://docs.cider.mx/cider/usage/code_evaluation.html If you mean you need to selectively evaluate something other than what's at point or before it without navigating to that region, I don't think that's possible. How would it work? Furthermore, if you evaluate a form once then it should be fine until you change its definition. Running C-c C-c (cider-eval-defun-at-point), C-c C-e (cider-eval-last-sexp) or even C-c C-k (cider-load-buffer) when you make changes should be enough I think.#2021-06-1706:20JohanThanks for the reply, I'm currently just opening a small buffer that only show that line i constantly need to evaluate, and jump there when i need. I was thinking that my non issue was more common than it seems.#2021-06-1706:28pavlosmelissinosSorry, I must be missing something. Why do you need a separate buffer? Can't you have the form you want to evaluate in the same buffer that you have your code? An example might help 🙂#2021-06-1706:38JohanThe separate buffer is pointing to the same file, just focused on the form that i need to reevaluate constantly. So this way I don't constantly scroll up and down the file. I often have a comment form at the bottom of a file and when I need to edit the top of the file I end up scrolling up and down every time I want to reevaluate.#2021-06-1706:51pavlosmelissinosOh I see! Hmm, I don't have a clear solution to your problem. Personally, during the early stages of development, while a function still doesn't have a proper shape and I have to change it heavily, I don't put it in a defn. I keep it in a comment form, like you said, so I have a single thing to evaluate. As soon as it's a bit more stable but still not ready, that's when I put it in a defn and add a comment block right after it, so if I'm not modifying it a lot, that works (for me) too. I think this workflow should fit most other forms as well, besides defns. I also tend to have a comment form at the bottom but find it too limiting during development so I add comments as needed throughout the file (and eventually turn them into tests or something).#2021-06-1707:32practicalli-johnSo you wish to jump to a form in a comment block that calls a function that you are repeatedly editiong. I use a mark for this https://www.emacswiki.org/emacs/MarkCommands I would set a mark on the form that call the functions and jump to that mark after editing. Alternatively, create the comment block underneath the function you are editing, then you dont have far to go to reach the line you wish to evaluate. In spacemacs, setting markers is easy. I also use G to jump to the bottom of a file or ' ' to jump back to the last change. Not sure how to do that in vanilla Emacs https://practical.li/spacemacs/navigating-code/markers.html#2021-06-1709:14pavlosmelissinosTIL marks can be used like that, thanks#2021-06-1710:54adiI do the mark-and-jump thing. Also, fwiw, it's possible to define unit tests in the function itself (`:test` metadata). Some pros and cons discussed here https://clojureverse.org/t/inline-tests-do-you-do-it/4083#2021-06-1713:51practicalli-johnI use Emacs projectile package to jump between source and test code, its very good.#2021-06-1721:46eggsyntaxA couple of other options: • If the form you want to eval is, say, (map inc (range 3)) then you can wrap it in an anonymous no-arg fn and bind it to something:
(def f #(map inc (range 3)))
and then you can just call (f) in the repl without much typing. • You could send it to the repl instead of evaling it inline (eg cider-send-last-sexp-to-repl) and then use the up-arrow in the repl to get to it and hit enter to call it again.
#2021-06-1817:17dpsuttoni have a patch for register insertion in inf-clojure, and here's a gist that accomplishes that in CIDER: https://gist.github.com/dpsutton/7556cf1f4ecfc97da7b7e9d6dbf210c6#2021-06-1817:19dpsuttonlet's you save items into registers C-c x r s <register-name> (x r-egister s-ave) is the mneomic. And then the normal insert in repl map has a key x that prompts for a form to send to the repl#2021-06-1817:19dpsuttonso highlight a form, save to a register (i use t for (run-tests) all the time), eval whatever you want, and send the form to the repl#2021-06-1705:00pavlosmelissinosThe docs might be useful: https://docs.cider.mx/cider/usage/code_evaluation.html If you mean you need to selectively evaluate something other than what's at point or before it without navigating to that region, I don't think that's possible. How would it work? Furthermore, if you evaluate a form once then it should be fine until you change its definition. Running C-c C-c (cider-eval-defun-at-point), C-c C-e (cider-eval-last-sexp) or even C-c C-k (cider-load-buffer) when you make changes should be enough I think.#2021-06-1817:17dpsutton#2021-06-2419:22ericdallolsp-mode changed it's default place position for lens to end-of-line, this should be a better less intrusive default 🙂 Example with clojure-lsp (#lsp)#2021-06-2419:35practicalli-johnExcellent, much appreciated. It was a little weird before when all my code suddenly jumped a line a few seconds after loading a new file. This will be very discreet in comparison 🙂#2021-06-2419:35ericdalloI thought the same, then I saw how vim does and it seems better to me#2021-06-2612:07anonimitorafOoh, I might have to enable lenses again then 😄#2021-06-2419:30lukaszDoes anybody know how to turn these off? I checked the lsp and clojure-lsp docs but it's not obvious to me what to look for#2021-06-2419:30ericdallothese are sideline code actions from lsp-ui#2021-06-2419:31ericdalloyou can disable all sideline, or disable only the code actions sideline like prefer#2021-06-2419:31ericdalloyou can find it here: https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/#2021-06-2419:32ericdallo
(setq lsp-ui-sideline-show-code-actions nil)
should be enough
#2021-06-2419:56lukaszfacepalm can't believe I missed that page - thanks!#2021-06-2419:57ericdalloNP 🙂#2021-06-2513:32joelkuiperDoes anyone else have an issue with eldoc in combination with cider/lsp? When I type the mini buffer very briefly shows the function signature, and the quickly switches over to what I just typed (in a different font) which is rather distracting. Turning off eldoc mode "fixes" it, but I was wondering if there is a better solution (dotfile https://github.com/joelkuiper/dotfiles/blob/master/emacs)#2021-06-2513:36joelkuiperthe behavior in question#2021-06-2513:39ericdalloIt seems to bring the doc from cider and later it's replaced by LSP#2021-06-2513:40joelkuiperyeah that is my guess as well, I'd be happy with either of them ... just not both at the same time, but not sure about the appropriate flag to disable that behavior (or if anyone else ran into the same issue!)#2021-06-2513:42ericdallomaybe disable the cider one with (setq cider-eldoc-display-for-symbol-at-point nil) ?#2021-06-2513:44ericdalloit seems to work for me, I'll probably add to https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#2021-06-2513:45ericdalloin case you want to disable the LSP one, I think the var is lsp-eldoc-enable-hover#2021-06-2513:46ericdallo(I'd go with disabling the cider one 😛 )#2021-06-2513:49joelkuiperI'll check it out, thanks!#2021-06-2611:46bartukafixed for me 😃 had the same issue. thanks#2021-06-2604:16myguidingstarhow to eval an elisp expression in the context of a specific buffer? pseudo code (eval-in-buffer (nth 0 (buffer-list)) '(do-this-and-that))#2021-06-2604:47dpsuttonUsually “with-current-buffer”#2021-06-2605:13myguidingstarthanks. It turns out that I need frame, not buffer and found select-frame#2021-06-2613:53Jakub ŠťastnýHey guys. Question about reusability of SQL code when doing literate programming in Orgmode (please see the screenshot below this message) # Requirements In my code I want to separate SQL queries from my app code, I don't want them to be just bunch of strings inside my CJ code. I want them to live in separate blocks, where I can: 1. Run them using C-c C-c, #+CALL:, or "=inline=". When running via call or inline, I want to be able to override the default email argument. (All of this works already, I'm mentioning it, because I don't want it to be lost "on the way".) 1. I want to see SQL syntax highlighted, which I get for free with the code block, but it wouldn't be the case would I be using strings in CJ. 2. Now the issue is how do I include it into my CJ app code? # The issue Babel has two was of referring code blocks: either by <<my-named-block>>, or by <<my-named-block(args)>>. The former simply copies and pastes contents of the block (which we need for tangling) and the latter actually calls the block. Calling the block is not what we want. We need to copy and paste the contents, BUT we need to replace the $email babel variable. And here is what I struggle with – how would I do that? The preferred solution would be with babel itself: this is no concern of the application. I tried to write a named helper function in babel and calling it like <<replace-variables(x: <<get-user-query>>), but babel doesn't seem to be supporting nested calls. The fn replace-variables was meant to simply take the SQL with $email in it and convert it to a valid CJ string with evaluation, something like (str "SELECT ..." email), which would then correctly take email from the request (CJ variable as opposed to babel variable). Does anyone know whether/how could this be done in babel itself? If not, I'd probably have to go for plan B, which would be replacing "$email" (string) by email (variable) in CJ.#2021-06-2917:31adiHm, I managed the get the following working, as in "ugly but works... sort of?".
#+name: email
#+begin_src text
  "
#2021-07-0215:27Jakub ŠťastnýThanks @U051MHSEK, I'll take a look at it later in the day.#2021-06-2715:36Janne SauvalaDoes someone happen to know a good alternative to ‘counsel-file-jump’ that would list all files in the current dir or project (recursively including files in subdirs) in the minibuffer and would allow me to switch to files listed in there? I’m fiddling with Ivy and Counsel alternatives (Vertigo and Consult) but I noticed I’m missing that handy function now#2021-06-2715:45dpsuttonprojectile-find-file is what i use#2021-06-2716:39jumarThe gotcha is that, at least in Spacemacs, the file list gets cached and so it doesn't find new files added by team members (e.g. when I update my local branch or switch branches) So I sometimes have to call projectile-invalidate-cache manually#2021-06-2715:50Janne SauvalaThanks Dan, I think I tried that one already but I didn’t see that kind of results I was hoping for. I could have some weird things in my configs that prevented me to see this - let me double check #2021-06-2718:43Janne SauvalaIt seems projectile-find-file didn’t do what I was after. First one is the list from projectile-find-file and the second one is from counsel-find-file#2021-06-2718:51Janne SauvalaInteresting, I switched to some other project and there the projectile-find-file lists files under subdirs. I’m not sure what is happening here 😄#2021-06-2718:57Janne SauvalaIt seems projectile-find-file uses .gitignore to filter results. That is why I cannot see those files under straight folder since I have ignored them. That is pretty handy#2021-06-2813:10timvisher@janne.sauvala Projectile's file logic is pretty straightforward to customize if you are familiar with git as well. Coupling that with directory local variables can be pretty useful. :) https://docs.projectile.mx/projectile/2.2/projects.html#configuring-projectiles-behavior#2021-06-2813:18Janne Sauvalagreat that there are ways to config this - I might want to change the defaults in some of my projects. Thanks for the tip! 🙂#2021-06-2815:39grazfatherwhat is this nil . stuff?#2021-06-2816:07futuroFrom the (emacs) Directory Variables info page, it's > Instead of a mode name, you can > specify ‘nil’, which means that the alist applies to any mode; or you > can specify a subdirectory (a string), in which case the alist applies > to all files in that subdirectory.#2021-06-2816:07futuro
Here's an example of a '.dir-locals.el' file:

     ((nil . ((indent-tabs-mode . t)
              (fill-column . 80)
              (mode . auto-fill)))
      (c-mode . ((c-file-style . "BSD")
                 (subdirs . nil)))
      ("src/imported"
       . ((nil . ((change-log-default-name
                   . "ChangeLog.local"))))))
#2021-06-2816:09timvisherFile and Directory Local Variables are a really cool feature of Emacs, IMHO. :) Read about them and more https://www.gnu.org/software/emacs/manual/html_node/elisp/Variables.html#2021-06-2816:10futuroAgreed; learning about them was a nice tip that made customizing a particular project/directory super easy (and allowed me to clean up my init file, to boot).#2021-06-2816:26mpenetproject.el is also very decent if you're on a recent emacs version#2021-06-2913:41furielHello, does someone know an efficient soultion for this usecase? I often need to develop a function and try to execute it with a given set of parameters in an interactive manner. I approach this like: I edit the function, then ctrl-c-ctrl-c to reevaluate the function. A few lines below I have a function call prepared with proper parameters (generally in a comment block). So I go down to the end of the prepared function call, and evaluate it there. Do you have a nice trick to do this in a faster way? My approach takes a lot of moving around into the function definition, then to the end of the example call. I experimented with a `do` statement, that defines a function and calls it at the same time, because then ctrl-c+ctrl+c would do both, but do messes up the indentation, and I feel there should be a better way to do it.#2021-06-2913:43dpsuttonI wrote a simple “insert register in repl” function that I use all the time. Just save some text to a register, eval the function, then send the form to the repl
#2021-06-2913:45furielThat sounds neat. Can you share the snippet?#2021-06-2914:20dpsuttonha yeah. sorry. was making coffee and feeding the dog#2021-06-2914:22dpsuttonit added it outside of the thread. But use C-x C-r C-s <register-key> (x Resgister Save), and then you can send to the repl with the handy repl sending map at C-c C-j x and then the register key#2021-06-2914:23dpsuttoni do it all the time in inf-clojure#2021-06-2914:24furielThanks for sharing! Trying out now.#2021-06-2915:57pithyless@thoneyvazul I use a different approach. I'll wrap the runner-code in a deftest:
(comment
  (deftest foo
    (setup-and-run-my-code)))
Eval and run cider-test-run-test. Then, when I'm changing the original code, just eval the form (e.g. cider-eval-defun-at-point) followed by cider-test-rerun-test. That last one does the trick: CIDER will remember which test was run last, so you don't need to jump around the buffer anymore (sometimes I'll even be modifying code in a different namespace). On top of that, it's an actual deftest, so you can use is assertions to test some expected behaviors and optionally have CIDER popup the error buffers, etc.
#2021-06-2915:59dpsuttonoh that's clever#2021-06-2916:02furielgreat idea thanks @U05476190#2021-06-2916:04pithylessHappy to help, it's something I've previously struggled with as well. Although I may just have to take @U11BV7MTK's compliment and frame it somewhere. ;)#2021-06-3018:01timvisherI like the pattern of having the function I'm working on in a file and the exercising code be in my repl. 1. Edit the code 2. Whack C-c C-c C-c C-z M-p RET C-z Or 1. Edit the code 2. Eval the form (`C-c C-c`) 3. Switch to the repl (`C-c C-z`) 4. Bring up the previous form and execute it (`M-p RET`) 5. Return to the function I'm working on (`C-c C-z`) If you're not using the current keyboard macro for anything else that can be collapsed down to 1. Edit the code 2. Whack <f4> :)#2021-06-3018:19timvisherGoing the clojure.test route though is intriguing. I think it would be ideal to combine this with the with-test feature of clojure.test so that you can freely edit both the invocation and the implementation at the same time with a single C-c C-c or C-M-x. Unfortunately I can't seem to get CIDER to recognize with-test as something that defines after a quick try. Can anyone make CIDER recognize this as a test to run?
(require '[clojure.test :refer [with-test is]])

(with-test
  (defn +'
    "Adds two numbers"
    [a b]
    (+ a b))
  (is (= 3 (+' 1 2))))
Note clojure.test does this just fine:
user> (require '[clojure.test :refer [with-test is]])

(with-test
  (defn +'
    "Adds two numbers"
    [a b]
    (+ a b))
  (is (= 3 (+' 1 2))))

nil#'user/+'
user> (clojure.test/run-tests 'user)

Testing user

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
{:test 1, :pass 1, :fail 0, :error 0, :type :summary}
#2021-06-3018:21timvisherMy initial attempt was to customize the cider-test-defining-forms to add with-test but doing that doesn't change the behavior I'm seeing at all. ¯\(ツ)/¯#2021-06-3018:30timvisherOooooo this is super nice. Yeah after running the cider-test-run-test function through edebug the trick is adding defn to the cider-test-defining-forms. With that I can whack C-c C-c C-C C-t C-t and rerun the exercising invocation. And again if my keyboard macro slot wasn't busy with something else I could bind that to <f4>. That's actually really nice. Great idea @U05476190! :)#2021-06-3018:53pithylessOT: I'm an emacs evil-mode user and C-c C-c C-C C-t C-t looks absolutely terrifying (compared to say , t a), but whatever works! ;)#2021-06-3019:01timvisherLOL. /me crosses self against modal editing. xD#2021-06-3019:02timvisherThe result's the same in either case. :)#2021-06-3019:05timvisherThe key sequence isn't nearly as bad as it looks if you use your 6th finger.#2021-06-3019:09pithyless@U096U98TC are you referring to a USB foot pedal? :P#2021-06-3019:12timvisherNo although I've considered it! Just my palms. http://ergoemacs.org/emacs/emacs_pinky.html#2021-06-3019:14timvisherSo basically to type that sequence I just rest my left palm down slightly and then rapidly type c c c t t. There's probably a better sequence but I'm not vimgolfing here. :)#2021-06-3019:15timvisherOh yeah for instance another prefix for test map is indeed , so it could be C-c C-c C-c , t but then I need to lift my palm during the sequence so that's actually worse.#2021-06-3019:16timvisherThis is completely irrelevant to you as an evil user but anything that makes me break the ctrl key sequence is a big no no. It makes emacs actually feel clunky to use. It's remarkable how similar to vim it is once you're pressing ctrl with your palm and meta with your thumb.#2021-06-3019:17timvisher(Similar to vim in terms of raw bindings vs. edit function composition which, IMO, is vim's real super power)#2021-07-0101:45Jakub Šťastný@U05476190 exactly! Wouldn't have made the switch (from NeoVim) without EVIL. EVIL rocks. #2021-06-2914:20dpsutton#2021-06-2915:57pithyless@thoneyvazul I use a different approach. I'll wrap the runner-code in a deftest:
(comment
  (deftest foo
    (setup-and-run-my-code)))
Eval and run cider-test-run-test. Then, when I'm changing the original code, just eval the form (e.g. cider-eval-defun-at-point) followed by cider-test-rerun-test. That last one does the trick: CIDER will remember which test was run last, so you don't need to jump around the buffer anymore (sometimes I'll even be modifying code in a different namespace). On top of that, it's an actual deftest, so you can use is assertions to test some expected behaviors and optionally have CIDER popup the error buffers, etc.
#2021-06-3004:56theeternalpulseis there a navigation function like end-of-defun, that works on the ignored expressions (`#_) hidden expressions in cider. I was using end-of-defun` but maybe there's been a change and it doesn't navigate properly to the end of the ignore expression#2021-06-3018:13timvisherCould you be a little more specific about the behavior you're expecting? Like maybe a form
(let [a 1 b 2] |#_(ignored form) (+ a b))
combined with where you expect the cursor to end up post navigation?
#2021-07-0100:07theeternalpulseyes, so in my case I am working on a fn that will evaluation n forms from the current cursor, so say I have my cursor
(defn test-fn |[a] ...)

#_[(test-fn 1)
   (test-fn [])]
I want to first go to the end of the current form and evaluate last sexp, end-of-defun moves the cursor in the right place, after the current form, and I can evaluate fine. When I try end-of-defun again, the cursor ends up here:
#_|[(test-fn 1)
   (test-fn [])]
I expected another end-of-defun to go to the end of that sexp after it, but it skips it and goes to the end of whatever form is after that
#2021-07-0100:08theeternalpulseI can work with just having it not uncommented, and comment it later since I expect to move it to a test area#2021-07-0100:09theeternalpulse
(defun +user/eval-n-defuns (n)
  (interactive "P")
  (save-excursion
    (dotimes (number (or n 2))
      (end-of-defun)
      (+user/run-eval-fun))))
the +user/run-eval-fun just executes which eval to use in which major-mode
#2021-07-0114:02timvisherIt's slightly above my pay grade to decide whether this is a bug in clojure-mode although I would actually expect it is given that this appears to treat ; comments differently than #_ comments as evidenced here
(defn test-fn <|>[a] (+ a 1))

#_[(thing thing) (thing)]

;;; hello world

(defn test-fn [a] (+ a 1))
end-of-defun
(defn test-fn [a] (+ a 1))

#_<|>[(thing thing) (thing)]

;;; hello world

(defn test-fn [a] (+ a 1))
Positioning me improperly just after the #_ reader macro. end-of-defun
(defn test-fn [a] (+ a 1))

#_[(thing thing) (thing)]

;;; hello world

(defn test-fn [a] (+ a 1))<|>
Properly skipping the textual ;;; comment and placing me at the end of the next form. That may be worth reporting as a bug to clojure-mode. I suspect it has something to do with the #_ not being marked with proper comment text properties but again it's a little above my pay grade. :) If I understand your requirements correctly, a workaround option would be to check for #_ before point as you're executing end-of-defun and, if it's there, run end-of-defun until it's not there. That would skip any number of #_ commented forms.
#2021-07-0114:55theeternalpulseAcrually, ideally I want it not to skip, as you can properly cider-eval-last-sexp of an ignored form with cider. The purpose is to have the function you're testing above a commented form of usages of that function for quick feedback when you are developing. Then eventually move those usages to test cases. It's based on a technique I saw a blog about and used ever since. At the time it did work with those ignored forms#2021-07-0115:10timvisherThen test for #_ and run paredit-forword-sexp instead of what I suggested. :)#2021-07-0115:11timvisherYou also may be interested in this discussion. :) https://clojurians.slack.com/archives/C099W16KZ/p1625077166109100?thread_ts=1624974213.101000&amp;cid=C099W16KZ#2021-07-0117:09theeternalpulseThe good thing about my way is it displays the result inline, so if I want to set up a quick case I can see the result rather than "test pass" or "test fail". This helps craft output in a quicker way this was the gist I took it from https://gist.github.com/cstby/0cff1f7eb48eb18c6690e6cdb919ca69#2021-07-0117:10theeternalpulseI was also mistaken, before bounds-of-thing-at-point worked#2021-07-0117:14theeternalpulseeither way, I think I can figure out something for those#2021-07-0118:05timvisher:thumbsup:#2021-07-0114:02timvisherIt's slightly above my pay grade to decide whether this is a bug in clojure-mode although I would actually expect it is given that this appears to treat ; comments differently than #_ comments as evidenced here
(defn test-fn <|>[a] (+ a 1))

#_[(thing thing) (thing)]

;;; hello world

(defn test-fn [a] (+ a 1))
end-of-defun
(defn test-fn [a] (+ a 1))

#_<|>[(thing thing) (thing)]

;;; hello world

(defn test-fn [a] (+ a 1))
Positioning me improperly just after the #_ reader macro. end-of-defun
(defn test-fn [a] (+ a 1))

#_[(thing thing) (thing)]

;;; hello world

(defn test-fn [a] (+ a 1))<|>
Properly skipping the textual ;;; comment and placing me at the end of the next form. That may be worth reporting as a bug to clojure-mode. I suspect it has something to do with the #_ not being marked with proper comment text properties but again it's a little above my pay grade. :) If I understand your requirements correctly, a workaround option would be to check for #_ before point as you're executing end-of-defun and, if it's there, run end-of-defun until it's not there. That would skip any number of #_ commented forms.
#2021-07-1811:21javahippieHi. I am using Emacs on Mac for some time now, and never had any big issues. From the beginning on I had my CMD key mapped as Meta key, so I could use the ALT key to type my parens (I hope that makes sense so far). This still works on the Keyboard of my Macbook itself. I am using the Emacs build for Mac with Doom on top. Evil mode is disabled. Last week I bought myself a new keyboard, and while everything still works on the Mac onboard keyboard, the ALT key behaves differently on the external keyboard (a Keychron K4, if it helps). I can type all types of parens and brackets in my usual texteditors or slack ([]{}, as proof), but Emacs now interprets the ALT key as C-u. I am a little lost where to search and what to configure, does anybody have any pointers for me?#2021-07-1811:34javahippieI think I got it. The keyboard does not have a right option key, just a left option key. I used karabiner to map the left option key to the right option key and now everything works as expected#2021-07-1906:27djmI think there’s a mac/windows switch on the keychrons - is it in the right position?#2021-07-1907:02javahippieIt was, but thanks for the suggestion, that’s also a good thing to check. I changed the keymapping a little bit more now, the right Cmd now works as opt-right, and now everything works as it does on the Macbook.#2021-07-1920:08grazfatherFor the record I was going to say to use karabiner and that it was probably a left vs right alt issue 😄#2021-07-1920:23javahippieAnd you would have been right 😁 Now some new issues cause by Karabiner, but that’s a different topic 😉#2021-07-2007:18JasonHey guys, so I’m new to emacs and I’m coming from a vim background. I’ve install doom emacs and it’s great definitely got me up and going much quicker than I would have otherwise but there is a couple of niggle things I’d still like to change. Ideally I want to change some of the evil mode bindings, swapping ; and : for instance, but emacs seems to have a rather complicated way of setting that up as far as I can tell. Could anyone point me in the right direction?#2021-07-2007:25djmFor Doom, isn’t it a case of putting (define-key! ";" #'whatever) in ~/.doom.d/config.el? (Unless Doom has rebound C-h c, you can use C-h c : to find out what command : is currently sending… otherwise M-x describe-key-briefly, followed by :)#2021-07-2007:25djm(Disclaimer: I have played with Doom a little, but am not a Doom user)#2021-07-2007:27djmOh, I guess it’s different for evil mode stuff, just a second#2021-07-2007:28JasonYeah honestly I have no idea 😅 I’ve been googling for a few hours on it and I’m finding it really hard to just find any definitive way to do it#2021-07-2007:29JasonOr maybe it’s that there is so much information about doing it that I don’t feel confident doing any of them..#2021-07-2007:31djmhttps://github.com/hlissner/doom-emacs/blob/develop/modules/config/default/+evil-bindings.el has
(map! :leader
      :desc "Eval expression"       ";"    #'pp-eval-expression
      :desc "M-x"                   ":"    #'execute-extended-command
...
#2021-07-2007:33djmSo if those are the ones you want to swap, you should be able to copy that into your config.el, and change it#2021-07-2007:33djmThe evil but non-doom way is with evil-define-key, by the looks of it#2021-07-2007:33JasonOkay cool, so how do you figure that out then?#2021-07-2007:34djmHow do you figure out how to use evil-define-key, or..?#2021-07-2007:35JasonI guess what I’m asking is how do you find where the keybindings are defined#2021-07-2007:36JasonSo if I was to do this with a completely unrelated keybinding where would I start to figure out how to rebind it?#2021-07-2007:38djmC-h k (`describe-key`) should tell you where something’s defined#2021-07-2007:39JasonOkay that tells me the function it calls but not the actual binding, right?#2021-07-2007:39djmEvil also provides evil-global-set-key, which is what you want here, I think: (evil-global-set-key 'normal ";" 'execute-extended-command), if you want to use evil’s mechanism, rather than Doom’s#2021-07-2007:40djmdescribe-key should tell you everything#2021-07-2007:41JasonSee this is confusing part with emacs there can be multiple ways to do things 😅#2021-07-2007:41djmIt doesn’t give you the exact elisp, but it tells you the keys, the command, the map, and the file#2021-07-2007:42JasonIs there a way to get the exact elisp?#2021-07-2007:42JasonOr is this just something I’m going to have to struggle with every time#2021-07-2007:42djmOh, sorry, it tells you the file that the command/function is from, not the keybinding#2021-07-2007:43djmYou can probably find that by grepping in ~/.emacs.d#2021-07-2007:44JasonAhh yeah, good plan#2021-07-2007:44djmIn this case there are multiple ways of doing it because you’ve added Doom onto Emacs, and Doom is using evil mode - so you have to learn some combination of emacs, doom and evil mode#2021-07-2007:44JasonI imagine what I’d do is just copy whatever binding I find and replace it how I want it. That is until I start to understand it a little more#2021-07-2007:45djmYeah, it’ll get easier#2021-07-2007:45JasonWell awesome, thank you so much 🙇#2021-07-2007:45djmDoom changes the learning curve, I guess - you get a nice setup out of the box, that’s both easier and harder to customise#2021-07-2007:45djmGood luck!#2021-07-2007:47JasonYeah part of the reason I choose it is that I can get going quicker but I might downgrade later on when I understand things more#2021-07-2015:10grazfatherI really recommend you join the doom discord, they are super helpful over there.#2021-07-2118:35Justin ChandlerHey I've been using emacs for a long time now, and I thought I was pretty good with my hotkeys, but I recently watched the Parens of the Dead tutorial and he does some really crazy wizardry with multi-cursors and all kinds of stuff. What's a good way to get caught up on all those kinds of hidden gems?#2021-07-2214:35grazfatherIt’s tough. I think it’s just by building a habit of finding new features, even by looking at the configs to see the mappings and actively trying to add more into your repertoire#2021-07-2215:08chrisblomThe author also made videos demonstrating these features, see http://emacsrocks.com/#2021-07-2316:58grazfatherAh, that’s reminiscent of vimcasts. I willi have to check those out.#2021-07-2214:35grazfatherIt’s tough. I think it’s just by building a habit of finding new features, even by looking at the configs to see the mappings and actively trying to add more into your repertoire#2021-07-2204:01gammarrayThere’s some good stuff here: https://systemcrafters.cc/videos#2021-07-2210:16JasonCan recommend too, I’m currently going through his videos as I try to get a grip on emacs#2021-07-2208:20tianshuI'm trying to use clojure-lsp in my project. But everytime it will be killed when starting. I think I have enough free memory. Is there anyone ran into the same issue?#2021-07-2210:54furielMaybe an open file limit problem? For example in macOS, the default open file limit is pretty low (256).#2021-07-2212:41ericdalloThat's not a common error, clojure-lsp needs 2GB I think but it uses that only during start not on next runz#2021-07-2301:11tianshuThanks, I'll take a look at open file limits.#2021-07-2301:22ericdalloAlso make sure you are using latest version, maybe try the JVM binary from latest Github release if issues#2021-07-2310:38JasonDoes anyone know if there’s a way to get emacs to open with very basic functionality in order to get a quick startup time for quick terminal text editing?#2021-07-2310:39JasonJust finding that replacing vim with emacs for this workflow is a bit jarring but ultimately would like to stick with emacs if I can#2021-07-2621:19Jakub ŠťastnýIt should be fast enough as long as you don't do (package-refresh-contents) in your init file. If not, use Emacs server and maybe you want to compile Emacs 28 (the development branch) with the native-compilation feature (which is on master now).#2021-07-2914:35JasonIs the native-compilation much faster then?#2021-07-3114:19Jakub Šťastný@U028TA3H3PA Pretty considerably. Still – network requests in the init file is what kills the performance more than anything.#2021-07-2310:40lispycloudsive seen a lot of people use https://github.com/troglobit/mg for this purpose, maybe that helps?#2021-07-2310:50JasonYeah think it’s partially slight differences I have between vim and emacs at the moment and would be less muscle memory to just use one or the other#2021-07-2621:20Jakub ŠťastnýAlso EVIL is very good Vim emulator, the best one I worked with probably.#2021-07-2310:56jkxyzYou can start Emacs as a server process for this: https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html Then running emacsclient will just start a new client on the already-running server instead of launching and initialising a new server#2021-07-2310:57Jasonooo, that sounds like a good option#2021-07-2310:57jkxyzPersonally I also just use vim though 😉#2021-07-2310:57JasonHow do you find going between them then?#2021-07-2310:58JasonDo you not have any issues? I know it’s mainly minor things but I just value consistency#2021-07-2311:01jkxyzI very rarely use vim for anything more than quickly editing shell scripts when I’m already in a shell, or for viewing and searching through large log files (which Emacs seems to struggle with). It hasn’t annoyed me enough to want to setup an Emacs server process#2021-07-2311:03JasonAh fair enough, with regard to the project searching have you tried ripgrep? I’ve heard it’s much faster but haven’t tried it myself#2021-07-2311:03jkxyzYou could also use nano which is a bit more Emacs-y#2021-07-2311:04jkxyzYeah I use ripgrep for project search in Emacs. But when I have a single large log file I don’t want to open it in an Emacs buffer, so I just switch to a shell and open it in vim to search through#2021-07-2311:06JasonYeah that makes sense#2021-07-2311:15jkxyzI’m sure that Emacs is better at handling large files than I give it credit for but I’ve just had it crash too many times, and it happens rarely enough, that I find it easier to just use vim temporarily. There is a mode for tailing log files into a buffer#2021-07-2311:31practicalli-johnOpening in fundamental mode will be a lot faster and better at handling large files, but vim is probably better at this aspect at the moment#2021-07-2311:35jkxyzIs there a built-in function to open a file with only fundamental-mode?#2021-07-2311:45jkxyzMaybe opening read-only and calling fundamental-mode is the way to go. I will try it the next time I need to look at a big file 🙂#2021-07-2421:01practicalli-johnThere is https://www.emacswiki.org/emacs/LongLines mode Using Spacemacs, it also warns about opening big files and can be set to open files over a certain size in a specific mode, i.e fundamental#2021-07-2311:05JasonThink if I can’t use emacs vim would be the way to go for me. I’m only just coming to emacs after a long time with vim so pretty comfortable with it#2021-07-2315:37lukaszI use zile for very quick edits: it has emacs-like keybindings and... nothing else#2021-07-2315:37lukaszbut +1 on emacs-server if it's for local workflow#2021-07-2316:55grazfather+1 on using vim for those use cases#2021-07-2317:03gammarrayThere’s also the option of never leaving Emacs: EXWM. #2021-07-2317:30lukaszwhy stop there? https://www.informatimago.com/linux/emacs-on-user-mode-linux.html#2021-07-2319:51JasonFor a beginner in emacs.. might take me a while to get there 😅#2021-07-2319:59JasonYeah I’m on doom, figured it was easier to start with doom and strip back when I start to get comfortable and definitely seems to be working out#2021-07-2320:07JasonMakes sense, did you use emacs for something other than clojure? I imagine I’ll use it much more for other development more than clojure initially#2021-07-2320:07JasonYeah I’m currently using it for ruby#2021-07-2320:08JasonYeah I wonder how far down the rabbit hole I’ll go#2021-07-2320:08JasonWhether I’ll try to live inside the bubble or not#2021-07-2320:09JasonIt definitely looks tempting#2021-07-2320:12JasonAww don’t say that 😅#2021-07-2320:12JasonThe dream is to only have to use one!#2021-07-2320:13JasonBut in reality yeah I can see that’s always going to be the case#2021-07-2320:15JasonYeah that’s an interesting perspective. I figure if anything is going to come close to replace all other editor for me it’s emacs. Just to do it will require a lot of investment..#2021-07-2320:16JasonEspecially since my day job is an iOS developer#2021-07-2320:16JasonXcode is so behind the curve compared to other editors#2021-07-2320:17JasonYeah last few major releases haven’t been great#2021-07-2320:18JasonYeah it does, I tried it long ago but there’s always something that brings you back to Xcode#2021-07-2320:18JasonEspecially when you work in a team#2021-07-2320:19JasonNo such thing right? aha Once you think you find it, what you do day to day changes#2021-07-2320:19JasonBut yeah I’ll have fun with it either way#2021-07-2320:21JasonYeah wouldn’t want to fall off the tightrope of development to my death 😱#2021-07-2512:36edoHey everyone 👋 while using Emacs, how can I avoid buffer files and specific Emacs’ files to be in my project folders? This is becoming a bit cumbersome as I see them and need to avoid them while using magit / git.#2021-07-2513:14simonkatzI don’t know the answer to your question, but you can set things up so that Git ignores those files in all projects: https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer#2021-07-2515:23narendraj9What do you mean by "buffer files" and "specific Emacs' files"?#2021-07-2517:19edoAs an example, all this tilda files. I could certainly gitignore them but is there any better way of saving these files in a specific folder outside each project folder?#2021-07-2517:19hindolAre you using a pre-configured Emacs distribution similar to Doom/Prelude/Spacemacs etc. I am using Doom and this has never been a problem for me. I think Doom configures Emacs to put all extra files to a special directory and not in the current directory alongside your project files.#2021-07-2517:20edoI’m not using any distro. I’m configuring Emacs from scratch to fit my needs. In the future I might use Doom but for now I think this is a great exercise. :thinking_face:#2021-07-2517:21edoI know Doom handles this out-of-the-box (someone told me, not that I know by experience).#2021-07-2517:21hindolhttps://www.emacswiki.org/emacs/BackupDirectory might be relevant to you.#2021-07-2517:25edoOooh, that’s exactly what I need! Thanks @UJRDALZA5 🚀#2021-07-2517:25edoThis is such a great slack! People really enjoy to help. ❤️ Thanks all!#2021-07-2609:23Kenneth GitereHi I have this weird issue using Emacs. When my cursor is in a (comment) form, Emacs will just freeze and have CPU usage just skyrocket so I end up having to write sample code directly in the repl. Has anyone experienced similar#2021-07-2609:53hindolOne option is to start the profiler, reproduce the issue, hit CTRL-G and then generate the profiler report. What does it show?#2021-07-2610:31Kenneth GitereWell I can't press Ctrl-G since all of Emacs becomes unresponsive#2021-07-2610:32Kenneth GitereI actually have to kill emacs from the terminal rather than using C-x C-c#2021-07-2615:56javahippieI’d try disabling some packages until the issue goes away. When did it first occur, were there some packages installed in that timeframe?#2021-07-2618:22Kenneth GitereI haven't added any new Emacs packages in a really long time (months) so I don't think that's it. I only started using (comment) forms this month so maybe that's the closest I can come to seeing this happen#2021-07-2714:56felipebarrosStill @U01S2SZG5B7, the best workflow is to disable packages to try and isolate which (if any) is triggering the issue. In your previous comment you state that you have only recently began to use (comment), so even if your setup has been working fine, that bug may have been laying dormant all along.#2021-07-2715:08Kenneth Giterealright. I'll probably try it out on a clean instance of Emacs with only LSP and Clojure packages#2021-07-2716:22vemvkill -USR2 $your_emacs_pid should enable the debugger when emacs is frozen. It will display stacktrace of whatever emacs was doing at that point#2021-07-2900:03michieljorisI've had the same issue. Actually only when cursor was on the comment word. Everything freezes for a while, but returns to normal after a bit, while bashing Ctrl-G. I was using doom-emacs with inf-clojure (not cider) and lsp-mode. Now using eglot instead and issue seems to have gone away. It might be the clojure-lsp server returning lots of messages for some reason in response to the hover on comment and locking up single process emacs.#2021-07-3108:53Kenneth GitereGood to know someone else has faced the same issue. I had been considering just moving to VSCode with Calva actually.#2021-08-0215:12solfAnyone making their own clojure snippets? I have a few for some specific clojurescript code I kept repeating, and I just added one for add-libs+find-deps (which act more as a how-to, I keep forgetting their fully-qualified name)
;; snippet definitions, only KEY and TEMPLATE are actually mandatory.
;; (KEY TEMPLATE NAME CONDITION GROUP EXPAND-ENV LOAD-FILE KEYBINDING UUID SAVE-FILE) 
(yas-define-snippets
 'clojure-mode
 '(
   (":d" "[:div $0]" "hiccup div")
   (":p" "[:p $0]" "hiccup p")
   ("f" "#($1 % $0)" "f-shorthand")
   ("ctw" "{:class (tw $0)}" "class-tw")
   
   ("add-libs"
    "
(require '[clojure.tools.deps.alpha.repl :refer [add-libs]]
         '[find-deps.core :refer [query*]])

(:deps (query* $0\"metosin/malli\" \"clojure data.json\"
               {:sources [:clojars :mvn]
                :rank :fuzzy
                :limit 1
                :format :deps}))

(add-libs '{})"
    "add-libs")
   ))
#2021-08-0222:10mpenetYou could try to modify zencoding mode for hiccup#2021-08-0316:01practicalli-johnI have a handful of individual snippet files for Clojure and other modes in my config https://github.com/practicalli/spacemacs.d/tree/live/snippets/clojure-mode#2021-08-0322:10vemvanother one to the list! https://github.com/zenmacs/.emacs.d/tree/master/snippets/clojure-mode my favorite ones are the simplest ones... l (let), - (thread-first). They make coding the right thing easier, which could otherwise feel tedious#2021-08-0511:29Ben SlessThis reminds me I built a package to access the decompiler and redirect the results to a buffer https://github.com/clojure-goes-fast/clj-java-decompiler#usage-from-emacs#2021-08-0514:16vemvnice I built sth similar as well :)#2021-08-0514:20vemvthe snippet is vestigial, I should rm it#2021-08-0419:36ennIs there an existing feature in CIDER and/or clojure mode to quickly copy the fully-qualified name of the symbol at point? I found some suggestions online that cider-symbol-at-point should do this, but for me it only returns the symbol as it appears at point (i.e., it doesn’t add a namespace if there isn’t one in the text and doesn’t resolve ns aliases).#2021-08-0419:41dpsuttonyou could write a small function that would take symbol at point and evaluate
`<symbol-at-point>
in the buffer's namespace
#2021-08-0421:57PBDoes anybody have a modern emacs config available publically? Mine is soooo old and is falling apart. I was hoping to see examples of what's out there?#2021-08-0506:01David VujicThis is the one I use for Clojure/Script, JavaScript/TypeScript and Python: https://github.com/DavidVujic/my-emacs-config#2021-08-0506:04David VujicHere’s a screenshot (grabbed from a blog post of mine): #2021-08-0506:25practicalli-johnhttps://practical.li/spacemacs/ configuration and detailed install and usage guide#2021-08-0508:38tvirolaiI'm using Purcell Emacs configuration: https://github.com/purcell/emacs.d (with some tweaks of my own: https://github.com/tvirolai/emacs.d/blob/master/lisp/init-local.el)#2021-08-0510:09dakraHere's a good overview of good public Emacs configs: https://github.com/caisah/emacs.dz#2021-08-0515:08PBThansk for all the responses!#2021-08-1707:02zackteo@U08UTJ5PB Doom Emacs has been great for me! https://github.com/hlissner/doom-emacs Is great for those using EVIL (vim bindings) but I actually don't and used it with emacs bindings, which works great too!#2021-08-0506:25practicalli-johnhttps://practical.li/spacemacs/ configuration and detailed install and usage guide#2021-08-0510:09dakraHere's a good overview of good public Emacs configs: https://github.com/caisah/emacs.dz#2021-08-0501:17Jakub Šťastný@petr https://github.com/jakub-stastny/dotfiles/blob/master/org/emacs.org It's nothing impressive, I'm a new Emacs user (coming from NeoVim) and I didn't have that much time to make it really good, but it works.#2021-08-0501:18Jakub ŠťastnýNote that the first section, native comp, is available only on Emacs 28 (so the dev version).#2021-08-1004:18solfIs there anything like cider-inspect for emacs-lisp?#2021-08-1012:41ericdalloThere is +lookup/documentation for doom-emacs, not sure what doom uses under the hood though#2021-08-2007:04h0bbithttps://github.com/mmontone/emacs-inspector#2021-08-1004:18solfNow that I got used to CIDER, the elisp tooling feels… subpar#2021-08-1623:29vemvRandom share, this is one of my most effective productivity boosters I've come up with lately https://github.com/zenmacs/.emacs.d/blob/master/scripts/first_diff_line.sh When I open a file it jumps to line $n based on git status or git log. This way I can restore the "context" of what I was working on, quicker#2021-08-1623:30vemvThis is the integration point https://github.com/zenmacs/.emacs.d/blob/f98c95e9bdf77d979b82f5ad6024a6f9ab39d341/lib/non-submodules/vemv.open.el#L7-L21 It plays nicely with another command which I call open-all-git-files . It will open each file displayed by git status So you can open N files with one command and have all of them jump to the right line number in an instant. Feels like magic every time :)#2021-08-1710:35rakyido you know about save-place-mode?#2021-08-1710:40vemvapparently I do because I have (setq-default save-place t) in my config 😇 I was partly happy with save-place and possibly other complementary functionality (desktop.el IIRC?) but ultimately git is the best source of truth for me especially as you change branches - then the right LOC to jump to will vary#2021-08-1712:42gammarrayRad. You may also be interested in this new library for keeping track of where you were working: https://github.com/alphapapa/dogears.el#2021-08-2304:48h0bbitYour .emacs.d is … intimidating to say the least 😄 Bookmarking it to go through it as and when time permits.#2021-08-2304:59vemvhaha, thanks 🌀 as the readme hints, at some point I intended to share it the community... I don't currently, might get back to it a few years from now. I prefer to pick my battles and share .clj work instead#2021-08-2018:16Andreahey today I was trying to set a shadow-cljs connection and cider said something like it could not find the project, so cljr middleware could not work: does it ring a bell to someone? It is so exciting to be on this channel 😄#2021-08-2415:23Andreaokay my bad, I was connecting from the wrong directory. I had a fancy Elisp script with the wrong default-directory#2021-08-2101:11anonimitorafDo you have a project.clj (or equivalent)?#2021-08-2310:17Andreayeah, but it is private because belongs to the company I work for. I can share my user-level deps.edn though:
{ :deps {cider/cider-nrepl                          {:mvn/version "0.26.0"}
        refactor-nrepl/refactor-nrepl              {:mvn/version "2.5.1"}
        org.tcrawley/dynapath                      {:mvn/version "0.2.5"}
        com.cemerick/pomegranate                   {:mvn/version "0.4.0"}
        me.raynes/fs                               {:mvn/version "1.4.6"}}}
I need to connect to an existing repl, that is why I needed to install the extra dependencies myself
#2021-08-2101:20dpsuttonIt’s also possible that your clojure mode is outdated. I believe that is what is aware of project roots and knowledge that shadow-cljs.edn is a project root is a more recent change#2021-08-2306:19bozhidarNot very recent - at least 2 years old. 🙂#2021-08-2310:18Andreaah, thanks for maintaining Cider!!! I was working with Scala before and Cider is just a dream of interactivity 🙂 Congrats for the amazing work!#2021-08-2413:35matheusashtonHello! I'm using doom emacs and recently started to work with clojure, I'm trying to figure it out how to integrate cider in my dev flow, eg: trying to debug code from a unit test. Do you have some article about that, or could you describe how do you do?#2021-08-2413:41djmDocumentation around debugging can be found here: https://docs.cider.mx/cider/debugging/debugger.html#2021-08-2413:42djmThe extra short version is that if you compile a defn with C-u C-c C-c or C-u C-M-x (instead of C-c C-c or C-M-x), it’ll instrument it, and when you run your tests it’ll break when that function is called#2021-08-2415:57practicalli-john@U8C850K42 example of using cider-debugger with Emacs (its Spacemacs, but it includes the full command, so should be applicable) https://practical.li/spacemacs/debug-clojure/cider-debug.html#2021-08-2415:58matheusashtonI'll take a look at those, thank you!#2021-08-2508:10PatrixAnybody using the emacs or vscode flatpak? I’ve done some experimentation and managed to get clojure, doom and a few tools up and running, using the emacs flatpak + a few sdk extensions (openjdk11, rust-stable, node14) I’m sure I’m not the first one to use this or to manage this, so before I duplicate any existing work, I’d like to know if others have setup and documente this, or even worked on some clojure sdk extension for flatpak?#2021-08-2706:10Patrixdiscussions here in #vscode so far no one has raised their hand saying they've tried, so I'll go ahead and document what I've done so far and then try to figure out how to make flatpak extensions https://clojurians.slack.com/archives/C6H9FUNET/p1630031327001800#2021-08-2612:35AndreaAnother question about cider: is there a way to make go-to-symbol understand hiccup's operators? In my setup it always go to the clojure > or < definitions XD#2021-08-2613:44vemvwhat would be an example of symbol (keyword?) you want to jump to?#2021-08-2616:04Andreafor example :<>#2021-08-2616:04Andrea(it would be cool to get autocompletion also for javascript libraries by the way, but I think it is unlikely it is supported)#2021-08-2616:41vemvI don't think there's support for unqualified keywords. Because a helper like the following:
(defn my-helper [foo bar]
  [:<> foo bar])
could be concerned with Hiccup just like it could be with honeysql, or anything else really
#2021-08-2616:45vemv> (it would be cool to get autocompletion also for javascript libraries by the way, but I think it is unlikely it is supported) I don't know the exact status of things nowadays, but it seems possible to me. With modern javascript one can have stronger expectations than 10y ago#2021-08-2711:14AndreaI shall check into that and report if I find something myself#2021-08-3118:27afleckI’m running into an issue with indentation and threading macros, as they are specified as having 1 special form, but fairly often we’re threading things into threading macros, usually with cond->, like
(cond-> x
  :always inc
  (even? x) (cond->
                (< x 10) (* 2)
                :else (+ 5)))
so the second cond-> has no special form. the indent on the second cond-> looks kind of unpleasant and cljfmt complains about it (suggesting a 1-space indent which is inconsistent with the first cond->) my setup indentation-wise is stock clojure-mode/`cider` as far as i can tell. an indent specification of (cond-> :defn) looks a bit better:
(cond-> x
  :always inc
  (even? x) (cond->
              (< x 10) (* 2)
              :else (+ 5)))
but cljfmt still complains about this, saying the indentation on the second cond should be 1 space. so is there an accepted style for things like this? and a way to get clojure-mode and cljfmt to play nicely together?
#2021-08-3119:08vemv> so is there an accepted style for things like this? avoidance :) https://stuartsierra.com/2018/07/06/threading-with-style#2021-08-3119:11afleckah i’ve been looking for something like this, thank you. my suspicion was that theres a better idiom#2021-08-3119:05pezhttps://soundcloud.com/armincerf/the-holy-war#2021-09-0121:42agIt's been a while since I've done any re-frame related work. For some reason imenu stopped working. Can someone tell me why I can't get re-frame subs and regs in there? This snippet used to work:
(defun add-reframe-regs-to-imenu ()
  (add-to-list
   'imenu-generic-expression
   '("re-frame" "(*reg-\\(event-db\\|sub\\|sub-raw\\|fx\\|event-fx\\|event-ctx\\|cofx\\)[ \n]+\\([^\t \n]+\\)" 2)
   t))

(add-hook 'clojurescript-mode-hook #'add-reframe-regs-to-imenu)
but not anymore
#2021-09-0121:48agHa, it looks like lsp messing it up, re-setting imenu-create-index-function#2021-09-0320:09Edward CiafardiniHey everyone, having an issue with emacs on Mac OS. context: system: Mac OS Big Sur 11.5.2 emacs: ver. 27.2 issue: After running the command package-list-packages, I am getting the following error message
(fn STATUS)]: Error retrieving:  (error connection-failed "connect" :host "" :service 443)

error in process sentinel: Error retrieving:  (error connection-failed "connect" :host "" :service 443) [2 times]
I found someone having a similar issue without resolution here (from 7 days ago): https://emacs.stackexchange.com/questions/68288/error-retrieving-https-elpa-gnu-org-packages-archive-contents Any help would be greatly appreciated!
#2021-09-0321:03vemvone thing you can try is running Emacs 25, 26, 27 from https://emacsformacosx.com/builds/all it could be an openssl thingy? By trying different builds you might be exercising different SSL stacks#2021-09-0321:04vemvalso emacsformacosx is notably clean/minimalistic#2021-09-0321:29Edward CiafardiniThank you for the suggestion - I found a solution on Reddit & wanted to post it here in case anyone is going thru a similar issue… I fixed it by adding `(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")`  to my custom.el under .emacs.d/personal I cannot say I have any idea why this worked.  A redditor provided the solution saying it was a race condition issue with v27#2021-09-0610:01andrea.crottihow do people deal with resolving conflicts with Emacs? for example I use smartparens-strict-mode and when I open a file with conflicts I always have to disable that#2021-09-0610:02ribelomagit & ediff#2021-09-0610:06vemvI solve them by "force-deleting" lines for example for the conflict
>>>
a
===
b
<<<<<
I force-delete all lines but b Works pretty well for most conflicts I get. Sometimes I might have to do some surgical edits. At least under my setup paredit doesn't get in the way i.e. it can keep working even in face of slightly broken code
#2021-09-0610:09vemvmy force-delete isn't particularly fancy
(defun vemv/delete-this-line ()
  (end-of-line)
  (cua-set-mark)
  (previous-line)
  (end-of-line)
  (call-interactively 'kill-region))
#2021-09-0610:10andrea.crottiactually I just found out that by default smerge-mode is already enabled#2021-09-0610:11andrea.crottiwhen I open a file with conflicts, so I can probably just use that (have to try if smartparens is happy with that though)#2021-09-0610:12andrea.crottithe only issue I guess is that the keybindings are a bit weird, I think it would be nicer if it just opened a read only buffer with simple keybindings to do the various actions#2021-09-0610:12andrea.crottibut I guess I can do it myself with the right mapping#2021-09-0610:13andrea.crottithere are some more rare cases in which I have to actually merge manually changes from the two versions, but I guess I can just first pick one and then apply the manual changes#2021-09-0610:17djmYou could just M-x turn-off-smartparens-mode until you’ve sorted the conflicts#2021-09-0610:17djmThen M-x enable-paredit-mode afterwards 😉#2021-09-0610:17andrea.crottiyeah I know, which is what I've done until now#2021-09-0610:17andrea.crottibut it's quite annoying#2021-09-0610:19andrea.crottithere is also a magit-diff-mode-hook I could probably use#2021-09-0610:19andrea.crottito turn it off automatically otherwise#2021-09-0610:21andrea.crottimm actually maybe that's something else though#2021-09-0610:21djmThat sounds like it should work.#2021-09-0610:27andrea.crottiyeah no I don't think it opens the file in magit-diff-mode actually#2021-09-0610:27andrea.crottithat's the mode to look at diffs#2021-09-0610:27andrea.crottibut I can maybe add a hook to smerge-mode since that's enabled#2021-09-0705:35pavlosmelissinos> [...] you could use Ediff, which uses separate buffers for the different versions of the file. To resolve conflicts in a file using Ediff press e while point is on such a file in the status buffer. > From the magit manual https://magit.vc/manual/magit/Resolving-Conflicts.html I've tried smerge but didn't like the ergonomics as much#2021-09-0713:52andrea.crottiyeah I could try ediff again#2021-09-1011:30JasonI’m just using smerge on mine and setting some shortcuts to use them
:leader
    "g n" #'smerge-next
    "g <up>" #'smerge-keep-upper
    "g <down>" #'smerge-keep-lower
    "g <left>" #'smerge-keep-all
#2021-09-1011:30JasonI do use doom emacs so configuration might be different for you#2021-09-1011:33andrea.crottiah cool @U028TA3H3PA,does it mean your buffer is also read only?#2021-09-1011:35JasonHmm not sure if it is read only or not :thinking_face:#2021-09-1011:36JasonI think it’s likely to be read/write#2021-09-1011:36JasonI’ll double check#2021-09-1011:37JasonAre you relying on it being read only?#2021-09-1011:41JasonIt’s definitely read/write for me and that’s probably beneficial as it’s often I have to resolve the conflicts somewhat manually at times#2021-09-0610:02andrea.crottiI guess it would be nice to just have a different mode to solve conflicts, or just automatically disable things that get in the way#2021-09-0915:51pabloreI would be nice to have something like autochrome for solving conflicts specific for clojure files https://github.com/ladderlife/autochrome#2021-09-0917:27andrea.crottiMm yeah would be nice#2021-09-0917:27andrea.crottiWell I guess being able to show the structural diff would be nice#2021-09-1112:23witekHi. I am using Spacemacs with CIDER. When I cider-eval-sexp-at-point the output is printed after the expression and in the minibuffer. When I move the cursor, the output is gone. How do I capture the output into the "clipboard"?#2021-09-1112:37pavlosmelissinosNot exactly what you've asked for but there's cider-eval-last-sexp-and-replace which replaces the expression it evaluates with the result. The pointer has to be right after the expression. e.g.
(some-fn a b)
(+ 1 1)|
(another-fn x y z)
becomes
(some-fn a b)
2|
(another-fn x y z)
#2021-09-1113:38witekIsn't there an emacs command which captures the text in the minibuffer?#2021-09-1114:53practicalli-johnNot quite what you asked, but SPC m e ; evaluates an expressions and returns the result as a comment. This result can also be pretty printed using SPC m e p ;#2021-09-1114:57practicalli-johnhttps://practical.li/spacemacs/evaluating-clojure/#2021-09-1115:00practicalli-johnAnother approach is to have keep the cider-inspector window open. Each new evaluation will show the result in the inspector window, which can then be copied from https://practical.li/spacemacs/evaluating-clojure/inspect.html#2021-09-1207:04BenjaminIf you just want to always also kill (copy) the output it is easy (defadvice cider--display-interactive-eval-result (before my-cider-kill-result-adv (value &optional point) activate) (kill-new value))#2021-09-1207:11Benjamin
(defun my-cider-eval-last-sexp-and-kill ()
  "Evaluate the expression preceding point and kill the result."
  (interactive)
  (cider-interactive-eval nil
			  (my-cider-eval-kill-handler)
                          (cider-last-sexp 'bounds)
                          (cider--nrepl-pr-request-map)))


(defun my-cider-eval-kill-handler ()
  (nrepl-make-response-handler
   (current-buffer)
   (lambda (buffer value)
     (message "Copied %s as kill" value)
     (kill-new value))
   (lambda (_buffer out)
     (cider-emit-interactive-eval-output out))
   (lambda (_buffer err)
     (cider-emit-interactive-eval-err-output err))
   '()))
#2021-09-1216:11eccentric JIs there a variable clojure-mode uses to point to the source paths? I've added src/client to my source paths but ever ytime I create a file, it prefixes the auto-generated ns with client.* when that should not be there.#2021-09-1216:31ericdallothis is done by clj-refactor , I'm not sure though how to change that, only disable it :/#2021-09-1216:31ericdalloif you are using clojure-lsp , you can disable that and use from clojure-lsp if you want#2021-09-1216:32ericdallomore details https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#refactorings, check `Conflict with clj-refactor when creating new files`#2021-09-1308:31yuhancheck out the function cider-expected-ns#2021-09-1308:13LukasHey, for a while now, Emacs opens the Cider-result buffer at the bottom like this |                                 | |                                 | | _______________ | |   C-c C-p result      | I would really like to get my old default back: open the buffer on the right side |           | C-c C-p | |           | results   | |           | here       | I already ask in #beginners and tried https://stackoverflow.com/questions/7997590/how-to-change-the-default-split-screen-direction and also popwin with (push '("cider-result" :noselect t :position right :width 90) popwin:special-display-config)` but couldn't resolve the Issue.#2021-09-1308:17anonimitorafDo you use doom-emacs by any chance?#2021-09-1308:17Lukasyes I do#2021-09-1308:19anonimitorafTry
(set-popup-rules!
  '(("^\\*cider-result"
     :quit nil
     :side right
     :size 90
     :select nil
     :modeline t)))
#2021-09-1308:19Lukasthis worked#2021-09-1308:19Lukasthanks a lot#2021-09-1308:19Lukas:hugging_face:#2021-09-1309:51rafalwany hints for non doom-emacs users?#2021-09-1312:35anonimitorafSorry, I don't know. Maybe try reverse engineering set-popup-rules! if you have time#2021-09-1422:48sova-soars-the-soraSo my nrepl hangs and then if I hit enter it shows me
nil>
#2021-09-1422:48sova-soars-the-soraHow can I check the cider version ?#2021-09-1501:11lispers-anonymousI don't know about your nrepl problem, but you can check the cider version with M-x cider-version#2021-09-1501:16kpavI believe had some similar issues when I was getting my environment initially set up -- my system was using an old version of java#2021-09-1713:43cp4nNoob question: Been learning Emacs (Prelude) alongside Clojure. I have more experience with other editors but enjoying Emacs. However, in VS Code for example, when you sit you cursor on a function/method it will display things like definition and what types of arguments it takes. Or when suggesting autocomplete options it will know all possible functions from an imported library, not just the things you have already used in the currently open file. Does Emacs do these sorts of things too?#2021-09-1713:52solfYes, you can head over to #cider or #lsp (or both)#2021-09-1713:52solfhttps://docs.cider.mx/cider/index.html#2021-09-1713:52solfIncidentally, CIDER’s maintainer is the author of Prelude#2021-09-1714:03cp4nOh cool, I had no idea. Thank you#2021-09-1714:42pavlosmelissinosLike @U7S5E44DB said it's possible, e.g. this is what it looks like for me#2021-09-1714:48ericdalloTake a look later on https://clojure-lsp.io/features/ :)#2021-09-1715:05anonimitoraflsp-ui-peek for something like this#2021-09-1715:10pavlosmelissinosFor core functions there's also cider-clojuredocs, which opens the function's clojuredocs page on a separate buffer! (I'm not a huge fan of pop-ups)#2021-09-1715:55cp4nThis is all exactly what I was looking for - thanks everyone!#2021-09-1719:00practicalli-johnCider will understand your functions when they are evaluated in a running REPL, then Cider will show docs and arguments, etc LSP runs a process to continually analyse the project source code, providing many IDE style functions and information. So you can use Cider by itself, or add Clojure LSP to complement#2021-09-1719:01practicalli-johnThere are a number of videos of Emacs in action at https://practical.li/spacemacs/#2021-09-1719:40cp4nahh I see. Doesn't look like Prelude has clojure-lsp already. The Prelude docs mentions it as a Cider alternative but says you can use alongside it as well#2021-09-1721:14vemvCIDER (or what have you) with https://company-mode.github.io/ is such a nice experience#2021-09-1902:22ccannmy LSP settings work for every other language I write, but with Clojure the function signature is not shown in the minibuffer (via eldoc?) when I type, e.g. (filter | (the bar being my cursor). Does anyone have this working? I’m using Doom emacs and I have the same issue regardless of CIDER being enabled or disabled#2021-09-1902:37ericdalloit's a cider conflict, because cider uses eldoc as well#2021-09-1902:37ag@U0BAS2E13 what's lsp-eldoc-enable-hover value set to?#2021-09-1902:38ericdalloyou can (setq cider-eldoc-display-for-symbol-at-point nil) to disable cider one
#2021-09-1902:38ericdalloor (setq lsp-eldoc-enable-hover nil) to disable lsp one#2021-09-1902:39ccannI disabled CIDER from using eldoc: cider-eldoc-display-for-symbol-at-point nil#2021-09-1902:39ccannbefore I posted the question, I mean#2021-09-1902:40ericdalloDid you try restarting emacs after changing the var as the mode probably was already enabled?#2021-09-1902:40ccannlsp-eldoc-enable-hover is ’t#2021-09-1902:40ericdalloThis is how I do that in my doom-emacs: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L77#2021-09-1902:40ccannyeah I did, I’ve confirmed that all the intended config values are set#2021-09-1902:41ericdalloif you hover over (filte|r not (filter |) , does it works?#2021-09-1902:42ccannuh yeah actually.. interesting#2021-09-1902:43ericdalloprobably a lsp-mode or clojure-lsp bug, as it doesn't find any element on the empty space#2021-09-1902:43ericdallomost probably a clojure-lsp one#2021-09-1902:43ccannhmm. doesn’t it seem like this would be the kind of thing that a lot of people would run into if it were a bug?#2021-09-1902:44ccannnot to say it isn’t, I guess I just assumed it was some mess of configuration from different sources (doom, me, clojure-lsp, cider) breaking it#2021-09-1902:46ericdallonot sure, most people use the signature from hovering function only, I think I already noticed that bug before, just didn't dive into it to fix it#2021-09-1902:47ericdalloFeel free to open an issue on clojure-lsp so I can take a look later#2021-09-1903:02ccannhttps://github.com/clojure-lsp/clojure-lsp/issues/569#2021-09-1903:02ccannthanks for the help#2021-09-2421:30ag@UKFSJSM38 I've noticed that when lsp-eldoc-enable-hover t, eldoc doesn't show arguments for the function, only the function name. Why is that?#2021-09-2421:31ericdalloyou need to enable show-docs-arity-on-same-line?https://clojure-lsp.io/settings/#2021-09-2421:34agwhy is it false by default though?#2021-09-2421:35ericdallobecause for other editors like vim this is better, I'm making the default for emacs lsp-mode right now#2021-09-2421:36ericdallohttps://github.com/emacs-lsp/lsp-mode/commit/301c0899177d7d7a4ce7be43ff3dce0f5201057f#2021-09-2421:39agAh, wow. Yeah, now it makes sense. For a second I've forgotten that you have to handle not just Emacs, but other worlds as well. Makes me appreciate the enormous amount of work that goes into it.#2021-09-2421:43ericdallothank you :)#2021-09-2421:56agI mean, seriously - I don't even understand how we all have lived doing Clojure without just being able to open a file and start introspecting the code off the bat. lsp is a such big game changer. You and the people like @yyoncho are my heros. Thank you for fanatically, painstakingly, and tirelessly making the world a better place.#2021-09-2422:02ericdallohaha thank you! Really glad to hear that 😄#2021-09-1914:54ericdallo#2021-09-2112:29bherrmannfyi (bare bones is)
$ cat ~/.emacs
(require 'package)
(add-to-list 'package-archives '("melpa" . "") t)
(package-initialize)
(setq package-selected-packages '(clojure-mode lsp-mode cider lsp-treemacs flycheck company))
(when (cl-find-if-not #'package-installed-p package-selected-packages)
  (package-refresh-contents)
  (mapc #'package-install package-selected-packages))
(add-hook 'clojure-mode-hook 'lsp)
(add-hook 'clojurescript-mode-hook 'lsp)
(add-hook 'clojurec-mode-hook 'lsp)
(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024)
      treemacs-space-between-root-nodes nil
      company-minimum-prefix-length 1
      lsp-lens-enable t
      lsp-signature-auto-activate nil
      ; lsp-enable-indentation nil ; uncomment to use cider indentation instead of lsp
      ; lsp-enable-completion-at-point nil ; uncomment to use cider completion instead of lsp
      )
#2021-09-2112:30ericdalloYou need to tell lsp-mode what is the project root, you can fix it with lsp-workspace-folders-remove and then lsp again#2021-09-2112:33bherrmannI tried removing my .emacs.d directory ... that caused a lot of melpa downloads. Now it is prompting about importing a project. So I think it is better.#2021-09-2112:34borkdudeIt worked for me#2021-09-2112:34borkdudeIf I added lsp-clojure-custom-server-command '("/Users/borkdude/Dropbox/bin/clojure-lsp")#2021-09-2112:34borkdudewhich is where I have the binary#2021-09-2112:35borkdude#2021-09-2112:35bherrmannYea, I think it was loading clojure-lsp - but it wasnt prompting about the project root.#2021-09-2112:38bherrmannit is now working on my bb project too. Nifty!#2021-09-2123:48bherrmannWhat color scheme was used in the video?#2021-09-2123:49ericdallodracula: https://github.com/dracula/emacs#2021-09-2123:49bherrmannThx!#2021-09-2123:52bherrmannWow thats quite a story about the theme.... https://draculatheme.com/about#2021-09-2123:54ericdalloyeah, My whole OS use that theme for almost everything :) https://github.com/ericdallo/dotfiles#dotfiles#2021-09-2112:30borkdudelemme try#2021-09-2321:07ericdalloEmacs running on web using Gitpod with lsp-mode already installed wow https://gitpod.io/#ORG=clojure-lsp,PROJECT=clojure-lsp/https://github.com/yyoncho/lsp-gitpod Ref: https://github.com/emacs-lsp/lsp-mode/issues/2845#issuecomment-926154392#2021-09-2323:55agIt cranked gears for over a minute... I have patiently waited at first, but then I got impatient and hit Refresh. It kept doing something and then finally opened... VSCode.#2021-09-2323:56ericdalloyou need to enable popup to open emacs in a new window It's not the final product, it's already incredible it's running fine on web :) Improvements will come in the future#2021-09-2323:57agoh, shit... it did open Dired. That's cool#2021-09-2715:54ericdallohttps://www.youtube.com/watch?v=nXRmMO_Rkuo#2021-10-0507:00David PhamDo you think they will open source this? 🙂#2021-10-0512:34ericdalloWhat exactly? The gitpod itself?#2021-10-0517:16David PhamThe emacs extension. I would love to have emacs in the browser from a ssh machine in some situation xD#2021-10-0517:17ericdalloit's open source already the extension: https://github.com/emacs-lsp/lsp-gitpod#2021-10-0605:56David PhamHow do you run it haha?#2021-10-0612:10ericdalloOh you mean locally? yeah only via the docker images on the project or via gitpod, I can't see another way :/ Maybe you can open an issue to make clear those options?#2021-10-0713:48David PhamThanks :) I started the conversation. My use case is that I can’t get ssh into a machine but the other ports are open… so xD#2021-09-2815:15Janne SauvalaDoes someone has any idea what is happening with projectile, I try to use projectile-find-file but then I get this (caught this with debugger on)
Debugger entered--Lisp error: (file-missing "Setting current directory" "No such file or directory" "/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  call-process-shell-command("git submodule --quiet foreach 'echo $displaypath' ..." nil (t "/var/folders/bt/6tw4mxlj39b0184334ghrf980000gp/T/s..."))
  shell-command("git submodule --quiet foreach 'echo $displaypath' ..." t "*projectile-files-errors*")
  projectile-files-via-ext-command("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28..." "git submodule --quiet foreach 'echo $displaypath' ...")
  projectile-get-immediate-sub-projects("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  projectile-get-all-sub-projects("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  #f(compiled-function (s) #<bytecode -0x14160e27c49d5a72>)("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28...")
  mapcar(#f(compiled-function (s) #<bytecode -0x14160e27c49d5a72>) ("/Users/janne.sauvala/Dev/mz-dse/\33]4;0;rgb:28/28/28..."))
  projectile-get-all-sub-projects("/Users/janne.sauvala/Dev/mz-dse/")
  projectile-get-sub-projects-files("/Users/janne.sauvala/Dev/mz-dse/" git)
  projectile-dir-files-alien("/Users/janne.sauvala/Dev/mz-dse/")
  projectile-project-files("/Users/janne.sauvala/Dev/mz-dse/")
  projectile--find-file(nil)
  projectile-find-file(nil)
  funcall-interactively(projectile-find-file nil)
  command-execute(projectile-find-file)
I wonder what is causing that \33]4;0;rgb:28/28/28 to appear to the path
#2021-09-2815:16Janne SauvalaI did check projectile issues but didn’t see any obvious duplicates. I’m asking here before opening a new issue.#2021-09-2815:17lukaszThat looks like a terminal escape sequence - this is a wild guess, but perhaps your shell init file is always injected and prints something to the output? Depending on the tool used for find-file you might get some colors printed, when it shouldn't be#2021-09-2815:25Janne SauvalaGood point, let me investigate that…#2021-09-2817:27Janne SauvalaMy shell init file calls a plugin to set a theme for the shell and it causes those to be printed. Thanks for the hint!#2021-09-2817:34lukasz🙌#2021-09-2817:35lukaszI have something like this in my bashrc: https://github.com/lukaszkorecki/command-center/blob/master/etc/bashrc#L7-L12 - so you can keep old behavior for interactive sessions only#2021-09-2818:28Janne SauvalaLuckily that did the trick. I had to also disable also starship prompt since it was spamming “not supported” message in Emacs shell
if [ "$TERM" != "dumb" ]
  base16-gruvbox-dark-medium
  starship init fish | source
end
#2021-10-0104:12sova-soars-the-sorathe documentation for how to use emacs is an unending source of irritation 😄#2021-10-0104:12sova-soars-the-soraAnd when asking very straightforward questions someone links me to documentation pages instead of just telling me the actual command to use -> internal screaming volume max.#2021-10-0106:23pavlosmelissinosThat hasn't been my experience but I'm lucky enough to have people in my team that have been using emacs for far longer than I have. Can you share a recent example of something that you struggled with? Maybe you're missing a part of the puzzle (I've been there, especially before I discovered stuff like describe-function , describe-key, org-insert-structure-template ).#2021-10-0107:18anonimitorafYea I think that's how I initially thought too. After writing 2-3 (small) emacs packages, I feel like it's actually quite intuitive to do what I need to do#2021-10-0107:35David VujicI learned most of the basic stuff from the excellent book Clojure for the Brave and True, and this chapter about Emacs with clojure https://www.braveclojure.com/basic-emacs/#2021-10-0107:51David VujicThe config in the brave-repo is a bit outdated though. 👋 if you want some ideas on how to configure emacs#2021-10-0115:50respatializedmy biggest pet peeve about emacs-related docs or Q&A is when the default keybindings for a function are listed without the according function name. I don't want a pointer storing the location of the answer on someone else's system, I want the answer!#2021-10-0104:12sova-soars-the-sora</unpopular opinions>#2021-10-0113:40solfI’ve used emacs for 10 years now, I’ve never been able to RTFM from A to Z, like people have told me to do in the past#2021-10-0208:10vemvthat was pretty dubious advice anyway, the Emacsy way is querying doc interactively as you go#2021-10-0113:40solfit’s just… a lot. And having your expectations challenged every 5 minutes (because emacs and emacs-lisp predates a lot of “modern” designs) is tiring#2021-10-0418:05vemvcan Spacemacs users update a given already-installed package to its latest MELPA snapshot version? e.g. stuff from popular layers - cider.el, clj-refactor.el from a quick googling it appears that the process is the same as in vanilla Emacs (`rm -rf ~/.emacs.d/elpa/<package>`, let Emacs re-fetch $latest on startup), although I might have read outdated info. (asking for a friend)#2021-10-0507:04practicalli-johnYes, if that package is part of a layer or listed in the dotspacemacs/additional-packages section of spacemacs.el. When Emacs is restarted, Spacemacs will check the packages are there and if one is missing it will download the latest Melpa package. It is also possible to pin particular package versions, typically using an Emacs package recipe in dotspacemacs/additional-packages Or just update all packages with newer versions using SPC f e U and restart Emacs with SPC q r#2021-10-0508:12vemvThank you!#2021-10-0614:42danielgrosseNot Clojure but emacs related. I often get Too many files opened errors after a while. I already enabled the server mode on MacOS but this didn't helped. Do you know some solutions for this? How can I see what files Emacs has opened?#2021-10-0614:46vemvwhen you command + click a buffer don't you see this contextual menu? it shows all open files, grouped per mode#2021-10-0614:46vemv#2021-10-0619:30danielgrosseI can switch to the buffer menu but there are only the opened buffers visible. I have the assumption that LSP is opening files in the background which is not visible there. For example when I open a PHP file there is a warning about watching the whole folder will reduce the speed of emacs.#2021-10-0708:20vemvmaybe this rings a bell for #lsp folks#2021-10-0708:21vemvI'd be inclined to say that if a buffer has been opened by Emacs then it's visible in that contextual menu if it's LSP that it's doing the opening, that's an external process, so Emacs won't be exactly aware of those files#2021-10-0801:11onetomcan anyone recommend me clojure source code formatting/indentation settings for mixed intellij/cursive and emacs/cider(/clojure-mode) teams? lot of discussions has happened about it here: https://github.com/bbatsov/clojure-style-guide/issues/126 but no conclusion seems to be reached yet. there is also tonsky's radically simpler solution https://tonsky.me/blog/clojurefmt/ which can already been achieved via cursive's Default to Only indent + Force Only Indent for all forms setting (https://twitter.com/CursiveIDE/status/1070984513163997189) i couldn't reproduce this simplified indentation in emacs, but i would be happy with any kind of auto-format-setting combinations, which yield equivalent results across these 2 specific environments. #2021-10-0801:17onetomi've considered using some external auto-formatter, like cljstyle tried it with the options recommended here: https://bogoyavlensky.com/blog/clojure-formatting-cljstyle/ but it was not completely adhering to the simple tonsky-style, so i had to tweak it, which was a pain because it's based on cljfmt, but diverged from it. anyway, the options are summarized here: https://github.com/greglook/cljstyle/blob/main/doc/configuration.md and these settings - almost - worked for me:
$ cat .cljstyle                         
{:rules
 {:indentation
  {:indents
   {#"^:?require$" [[:block 0]],
    #"^:?import$" [[:block 0]],
    #"^:?use$" [[:block 0]],
    #"^[^ \[]" [[:inner 0]]}},
  :vars {:enabled? false},
  :functions {:enabled? false},
  :namespaces {:enabled? false},
  :blank-lines {:trim-consecutive? false
                :insert-padding? false}}}
(:time-consecutive? and :insert-padding? r my additions)
#2021-10-0801:18onetombtw, cljstyle can be integrated with this small package:
(straight-use-package
 '(cljstyle-mode :host github :type git :repo "jstokes/cljstyle-mode"))
#2021-10-0801:19onetomand here is a direct link to it: https://github.com/jstokes/cljstyle-mode#2021-10-0801:24onetomFinally, I also realized that one thing is the full document (or only lines changed compared to version control) formatting but there is an other formatting, which is happening in a more localized way, during editing, which only affects the current or next line or the current lisp form. this latter feature is commanded by completely different code, with different rules. think of stuff like tab-always-indent, Electric Indent (https://www.gnu.org/software/emacs/manual/html_node/emacs/Indent-Convenience.html) minor mode, C-M-q (`indent-sexp`, or indent-pp-sexp), indent-region, indent-code-rigidly, clojure-align, clojure-indent-region, etc. These features are exposed in different places in the different Emacs "distros", so i've noticed that users are not even aware of what package is providing the underlying functionality.#2021-10-0801:25onetomin summary, please HELP! 😄 by sharing your experience and settings#2021-10-0813:07vemvcljfmt very nearly matches emacs (clojure-mode) and is actually used by cider (cider-format) One certainly can make Cursive like cljfmt-like natively Both emacs and cursive will need the occasional tweak to satisfy cljfmt. I think that's normal - it's bit of a fool's errand to try independent parties/technologies to agree on the same exact formatting rules So an external process such as cljfmt is a simple 'arbiter' :)#2021-10-0813:09vemvcljfmt has a native image if you're into that sort of thing. You can also invoke it from a repl for avoiding startup time. cljstyle is a fork of cljfmt, IMO that wasn't classy and whatever it provides should be created as PRs against cljfmt if we want to keep the community simple instead of more fragmented.#2021-10-0813:10vemv(dubious) source: I help out maintaining cider, have contributed to cljfmt and also have authored a little framework for running formatters.#2021-10-1005:26onetomthank you for the insights! what formatter framework are you referring to? this one: https://github.com/nedap/formatting-stack/ ?#2021-10-1007:55vemvhaha, yes when I authored it we had a mixed Cursive - Emacs team. worked well for us, it remains in use at that company and a few others. I'm not exactly promoting it yet though, there are things that could be made easier (@UHJH8MG6S is adding a plugin-like system to it, inspired by Kaocha)#2021-10-0812:53ericdalloIs there any command or something that move a pair or key and value of a map up and down? 🧵#2021-10-0812:54ericdalloConsidering | the cursor, running the command moving down for:
{:a 1
|:b 2
 :c 3}
would result on:
{:a 1
 :c 3
|:b 2}
#2021-10-0812:57ericdalloI found cljr--move-line-down that works perfectly#2021-10-0812:57ericdalloand cljr--move-line-up#2021-10-0813:00ericdalloprobably a clojure-lsp command for that would be cool as well for other editors :)#2021-10-0813:04djmI was going to suggest move-text-line-down (and up) from the move-text package. Not Clojure-aware, but I often find cljr slow and/or surprising. Great if it works well for this though.#2021-10-0813:05ericdalloactually, cljr doesn't work quite well if the pair is on the end of the map :(#2021-10-0813:05ericdallolike moving up this:
{:a 1
 :b 2
|:c 3}
will result in
{:a 1
|:c 3}
 :b 2
:(
#2021-10-0813:05djmOh, sorry, move-text-up is line or region, so probably works better than the line version#2021-10-0813:06ericdalloyeah, I was searching for something that doesn't need a region, just get the current cursor#2021-10-0813:10djmI tried using mark-sexp a couple of times, followed by move-text-up, and the result wasn’t pretty - both pairs ended up on the same line, with the closing } on the line below.#2021-10-0813:12djmI wonder if there’s a way to figure out how many sexps end on the current line, and slurp that many times#2021-10-0813:13ericdallothat looks easier to do with rewrite-clj, that's why I think adding that support for clojure-lsp would be useful#2021-10-0813:16djmmark-sexp x2, then sp-transpose-hybrid-sexp seems to work#2021-10-0813:17djmFor moving up from the end, anyway. I’m not sure how to generalise it though.#2021-10-0813:19ericdalloYeah, it works, thanks for the help :) I'll probably implement that on clojure-lsp later anyway#2021-10-0816:09yuhanPaxedit has a command paxedit-transpose-forward / backward that implements this in maps and let bindings#2021-10-0816:10ericdallogood to know thks @UCPS050BV!#2021-10-0816:16yuhanI've had mixed results trying to integrate it into my workflow though, paxedit's conventions about cursor placement just aren't very intuitive when used with other structured editing modes - it probably works well if you adopt their entire editing paradigm#2021-10-1005:43onetomim using this feature too, often enough in cursive to really miss it from emacs 🙂 never heard about paxedit before, thanks for mentioning it!#2021-10-1018:12David PhamDid you see this? https://emacs-ng.github.io/emacs-ng/#2021-10-1018:13David PhamMaybe we could hack CLJS into eMacs directly as they evaluate JS code dynamically#2021-10-1018:13David PhamI would curious if we could use SCI or if we need to make advanced compilation.#2021-10-1018:15borkdudeSCI supports advanced compilation#2021-10-1018:19mpenetYou can also use emacs modules directly in theory#2021-10-1112:24David PhamWhat are emacs module?#2021-10-1113:53mpenethttps://www.gnu.org/software/emacs/manual/html_node/elisp/Writing-Dynamic-Modules.html#2021-10-1113:53mpenetSome people implemented language bridges via theses (I recall at least one for nim and Lua)#2021-10-1117:25futuroDoes anyone have a favorite way of doing literate programing with Clojure? I'm reading Dragan Djuric's NLFP and want to leverage a more literate programming style for my notes instead of putting my prose in comments in a CLJ file.#2021-10-1117:40solfOn the other hand, you can also keep using comments in a CLJ file with the newly released clerk notebook#2021-10-1117:40solfhttps://clojurians.slack.com/archives/C06MAR553/p1633685545081800#2021-10-1117:42futuroThat's an interesting idea; I've been meaning to explore nextjournal#2021-10-1117:43solfIf I understand correctly, you don’t have to use nextjournal to use clerk (you run it locally)#2021-10-1117:43solfbut I might be wrong here#2021-10-1117:44futuroThat's legit; I only have the foggiest understanding of nextjournal, so my previous comment is most likely mostly inaccurate 🙂#2021-10-1118:02sebastianAdam does a lot of literate programming in Clojure with org mode. You could check out this repo https://github.com/adam-james-v/radish and others of his. He also streams his endeavors on Twitch. Some portions of it land on Youtube. https://www.youtube.com/c/AdamJames-tv/featured Just for some inspiration of his workflow.#2021-10-1117:25futuroI've been thinking about using Org mode with a clojure mode for source blocks and shared sessions, but I'm not sure if that has pitfalls I can't see (and I'm hoping to accidentally spend hours yak-shaving 😬 )#2021-10-1203:14practicalli-johnOrg-mode seems to work well for literate programming. The simplest approach is to add .Org files to a Clojure project. No specific dependencies are required (except Clojure itself) https://practical.li/spacemacs/org-mode/literate-programming/#2021-10-1214:22kimimI am using organise for render deep learning study#2021-10-1214:59ag> Org-mode seems to work well for literate programming Oh yeah. Check out this Clojure library that doesn't have a single Clojure file: https://github.com/thi-ng/color First time I've encountered it, I was confused. GitHub identifies it as "100% Shellscripts", because for GitHub, Org files are documentation.#2021-10-1215:31tvaughanFYI, they abandoned this approach https://github.com/thi-ng/geom#status#2021-10-1215:56futuroThanks for the link @U05254DQM, I'll give that a look!#2021-10-1216:01practicalli-johnorg-mode is making my dinner this evening... is there nothing it cannot do :rolling_on_the_floor_laughing:#2021-10-1217:27ag> FYI, they abandoned this approach Right, but they've abandoned it not because it didn't work. But because literate programming makes sense only when: • The source code is not meant to have collaborated with someone else • You're playing a game: "My name is Donald, and I'm going to write a book..." #2021-10-1614:03Carsten BehringI always struggled with long running commands, seconds up to minutes. Has this been solved in the meanwhile ?#2021-10-1214:59ag> Org-mode seems to work well for literate programming Oh yeah. Check out this Clojure library that doesn't have a single Clojure file: https://github.com/thi-ng/color First time I've encountered it, I was confused. GitHub identifies it as "100% Shellscripts", because for GitHub, Org files are documentation.#2021-10-1217:13lambdamHello, We are tracking a bug with @vemv on a fresh Spacemacs devel installation.#2021-10-1217:15vemvour question is how to get a stacktrace for that? we tried M-x toggle-debug-on-error , no difference#2021-10-1217:17vemvWhat about evaluating the same input with M-: ? https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Eval.html It appears ielm likes to swallow errors#2021-10-1217:17vemvIf I M:- (concat 2) I get a stacktrace:#2021-10-1217:17vemv#2021-10-1308:31practicalli-johnI believe this issue was already discussed in #practicalli channel https://clojurians.slack.com/archives/CJTRRQ857/p1633019817030000#2021-10-1308:36practicalli-johnAfter an install, try restarting Emacs and see if its still an issue. If it is, then delete the cider, parseedn and parseclj packages from ~/.emacs.d/elpa/.. directory and restart (new packages will be installed. There was also a bug in Cider that is now resolved#2021-10-1309:05vemvYes thanks! we worked it out all the way https://github.com/clojure-emacs/parseclj/issues/35#issuecomment-941920792#2021-10-1309:07vemvMy only remaining q is how to make *backtrace* work more than once :) I've observed that for a number of years - it pops up once, then it won't again after subsequent errors#2021-10-1413:42jjttjjI like the "magic requires" with cloure-mode. Has anyone implemented a version that could include :refers in the require? Any tips for achieving this?#2021-10-1413:54ericdalloclojure-lsp has this for some macros like deftest testing is#2021-10-1413:54ericdalloAnd I have an idea to add support to add other user refers#2021-10-1413:58jjttjjcool! I'll check that out#2021-10-1416:16vemvmagic-requires are provided by clj-refactor.el not clojure-mode.el for inserting a refer, https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-missing-libspec will work. It inserts aliases (`foo/` ), refers and imports alike. Related: https://clojurians.slack.com/archives/C0617A8PQ/p1634127493190800#2021-10-2822:18ericdallolsp-lens enabled by default! https://github.com/emacs-lsp/lsp-mode/pull/3175#2021-10-2823:30ribelonobody has a problem with cider after updating doom-emacs?#2021-10-2823:31ribelo#2021-10-2823:34ribelo#2021-10-2823:38ericdallodid you try doom sync -u ?#2021-10-2823:49ribeloyes#2021-10-2823:50ribelodid not help#2021-10-2823:51ericdallotry a more windows approach rm -rf ~/.emacs.d/ && git clone --depth 1 ~/.emacs.d && doom install this is a last resource that usually fixes any issue with my doom-emacs#2021-10-2823:52ribeloit looks like there is a problem with nrepl, because when I forced the version change via cider-jack-in-dependencies, clj repl works, but cljs still doesn't#2021-10-2823:53ribeloI'll try it soon#2021-10-2823:53ribelojust in case I update whole emacs#2021-10-2904:36vemvthis option can help for bisecting things https://github.com/clojure-emacs/cider/blob/e52f78c54793c40ae895aa22312d71f1561897ce/cider.el#L415#2021-10-2904:38vemvAs for cleaning up state between Doom updates, see https://clojurians.slack.com/archives/C0617A8PQ/p1635232231032500#2021-10-2919:42respatializedthe easiest way to fix it when I encounter the cider-jar issue is just to rm -rf ~/.emacs.d/.local/straight/repos/cider ~/.emacs.d/.local/straight/build-*/cider#2021-11-0221:28joshmillerI recently got a new M1 MacBook and installed /cdn-cgi/l/email-protection on it. Almost everything seems to be working, except for some reason rgrep always returns no results. In the *grep* buffer, I can copy the command it used to search (`find [...] -exec grep ...`) and paste into the terminal and it works. I tried granting Emacs full disk access, thinking maybe it was a permissions error, but that didn’t work. Has anyone seen this?#2021-11-0221:40kwrooijenNot sure about your issue, but back in the day when I used a mac my projectile (with grep I guess) didn't work, and I had to install the_silver_searcher through brew#2021-11-0222:08joshmillerI’ll give that a shot, thanks.#2021-11-0302:34joshmillerThank you, although that didn’t fix it.#2021-11-0302:35joshmillerIn the end, the issue seems to be Homebrew moving from /usr/local to /opt/homebrew. AFAICT I changed all references from the former to the latter, but doing ln -s /opt/homebrew/bin /usr/local/bin fixed the issue.#2021-11-0221:29joshmillerNo *Errors*, nothing related in *Messages*#2021-11-0302:35joshmillerIn the end, the issue seems to be Homebrew moving from /usr/local to /opt/homebrew. AFAICT I changed all references from the former to the latter, but doing ln -s /opt/homebrew/bin /usr/local/bin fixed the issue.#2021-11-0306:54zackteoHello! If I'm am getting WARNING: CIDER 1.2.0-snapeshot requires cider-nrepl 0.27.2, but you are currently using cider-nrepl 0.21.1. The versioon mismatch might break some functionality! where should I be checking to fix this? Specifically, cider-jack-in works in one project (does not show this error) but not in another. My suspicions are the project.clj but am not sure. Any suggestions? Or are there any quick fixes?#2021-11-0307:03zackteookay I added it to my plugins part of my project.clj, seems to work :thinking_face:#2021-11-0307:19zackteoalso realised i should ask in the cider channel#2021-11-0310:20jasonbellI’ve got an M1 Mac Mini, loving it but one issue. I need to dig out the reference. I think it was to do with cljr-refactor#2021-11-0310:21vemvlet us know, I help out maintaining that one#2021-11-0310:22jasonbellWill do @U45T93RA6 - thanks!#2021-11-0310:23vemvwhat's the symptom? might ring a bell#2021-11-0310:39jasonbell
Are you sure you want to run `cider-jack-in' without a Clojure project? (y or n) y
[nREPL] Starting server via /Users/jasonbell/bin/lein update-in :dependencies conj \[org.clojure/tools.nrepl\ \"0.2.13\"\ \:exclusions\ \[org.clojure/clojure\]\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.18.0\"\] -- repl :headless :host ::...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: clojure.lang.Compiler$CompilerException: Syntax error compiling var at (cider/nrepl/middleware/pprint.clj:73:3).
#:clojure.error{:phase :compile-syntax-check, :line 73, :column 3, :source "cider/nrepl/middleware/pprint.clj", :symbol var}
 at clojure.lang.Compiler.analyzeSeq (Compiler.java:7119)
    clojure.lang.Compiler.analyze (Compiler.java:6793)
    clojure.lang.Compiler.analyze (Compiler.java:6749)
    clojure.lang.Compiler$InvokeExpr.parse (Compiler.java:3824)
    clojure.lang.Compiler.analyzeSeq (Compiler.java:7113)
    clojure.lang.Compiler.analyze (Compiler.java:6793)
Emacs 26.1 btw
#2021-11-0310:41vemvdoesn't look related to clj-refactor.el to me Your whole stack is pretty outdated :/ nowadays it's nrepl/nrepl (instead of org.clojure's nrepl), and cider-nrepl is at 0.27.2#2021-11-0310:43jasonbellFair enough. I’m from the school of “it’s working fine so I won’t break it” 🙂#2021-11-0310:44jasonbellSo where do I change the nrepl version please?#2021-11-0310:45vemvif you make cider.el be at latest it will inject the right stuff for you (nrepl and cider-nrepl alike) same for clj-refactor.el (which injects refactor-nrepl)#2021-11-0310:45vemv> Fair enough. I’m from the school of “it’s working fine so I won’t break it” same here tbh, but of course that goes down the unsupported route :) it's a tradeoff.#2021-11-0310:48jasonbell👍 Thank you, appreciate your time @U45T93RA6 most kind.#2021-11-0310:55roborbroHi I found this comment on a issue in lispy’s github that helped me using cider and evaluation with the key e but I honestly have no idea as to why: > > (setq cider-jack-in-dependencies > (delete-dups > (append > cider-jack-in-dependencies > lispy-cider-jack-in-dependencies))) #2021-11-0310:55roborbrocould somebody help me understand this?#2021-11-0310:59vemvpresumably adding lispy-cider-jack-in-dependencies injects JVM clojure code that is needed for whatever Lispy does#2021-11-0322:28roborbrodoesnt make it much clearer but thanks for the try 🙂#2021-11-0322:47vemvI'd look at the definition of lispy-cider-jack-in-dependencies and then check out that one Clojure package#2021-11-0323:13roborbroOk, thanks for the pointer 🙂#2021-11-0414:36MariusHi there, I’m a Clojure and Emacs beginner and use config from here (https://www.braveclojure.com/basic-emacs/). Today I was hunting down a bug in an example I am coding and it turned out to be a typo in the word ’message”. What surprises me is that there is no check / no linter to highlight those unresolved symbols and prevent those typos in first place. Is this a matter of configuration or generally not possible?#2021-11-0419:16practicalli-johnThe Emacs config in brave Clojure is really outdated by a number of years.#2021-11-0610:14kimimYou can use clj-kondo and lsp-mode#2021-11-0414:40dpsuttonclj-kondo would most likely have caught that. do you have that linter enabled?#2021-11-0414:42dpsuttonboth shadow-cljs and figwheel should have given a UI toast showing that compiler error as well#2021-11-0414:44MariusI’m not sure if clj-kondo is enabled, most likely not - I just copied that Emacs config.#2021-11-0414:44borkdude@mail990 Try out flycheck-clj-kondo for the most basic clj-kondo setup in emacs#2021-11-0414:44borkdudeFor more advanced features (navigation etc) move on to clojure-lsp which automatically enables clj-kondo#2021-11-0414:45MariusYou’re right, now I looked at the shadow-cljs build and there is a warning… my bad, I just ignored the terminal output 🙂#2021-11-0414:46ericdalloin case you want a more IDE-ish experience: https://clojure-lsp.io/features/ #lsp#2021-11-0414:47borkdudeI already mentioned that @ericdallo :)#2021-11-0414:48ericdalloI just linked the webpage and the channel 😅#2021-11-0414:48borkdude:-D#2021-11-0414:48MariusWow, thats all very helpful, thanks a lot! I definitely have to spend more time to learn Emacs as well… like “learn to use the tools before building”#2021-11-0414:49ericdalloSince you are starting, maybe this guide may help you as well: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#2021-11-0414:49borkdude@mail990 I can assure you it's worth the time.#2021-11-0414:50MariusI’m sure it is, but it is also just too tempting to fall back into the old known tools like VS Code or IntelliJ … have… to…. resist….#2021-11-0414:51borkdudeVS Code + Calva is also very nice. But I'll try to respect the religion of this channel.#2021-11-0414:52borkdudeAs a nice fact: VS Code + Calva also use clj-kondo + clojure-lsp so what you learn here will also be useful on the heathen side of things#2021-11-0414:54ericdallothe same for CoC/neovim if using LSP ☝️ metal#2021-11-0414:55MariusJust too much choice and religion for a beginner…#2021-11-0415:00dpsuttonreligion is not helpful for a beginner. There is no need to use emacs if you are already familiar with other tools. I think emacs is fantastic but it really takes a while to really understand why. And it isn’t necessarily worth it for everyone. I also consider vs code the modern day successor to emacs#2021-11-0415:06mpenetit's risky to state "vscode the modern day successor to emacs" in #emacs 🙂#2021-11-0415:06borkdudeI remember I learned emacs because that was the only viable option for clojure pretty much in the early 2010s. I also played around with CounterClockwise in Eclipse. I don't regret learning emacs one bit. But it has a higher learning curve than other options right now.#2021-11-0415:07mpenetyeah it's a long term investment#2021-11-0415:08mpenethad to learn at uni in end of 90s (to work with Java no less), used it almost exclusively ever since.#2021-11-0415:09mpenetvscode does some things better, emacs others.#2021-11-0415:09cp4nIt's also fun to use ( although that is quite subjective on what one's idea of fun is 🙂 )#2021-11-0415:10mpenetI hate elisp with a passion personally#2021-11-0415:10mpenetyet, it works, so#2021-11-0415:10borkdudeIt matches how I think. Like in Clojure, I use functions and M-x foo is a lot like using a function to me. I tried vim as well, but it matches less how I think, I just can't get used to it. It's very personal.#2021-11-0415:11mpenetI wish there was a fennel dynamic module or something of the sort that would allow me to write modes in something else than elisp#2021-11-0415:17dpsuttonI learned emacs in a compilers class in university since it had modes for sml and some other goodies#2021-11-0415:18dpsuttoni’m quite jealous of the lua integration for neovim and agree emacs lisp is quite clunky#2021-11-0415:19dpsuttonthe reason i think that vs code is the successor to emacs is based on the community and scriptability. It’s an extensible editor with literally a million users who tinker, create packages, etc. It has achieved what emacs set out to do#2021-11-0415:23pezExtensible, yes, but it also resists being extended. 😃 https://www.reddit.com/r/Clojure/comments/qmmx7w/i_love_hacking_clojure_support_into_vs_code_for/#2021-11-0415:25mpenetthere were plenty good alternatives, some lasted more than others, the fact emacs is still around says something I think. it's also much more than a code editor#2021-11-0415:26mpenetthat said it's good vscode is creating all this innovation around it. it inspires a lot of good features#2021-11-0415:27pezMore than a code editor goes for VS Code as well, to some extent. Not as OS-y as Emacs, of course.#2021-11-0415:33MariusI’ve installed lsp-mode from MELPA stable, but when launching it (after restarting Emacs) with M-x lsp I get the following error:
lsp--path-to-uri: Symbol's function definition is void: -compose
#2021-11-0415:47ericdallohttps://github.com/emacs-lsp/lsp-mode/issues/2615#issuecomment-801294545#2021-11-0415:48ericdalloTLDR: update dash.el package, I really suggest you use lsp-mode from melpa unstable#2021-11-0415:49ericdallolsp-mode receives a lot of fixes and improvements all the time, stick to the unstable I think it is the best option#2021-11-0419:13Mariusok, thanks, I’ll give it a try#2021-11-0415:40dpsuttonemacs has its own resistance to change as well. from licensing, to product vision, to even supporting features on osx that are not possible in x server.#2021-11-0415:40CaseyI came to emacs because of clojure (like many), but the reason I'm still here even though I have years of vimming and Intellij, is that if you want vim editing + proper lisp structural editing, emacs+evil is the only place you can get it AFAICT. Intellij/Cursive and vscode/calva are severely handicapped when you enable the vim plugins. I haven't tried the vim tools (fireplace) in years, maybe I should give it a go. But I find emacs delivers the IDE-like experience better than I could ever get vim to over decades. If I somehow manage to boot up emacs without my config, I'm totally hopeless because I don't actually know any core emacs bindings except m-x#2021-11-0415:59fedregI had the same experience but just a heads up that the Clojure Vvm plugins have gotten really good in the past couple of years.. They all pull in CIDER now. I personally use conjure but fireplace and iced are both really solid. (Conjure is neovim only) I go back and forth between emacs and vim all the time… Use vim for most tasks and emacs when I need a bit more help. Usually have both open and just keep the bindings the same to make it easy.#2021-11-0420:16CaseyI'll have to try them out. I also spend almost all day in vim and emacs. Vim when I'm doing small edits all over the place over many projects and emacs when diving into one project. that said I've grown to really like the emacs tooling around project management, managing many buffers, searching, sidebars, etc (not to mention the time investment in learning it). I regularly copy bindings between my emacs and vim configs heh. I haven't dove into the neovim rabbitwhole yet. Wait, so cider we know and love is is used by non-emacs editors too?#2021-11-0501:05fedregYa, the awesome cider team did a lot of work to generalize a lot of the tooling so other editors could use As a result, several Vim plugins as well as the VS code plugin all are now viable Clojure environments#2021-11-0610:36kimimI am still using emacs own key bindings#2021-11-0415:42mpenet@dpsutton what are the features not possible on x?#2021-11-0415:43mpenetthat said emacs is about to have proper wayland support, so that might come to osx in another form eventually#2021-11-0415:43dpsuttonthere’s a patch set that gets applied for osx that will not be accepted into core because it adds some niceties like smooth scrolling and maybe subpixel stuff. until x has these capabilities RMS prevents it from being merged so that it doesn’t promote a non-free operating system#2021-11-0610:36kimimInteresting 😄 #2021-11-0417:29David VujicI also began my emacs journey through clojure and the Clojure for the Brave & True https://www.braveclojure.com/clojure-for-the-brave-and-true/. I started learning clojure less than two years ago, and there were a lot of really nice editor alternatives out there - but I went for emacs anyway. Much because of the author Daniel Higginbotham recommending it - even though when he wrote it, there probably wasn’t that many of them to choose from. I haven’t regret choosing emacs, even though it made the learning curve quite a lot more :snow_capped_mountain: 😆 These days, I write JavaScript, TypeScript, Clojure and Python code using Emacs. I still accidentally try to “Yank” and “Kill” text meant to be cut & copied from browsers, notes and other non-emacs stuff. picard-facepalm#2021-11-0417:30David VujicHere’s my config: https://github.com/DavidVujic/my-emacs-config#2021-11-0610:39kimimFor other applications, I am using a small autohotkey scripts to bind M-W and C-Y to C-c and C-v#2021-11-0610:49kimimhttps://github.com/kimim/kimim-emacs-everywhere you could fork and adjust to your habit, if you use windows.#2021-11-0510:38lassemaattahas anyone else had issues with emacs completely freezing sometimes when viewing .cljc files? Happens to me perhaps once or twice a week. Any ideas on how to debug this would be appreciated 🙂#2021-11-0510:38lassemaattaGNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.17.4) of 2021-08-06#2021-11-0510:39lassemaattaCIDER 1.2.0snapshot (package: #2021-11-0510:39lassemaattalsp-mode + clojure-lsp 2021.11.02-15.24.47#2021-11-0511:20vemvM-x debug-on-quit and C-g whenever it's freezing? There's also a nice profiler apparently#2021-11-0511:25vemvn.b., afacit there isn't an official doc laying out how cider and clojure-lsp should play together in emacs. It doesn't seem trivial that they overlap here and there, and they keep changing. a cider-nrepl + lsp combo is nicely done/curated in Calva, so it's not something impossible or complex. But if you're gonna roll it yourself... here be dragons 🐉#2021-11-0511:27mpenetIt's quite easy to make both play nice#2021-11-0511:29mpenetyou get to pick & choose who's doing what#2021-11-0511:30mpenetif you need inspiration: https://github.com/mpenet/emax/blob/master/init.el#L475-L507#2021-11-0511:30mpenetalso the conf from @UKFSJSM38 might be of interest: https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#2021-11-0511:35lassemaattawhen this problem occurs I can't get emacs to react to anything (well, except for kill -9), even C-g so I'm not sure if debug-on-quit will help. But I'll check it out, thanks#2021-11-0511:39vemvyou can send instead kill -USR2 to trigger a quit if you had set debug-on-quit beforehand, you'll get a stacktrace of w/e was keeping emacs busy at that moment#2021-11-0511:41ericdallodebug-on-quit should help understand on what function is stuck#2021-11-0511:43lassemaattagood to know. one thing that might complicate things is that when my emacs freezes it isn't consuming a lot of cpu. so it doesn't look like a typical case of a thread stuck in a loop#2021-11-0516:06Zachary FontenotI had a very similar thing happen but it was specifically when using ^: for metadata tags. Never figured out why but profiling etc seemed to point to syntax highlighting#2021-11-0722:52WestWhen I hover over, or place the cursor over a word, lsp-mode with clojure-lsp will show me information about the symbol; Where it is, docstrings if they exist, stuff like that. It’s been happening for awhile now, but this has recently really started bothering me. I can’t figure out why sometimes this information doesn’t show up. Either that or it flashes in the modeline for a second only to disappear again. I’m asking for help with figuring out how to begin troubleshooting this.#2021-11-0722:53ericdalloMaybe it's a conflict with cider eldoc integration? Maybe you need to leave only LSP-mode or cider one enabled#2021-11-0722:58West
(clojure :variables
              ;; clojure-backend 'cider               ;; use cider instead of lsp
              ;; clojure-enable-linters 'clj-kondo    ;; clj-kondo included in lsp
              clojure-enable-clj-refactor t
              cider-repl-display-help-banner nil      ;; disable help banner
              cider-pprint-fn 'fipp                   ;; fast pretty printing
              clojure-indent-style 'align-arguments
              clojure-align-forms-automatically t
              clojure-toplevel-inside-comment-form t  ;; evaluate expressions in comment as top level
              cider-result-overlay-position 'at-point ;; results shown right after expression
              cider-overlays-use-font-lock t
              cider-repl-buffer-size-limit 100        ;; limit lines shown in REPL buffer
              )
Doesn’t look I have cider enabled for the Clojure layer.
#2021-11-0722:59ericdalloMaybe it could be a clojure-lsp issue as clojure-lsp send to client what it is the range for that function docs#2021-11-0722:59ericdalloIf you manage to make a simple repro I can take a look later#2021-11-0723:07vemv> Maybe you need to leave only LSP-mode or cider one enabled try cider-eldoc-display-for-symbol-at-point nil for this there might be other eldoc-related defcustoms#2021-11-0723:28ericdallo@U45T93RA6 that's correct, but in this case I don't think he is using cider at all#2021-11-0910:08WestIs there a verbose mode or debug mode for emacs? Like is there a way to track every function call and its result?#2021-11-0910:47vemvAlmost https://clojurians.slack.com/archives/C099W16KZ/p1636111235080900?thread_ts=1636108730.080100&amp;cid=C099W16KZ#2021-11-0910:03Andreaquestion about cider-xref-fn-refs: does it work for you? That command should be able to find CLJ (not CLJS!) functions references, but to me it always gives an exception Symbol must be namespace-qualified :(#2021-11-0910:58vemvthere was a fix 1mo ago https://github.com/clojure-emacs/orchard/pull/136 if you're running cider/cider-nrepl latest, feel free to go for an issue#2021-11-1000:12mgI've been having this issue with projectile for a while. The projectile-grep functionality turns up a lot of stuff from output directories in my projects that are gitignored - target , cpcache , resource folders with compiled js, etc - and reading the documentation it seems like it's supposed to follow the gitignore. This is making projectile-grep basically useless for me in any clojurescript project because of all the noise. Anyone run into this or know what I can do to fix?#2021-11-1006:10deletedcan you make it use the silver searcher or ripgrep? those will respect ignore files#2021-11-1009:56vemvespecially ripgrep :) it was frustrating with ag#2021-11-1109:09iarenazaIf I understood you right, you can use projectile-ripgrep (`C-c p s r` by default) and projectile-ag (`C-c p s r` by default), if you prefer them. Of course you need to have ripgrep and/or silver searcher installed. If you don't want to learn new key chords, you can always remap the projectile-grep keychord (`C-c p s g` by default) to any of the other two functions.#2021-11-1009:54Imdad AhmedHello, is there something that i can use to prettify an edn buffer to be able to read it easily?#2021-11-1009:56vemvSure https://github.com/clojure-emacs/cider/blob/a30d2e5ee2052dbc06e24c2494747ebd60f0cd03/cider-format.el#L126#2021-11-1010:03Imdad AhmedThanks that worked#2021-11-1019:51ericdalloWhat commands/shortcuts do you use to format a inline EDN to a pretty printed EDN?#2021-11-1019:52vemvis this question different from the one right above?#2021-11-1019:55ericdalloYeah, I'd like something quick when I don't have any repl 😅#2021-11-1019:55ericdallonot if there is something for that#2021-11-1020:00tvaughanYou could use C-u M-| on region to replace with output of shell command, e.g. jet#2021-11-1020:01tvaughanI see others have already suggested this#2021-11-1020:06ericdallothank you!#2021-11-1020:06ericdalloI didn't know about C-u M-| though :)#2021-11-1019:52dpsuttoni don’t have one written but i think you can execute shell commands on a region, shell out to jet and replace the highlighted region#2021-11-1019:53borkdudehttps://github.com/borkdude/jet#emacs-integration#2021-11-1019:54dpsutton:chefs_kiss:#2021-11-1019:55dpsuttoni’d modify that to use the interactive region if present and fall back to the buffer’s contents but that’s exactly what i had in mind#2021-11-1019:56ericdalloThanks, I was hoping something built-in on clojure-mode or some function already available in some package though#2021-11-1019:56dpsuttonoh, i’m misreading it. that’s exactly what i’d want#2021-11-1019:58vemvperhaps there's some crazy package but not that I've heard of there's parseclj/parseedn in the opposite direction
#2021-11-1020:00ericdalloYeah, I just thought it was something obvious already built-in somewhere, thanks folks!#2021-11-1020:04borkdude@dpsutton feel free to PR a change#2021-11-1020:04dpsuttonno it’s what i would want. i misread the current buffer call to be getting the entire buffer’s text, rather than just the name#2021-11-1312:51dotemacsTried clojure-lsp for the past week and while nice over all, I spent some time fighting its eager indentation. For example, when adding something like this:
(let [foo something
And pressing RET to add another line, the point would be returned back to the end of the previous line. I’d continue to type and I’d add my code, so that at the end it’d end up looking like:
(let [foo something bar something-else]
I looked in the documentation, to see where I could tweak the settings for indenting, but I couldn’t find anything that would help me to resolve this issue. What should I be looking for to tweak the super eager indentation for clojure-lsp? Thanks
#2021-11-1313:44ericdalloNot sure your issue is related with LSP, could you record a gif or a video? Not sure I understand what is happening#2021-11-1314:29vemvsounds odd, deleting newlines seems beyond the scope of indentation. might be electric-indent-mode? lispy-mode? (disclaimer: I don't know much about either)#2021-11-1318:30practicalli-johnI experienced similar kinds of issues when using aggressive-indent-mode with cljfmt enabled through LSP. My guess would be electric-indent-mode and cljfmt triggering each other by the changes they are making. Try disable one of those and see if you have the same effects. In the end I switched off aggressive-indent-mode and just use the LSP formatting through cljfmt (although I have disabled some of the rules cljfmt has by default)#2021-11-1318:33practicalli-johnTo disable cljfmt I use https://github.com/practicalli/spacemacs.d/blob/live/dot-lsp/config.edn#L82#2021-11-1316:47colliderwriterdid anyone ever add babashka as an ob-clojure backend?#2021-11-1319:05borkdude@colliderwriter https://github.com/babashka/babashka/discussions/907#2021-11-1319:34colliderwriteri saw that but the :shebang solution as noted does not put the source in clojure-mode, right? I'll dig into the code.#2021-11-1617:09bozhidarNot really a Clojure article, but some of you here might find it interesting https://batsov.com/articles/2021/11/16/why-emacs-redux/#2021-11-1620:22Young-il ChooNice retrospective! My two cents: Emacs is the ultimate user interface to your computer, because every interaction with the computer should have all the editing capabilities of a powerful editor.#2021-11-1620:05ericdalloAny way to eval something with cider, and copy the result to clipboard?#2021-11-1620:06ericdalloSince cider-eval-last-sexpr is async, not sure how to get the result to then create some custom elisp code#2021-11-1620:09vemvwhile there's an elisp approach, you could also wrap the evaled code with clojure code that performed the clipboarding 'server-side' https://github.com/exupero/clipboard has worked just fine for me#2021-11-1620:11ericdallooh, Interesting project#2021-11-1620:11ericdalloyeah, it should work, although I'd like a more elisp way, even so thank you for the suggestion :)#2021-11-1620:12vemvsimpleclip also worked for me for elisp stuff, for a long time. can't offer help myself with cider handlers unfortunately (I use an odd stack). digging into their source shouldn't be too hard#2021-11-1620:14ericdalloDo you know how can I get the cider eval output sync via elisp?#2021-11-1620:14ericdalloor pass some callback#2021-11-1620:15vemvsure there's cider-nrepl-sync-request:eval , you'll have to study a bit how to call it. it's not too hard iirc#2021-11-1620:16ericdallooh, perfect#2021-11-1620:16ericdalloI'll give it a try#2021-11-1620:37ericdalloI just found a easier way that IMO could go to cider code :)
(defun cider-eval-clipboard-handler ()
  (nrepl-make-response-handler
   (current-buffer)
   (lambda (buffer value)
     (with-current-buffer buffer
       (with-temp-buffer
         (insert value)
         (clipboard-kill-region (point-min) (point-max)))))
   (lambda (_buffer out)
     (cider-emit-interactive-eval-output out))
   (lambda (_buffer err)
     (cider-emit-interactive-eval-err-output err))
   '()))

(defun cider-eval-last-sexpr-and-copy-to-clipboard ()
  (interactive)
  (cider-interactive-eval nil
                         (cider-eval-clipboard-handler)
                         (cider-last-sexp 'bounds)
                         (cider--nrepl-pr-request-map)))
#2021-11-1620:38ericdalloit needs some improvements, like copy to clipboard and print as well, but it works#2021-11-1622:20vemvnice! You might want to favor a temp buffer over the current one? IDK#2021-11-1708:46bozhidarJust keep in mind that the this gets called once for each chunk of the response, so for a bigger result you might end up with only part of the response in the clipboard.#2021-11-1708:47bozhidarProbably not a big deal in the most cases, but it might surprise you in certain situations.#2021-11-1708:48bozhidarPerhaps you can gather the result in a temp buffer and copy it to the clipboard on "done"?#2021-11-1712:47ericdalloYes, that sounds better indeed#2021-11-1805:17jjttjjWhat are the modern init.el/config starter setups for experienced Clojure devs looking to get in to emacs for the first time? (I remember this being discussed on a clojure podcast in the last year or so but can't find the source)#2021-11-1806:50Ben SlessThe simplest and most holistic user experience is spacemacs#2021-11-1808:11bozhidarI definitely wouldn't call it "simplest". 😄#2021-11-1808:12bozhidarI think the simplest would be a tiny single file setup - e.g. something like mine https://github.com/bbatsov/emacs.d/blob/master/init.el#2021-11-1808:13bozhidarPrelude (https://github.com/bbatsov/prelude/) is also fairly simple compared to most of the competition and for obvious reasons it works well for Clojure development. 🙂#2021-11-1808:27Ben SlessI knew it would be a controversial claim 🙃#2021-11-1808:28Ben SlessFrom mine and other users' experience I found that spacemacs's abstraction model is good#2021-11-1808:29Ben SlessIt doesn't require deep familiarity with emacs to get going, but it doesn't stop you or hide anything from you#2021-11-1808:29Ben SlessSo in my opinion it is both easy and simple#2021-11-1808:45bozhidarWell, if it's simple for you I can't argue with that. I've just always been on the minimalist side of everything and avoid additional abstractions when possible.#2021-11-1809:13Ben SlessAt the risk of sounding cheeky, why use Clojure and not C?#2021-11-1809:14Ben SlessAbstractions have a price, but sometimes we're willing to pay it because they free us from worrying about the little things#2021-11-1809:14Ben SlessThey get out of our way instead of under our feet#2021-11-1809:14Ben SlessIt's been my experience that Spacemacs gets out of my way while Doom Emacs forces the user to contend with it constantly#2021-11-1809:18bozhidarI don't dislike abstractions in general; I'm just wary of abusing them. I've yet to see some real problem that Spacemacs layers have solved, yet they introduce a mental overhead as you have to learn them to use them. Adding abstrations doesn't necessarily make something "simple" (Clojure). Something they make something "easy and complex", and sometimes it's even worse. 🙂#2021-11-1809:19bozhidarThat's super subjective, of course, and I encourage everyone to just stick with whatever works for them.#2021-11-1814:10jjttjjThanks everyone!#2021-11-1821:16practicalli-johnIf you wish to use Spacemacs, this guide may be of interest https://practical.li/spacemacs/install-spacemacs/#2021-11-1903:59WestGotta say, I can’t live without lisp interaction mode in spacemacs; SPC k. @U05254DQM’s guide is awesome. I actually started with https://youtu.be/NDrpclY54E0 by him. Gives just enough of an intro to using spacemacs with Clojure. Also, Spacemacs: Easy? Yes. Simple? …not really, definitely not simple under the hood.#2021-11-1903:59WestDoom ain’t bad though.#2021-11-1904:03WestIf you do decide to go raw-emacs, figure out how to hook up melpa, then get which-key to show keybindings and evil-mode for vim emulation (I think we can all agree the default emacs bindings absolutely http://xahlee.info/emacs/emacs/emacs_pinky.html).#2021-11-1923:18andy.fingerhutI don't know these other modes well enough to know whether I am even more minimal than they are, but I suspect I am: clojure-mode only 🙂#2021-11-2302:52rbergerAfter not doing much programming for a long while and I had to pick up emacs again when I started hacking again, I used Spacemacs for a long while which I liked for a long while. Finally got fed up with not being able to understand what was going on for various modes that I had problems with. Been trying Doom which was a bit simpler. But now I’ve decided all the evil stuff really gets in the way in both Spacemacs and Doom (I don’t use any of it, I use them in holy mode and most documentation for Spacemacs/Doom show the evil way) Both were nice when they worked, but if something didn’t work, it was hard. It was hard for me to stay in sync with my colleagues who were running their own (heavily customized) emacs. So I’m going to try Prelude (again, used it when it first came out). But if you need to use evil mode, they are both nice for that.#2021-11-1818:46WestAnybody use the https://www.neilvandyke.org/sicp-texi/? I’m trying to unzip it, but gzip gives me an error.
$ gzip -d sicp.info.gz
gzip: sicp.info.gz: not in gzip format
#2021-11-1818:59respatializedhttps://sarabander.github.io/sicp/html/index.xhtml This HTML version is IMO the nicest (I prefer to stay as far away from TeX/LaTeX as I can)#2021-11-1819:00respatializedI'd try tar xf on that file though#2021-11-1819:01WestWhat major mode would you recommend reading the html version in?#2021-11-1819:04respatializedI've used eww in the past and it's worked fine, but you might also be able to use the EPUB format with something like nov.el https://github.com/sarabander/sicp#2021-11-1819:04WestAlso:
$ /usr/bin/tar -xf 
tar: Error opening archive: Unrecognized archive format
#2021-11-1901:03chepprey$ file sicp.info.gz might give some insight as to what kind of file it actually is.#2021-11-1903:41WestInteresting… Seems like it wasn’t compressed at all.
$ file sicp.info.gz
sicp.info.gz: data

$ file -I sicp.info.gz                                        sicp.info.gz: application/octet-stream; charset=binary
#2021-11-1903:41WestAlso, when I cat it out, it just prints it like there’s nothing wrong. Like it isn’t garbled, just plaintext.#2021-11-1903:56WestWhat jank. This guy uploaded a file as a gzip file without actually gzipping it. 😠#2021-11-1907:46djmHow did you download it? Most likely your browser was trying to be helpful, and uncompressed it#2021-11-1907:46djm
❯ wget 
...
❯ file sicp.info.gz
sicp.info.gz: gzip compressed data, was "", last modified: Wed Jan 10 09:29:09 2007, max compression, from Unix, original size modulo 2^32 1487932
#2021-11-1919:15WestThe browser did in fact decompress it. I wonder why it didn’t take off the .gz extension.#2021-11-1919:26djmBrowsers support gzip so that web pages can be sent in a compressed format (identified by the content type header). But they also tend to believe the filename claimed by the server, and in this case your browser wasn't smart enough to put two and two together. I wonder if some browsers handle this better than others. I know I've seen it happen with Firefox, but don't recall seeing it with Chrome.#2021-11-2100:10WestI tested with both brave and firefox, same behavior.#2021-11-2100:13WestJust decided to run a profiler to find out why scrolling is so slow. I wonder if there’s any way to run a profiler at the function level.#2021-11-2102:33WestRunning some experiments using spacemacs-base instead of spacemacs as my distribution.#2021-11-2102:40WestContinuing this in #spacemacs https://clojurians.slack.com/archives/C09C8GRLY/p1637462412100900#2022-12-3008:40v3gaThat's evil....! =( jokes aside I'd take this to #emacs on IRC. That is odd.#2021-11-2100:54ericdalloMaybe trying disabling some active modes and checking if that changes anything? Still, the profiler is probably the best way to find that#2021-11-2102:40WestContinuing this in #spacemacs https://clojurians.slack.com/archives/C09C8GRLY/p1637462412100900#2021-11-2913:08Benjamin~~do you have ideas how to write datalog with emacs lisp? I'm toying around with the idea of some emacs client for datomic~~ found some edn readers that should fix this part#2021-11-2918:32DiegoHello. Is there a way to quickly add a referred function in clj-refactor ?#2021-11-2922:15ericdallowith clj-refactor I'm not sure, but https://clojure-lsp.io/ has this feature :)#2021-11-3001:16vemvDo you mean this one? https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-missing-libspec#2021-11-3001:18vemv(it inserts require :as, require :refer or :import alike)#2021-11-3001:18ericdallo@U45T93RA6 I didn't know that supports :refer as well#2021-11-3001:19ericdalloMaybe we should update docs giving more cases/examples or details?#2021-11-3001:20vemvedited said wiki page just now, thanks!#2021-12-0116:14DiegoAwesome, thanks @U45T93RA6!#2021-12-0200:16Drew Verleei'm able to eval expressions in one file but not another in the same project. my emacs buffers says its connected in one but not the other. I can't imagine how this could be.#2021-12-0200:36practicalli-johnmy only thought is that the file path that contains the non-working namespace is not in the Class Path when starting the REPL process. For example, if I have namespace files under the develop directory (usually user.clj) rather than src, then if I forget to add develop as a class path when starting a REPL I have to restart the REPL and add it.#2021-12-0201:27Drew VerleeIt works in intelliji, same ns, same repl.#2021-12-0201:32Drew Verleeits now working after a cider update. [edit] it isn't working everywhere though .#2021-12-0206:46practicalli-johnSorry to hear Cider is giving you these challenges.#2021-12-0200:16Drew Verleeit's a shadow cljs project. I use spacemacs. I also live in chicago and i'm a Sagittarius.#2021-12-0200:17Drew VerleeMy long standing belief was that emacs would have the clojure exp, being written in lisp and used by the most people in the community. I have lost any faith thats the case when working on larger projects.#2021-12-0200:40vemvClojure tooling projects are definitionally open-ended, have to constantly adapt to an ever changing (if not increasingly fragmented!) landscape. I'm not aware of any project that is, say, flawed by design, even the ones I don't use or like that much have a solid basis. Which is to say, if something doesn't work as it should, it simply needs more work, which happens to be unpaid, and to actually get quite in the way of one's day job :) We can always be the change we want to see in the world. That change can take many shapes: • create high-quality, reproducible issues over Github (which will always take a little more attention than over here) • fund work you are interested in, especially via your employer • contribute PRs fixing/strengthening any issues you may find. Emacs and Clojure are both hackers' tools - they are inspectable and modifiable at runtime. Getting started can be easier than it might seem.#2021-12-0200:46v3gaHow long have you been using emacs? I hate to be/sound this way but VS Code or IntelliJ may be the better fit. Emacs is for nerds, not everyone. I...AM A NERD. I'll tinker in emacs all day long, i'll tweak it until I force myself to stop. That brings me great pleasure. There are different types of developers and enthusiasts, those that take on a craft just to pay the bills and some interest and those that do what they like. Emacs is for those that do what they like and don't mind putting in ANY amount of hours towards it. My lord...i'm starting to sound like I belong to another certain lisp family. 👀#2021-12-0200:51vemvPersonally I'd be wary of a generalization, I've belonged to a few all-emacs teams and not everyone is necessarily a hardcore tinkerer. Nowadays the distros are "batteries-included" such that one can afford to just use things and focus in the actual work at hand. Sometimes I go whole months without committing a thing to my .emacs (which has existed for some 10y). Other seasons sure, I'll go on a nerdy spree :)#2021-12-0200:53v3gaThere's a season for all things, yes. I'll tone it down a bit but i'm very passionate about my email client!#2021-12-0201:15Drew Verlee> create high-quality, reproducible issues over Github (which will always take a little more attention than over here) Here is as specific as i can get, auto completion across namespaces for variables doesn't work on my company project in both doom emacs and spacemacs. Finding references: I'm aware of cider-find-var and lsp. Both fail quite often. Intelliji + cursive and vs code both seem working way to find clojure var references. I have seen it working, at this point its worth the effort to spend hours testing them out to see if they do it constantly. Today i was unable to eval an expression one file/namespace but not a sibling. And i watched a co worker do it using Vscode. using the exact same steps i did. [edit] after updating cider now this is working again. haza?! (im tired)#2021-12-0201:15Drew Verleesometimes spacemacs just crashes when i move a window.#2021-12-0201:35vemvI won't sugarcoat it, that wasn't specific at all, if you face an issue the best thing you can do is open it over GH detailing your stack, characteristics of your project, what data have you gathered to debug things, etc spacemacs and doom are a double-edged sword, they're powerful but also bit of a mud ball that not many really understand. Nowadays you can get quite far with a 100LOC .emacs which just installs a few core packages, tweaks defcustoms per your liking and that's it. Fewer moving pieces + importantly, less frequent updates (straight.el is interesting in this area - it offers true version pinning via Git. I've used a similar technique for 10y, can't imagine my life otherwise) > ] after updating cider now this is working again. haza?! :)#2021-12-0201:38Drew VerleeBut learning how to be specific will take me as much time as switching editors. This is a last ditch cry for help. As in, i need to hear that over some hill people dont live in fear and i can get there quickly.#2021-12-0201:40vemvWho knows, if you create a GH issue, maintainers can help you iterate by asking you specific questions. (Which can theoretically also happen over here, but in practice sync support for free is rare)#2021-12-0201:45Drew Verlee@vemv Where would i post this issue you think? Given my cursor is '*" i expect to see the vars in the re-frame namespace. That is auto-completion. currently i get no results. i'm connected to a repl and can eval expressions.
(ns admin.containers.curriculum.reports.learner
  (:require [re-frame.core :as re-frame]))

(re-frame/*)
#2021-12-0201:46Drew VerleeThis works in other namespaces at times, in my emacs setup. And always seems to work in intelliji.#2021-12-0201:49vemvthe cider repo is fine > And always seems to work in intelliji. FYI it's comparing apples to oranges tbh. I understand the underlying stack is sort of hidden to the user, but completely different stacks are used in one and another IDE. Both have their strengths and weaknesses (as the open count hints here https://github.com/cursive-ide/cursive/issues)#2021-12-0201:59Drew Verleei'll try to make a ticket that conveys something useful, but to prove how hard that is. Now it works. tomorrow it wont, i would need to somehow capture whats changing.#2021-12-0202:01Drew VerleeMy larger point in discussing this was to hear feedback like "oh i work on lots of cljs projects and that never happens" or "yea me to". So i could get a sense of if i was trapped in some local minima. Say, i should ditch spaceamcs and jump on doom or trim evertyhing down to nothing.#2021-12-0202:03vemv> Now it works. tomorrow it wont Yeah it can be hard when you use e.g. spacemacs and updates are sort of a coarse-grained thing AFAICT. Another usual suspect is mixing cider and clojure-lsp, it's not 'forbidden' so to speak but not something that is officially supported/documented either. If you create a GH meta-issue ("how to debug cljs autocompletion when it doesn't work") we can try to get the ball rolling. A good part is that completions can be debugged by evaling vanilla expressions in a normal JVM repl. i.e. it's all Clojure, all runtime-inspectable. You don't need cider.el or nrepl expertise to invoke said Clojure code.#2021-12-0202:05Drew Verleei would be happy to start with knowing what function is called thats supplying the auto complete. I might seem all whine, but i spent 2 hours trying to figure that out to no avail.#2021-12-0202:06vemv> My larger point in discussing this was to hear feedback like Fair enough. Personally I see shadow-cljs problems quite often here, but sadly no GH issues. Sometimes I try to foster that. If people don't follow that indication I'll assume the issue is not important enough for them to bother#2021-12-0202:11vemv> i would be happy to start with knowing what function is called cider-nrepl provides completions. It does so by invoking Compliment which is a clj library. Compliment is based on "sources" i.e. a completion provider. There's a source specifically for cljs completions, provided by a library called clj-suitable cider-nrepl is a vanilla ns. so are Compliment and clj-suitable. However compliment and clj-suitable are prefixed with cider-nrepl-something-something (https://github.com/benedekfazekas/mranderson does that munging) If you invoke (all-ns) you should find cider-nrepl, and the 'munged' versions of compliment and clj-suitable. These are all JVM clojure libs. So jump-to-definition should work. You can take a look around their repos as well#2021-12-0202:12vemvtldr you can poke around this ns https://github.com/clojure-emacs/cider-nrepl/blob/c3d6b69c98ef4c81529b69fa7624662f2006f545/src/cider/nrepl/middleware/complete.clj#2021-12-0202:43Drew Verleethanks a lot and for all your hard work. i see you have contributed to a couple of these very projects.#2021-12-0203:09Drew VerleeI made a ticket here https://github.com/clojure-emacs/cider-nrepl/issues/732 The steps to reproduce aren't good. Again, that's part of the issue, these things dont seem to happen on small toy projects.#2021-12-0203:13vemvThanks much! Please specify over there if you are still perceiving this (given that you indicated that a cider upgrade fixed things). It's also OK to leave the issue open and add a comment whenever you experience flakiness again. But please in the meantime leave things clear for other maintainers to understand.#2021-12-0203:14Drew VerleeThe core issue remains, it works inconstantly. It worked in the specific ns. I tried 3 more and found another where it didn't. Here is my professional impression, cljs devs dont expect as much, they aren't reporting as many issues bc js and cljs is more chaotic in general. were basically used to things constantly falling out from underneath us at any time.#2021-12-0203:19vemvIs there any plausibly relevant difference between the namespaces where it works and where it doesn't? Do you use "string requires"? Do you have multiple source paths (as opposed to a single src path)? Is the inconsistency itself consistent? e.g. an Emacs buffer for a given .cljs will consistently always or never work, even when repeatedly closing/opening it. (Please answer over GH oc. Also feel free to take your time - definitely a thorough description matters more than 'latency')#2021-12-0203:33Drew Verlee> Is there any plausibly relevant difference between the namespaces where it works and where it doesn't? None that i see. No string requies. We do have multiple paths in our deps.edn, but i have an example where one completion works in one ns and not in another and they are in the same path.#2021-12-0203:36Drew Verlee> Is the inconsistency itself consistent? e.g. an Emacs buffer for a given .cljs will consistently always or never work, even when repeatedly closing/opening it. When it doesn't work, it tends to never work in that namespace unless maybe i restart everything, update, etc... When it does work, it works 4/5 times. so there is some root difference between the contexts, it's not probability.#2021-12-0203:36Drew Verleemoving to GH#2021-12-0203:50vemvcheers. Please move the last bits of info as part of the description, so that people can see a clear desc (vs. something that might look more like a chat dump)#2021-12-0200:40vemvClojure tooling projects are definitionally open-ended, have to constantly adapt to an ever changing (if not increasingly fragmented!) landscape. I'm not aware of any project that is, say, flawed by design, even the ones I don't use or like that much have a solid basis. Which is to say, if something doesn't work as it should, it simply needs more work, which happens to be unpaid, and to actually get quite in the way of one's day job :) We can always be the change we want to see in the world. That change can take many shapes: • create high-quality, reproducible issues over Github (which will always take a little more attention than over here) • fund work you are interested in, especially via your employer • contribute PRs fixing/strengthening any issues you may find. Emacs and Clojure are both hackers' tools - they are inspectable and modifiable at runtime. Getting started can be easier than it might seem.#2021-12-0200:46v3gaHow long have you been using emacs? I hate to be/sound this way but VS Code or IntelliJ may be the better fit. Emacs is for nerds, not everyone. I...AM A NERD. I'll tinker in emacs all day long, i'll tweak it until I force myself to stop. That brings me great pleasure. There are different types of developers and enthusiasts, those that take on a craft just to pay the bills and some interest and those that do what they like. Emacs is for those that do what they like and don't mind putting in ANY amount of hours towards it. My lord...i'm starting to sound like I belong to another certain lisp family. 👀#2021-12-0200:53v3gaThere's a season for all things, yes. I'll tone it down a bit but i'm very passionate about my email client!#2021-12-0201:15Drew Verlee> create high-quality, reproducible issues over Github (which will always take a little more attention than over here) Here is as specific as i can get, auto completion across namespaces for variables doesn't work on my company project in both doom emacs and spacemacs. Finding references: I'm aware of cider-find-var and lsp. Both fail quite often. Intelliji + cursive and vs code both seem working way to find clojure var references. I have seen it working, at this point its worth the effort to spend hours testing them out to see if they do it constantly. Today i was unable to eval an expression one file/namespace but not a sibling. And i watched a co worker do it using Vscode. using the exact same steps i did. [edit] after updating cider now this is working again. haza?! (im tired)#2021-12-0201:23Drew VerleeI just loaded the name space where i can't eval expessions in emacs in intelliji and it just works. thats why i dont think i can use emacs anymore. #2021-12-0202:04Charles ComstockHey, definitely appreciate that that sounds like a really frustrating problem to have and well worth reporting as an error, but maybe not so constructive to frame it as "therefor I can't use emacs" anymore? If it's not working that is understandably frustrating, and if at the end of the day you decide to switch editors that is certainly a valid decision. However, in this context it comes across less of a request for help (which I presume was your intent), or a bug report and more of an attack on emacs/cider? It sounds like you have had a really tiring day, so appreciate if that wasn't the intent or if things are a feeling a little more dire. All that said, reading between the lines of your problem description, you mention that auto completion only works in some namespaces and that eval was working on some namespaces but not others. I'm not familiar with cursive or the plugin for vs code, but I do know that cider doesn't evaluate the entirety of your project unless you tell it to. So as example if you eval namespace A, but it doesn't require or reference namespace B, you may not have loaded B into the project so the autocomplete may not be aware of it. One way to verify is to load namespace B, eval it, and then go back to A and see if those vars are completing. Likewise, if you haven't evaluated the namespace to force the requires to happen, you often cannot eval individual forms in that namespace. It's quite possible that cursive and vs-code are not using runtime evaluation to reflect the available variables and are using some other mechanism. There are positives and negatives to this approach, but definitely something that can bite you if you are not aware. It's tricky to guess given your explanation but maybe this rings a bell somewhere?#2021-12-0203:22Drew Verlee> One way to verify is to load namespace B, eval it, and then go back to A and see if those vars are completing. Thanks for the suggestion, i would love for this to be the problem. I tried this and it didnt' help. specifically ::file a (ns a (:require [ba :as b]) ;;file b (ns b) (defn blah...) eval file b eval file a b/* I expect b/blah to show up. it doesn't. This works when i try it in intelliji, and i have seen it work in vscode. It works maybe 1/5 times in emacs with cider nrepl. and mysetup.#2021-12-0203:27Drew Verlee> more of an attack on emacs/cider? It isn't, i have and im giving money to the project to help support it because it helps support me. This is a cry for help, and way to voice that either i have a problem or the community does. If its the former then maybe someone can point me to where the grass is greener, if its the later maybe we can fix it together if we talk about it. If i dont' hear anything then i need to move on, i can't afford (literately) to have my tools not be competitive.#2021-12-0203:44Charles ComstockOk, I'm going to make a simple test project to see if I encounter anything like this#2021-12-0203:53Charles ComstockJust to double check in your example above, did you actually require ba :as b or just b?#2021-12-0203:56Drew Verleei didn't actually setup something like that. I'm guessing if you make a toy shadow cljs project with something that simple it will work. My guess is that this happens at scale for some reason. If you have worked on large cljs projects and never run into this, that would be a useful data point for me.#2021-12-0203:56Drew Verleebut in my description i did mean [ba :as b]#2021-12-0203:58Charles ComstockRight but the other namespace listed is actually b, not ba, which means it wouldn't work in that case, so was just double checking that if you did ba :as b, the other namespace is ba, or that you require b :as b.#2021-12-0203:59Drew Verlee(ns a (:require [ba :as b])) (b/*)#2021-12-0203:59Charles Comstockis there a namespace ba defined?#2021-12-0203:59Charles Comstockor a namespace b defined#2021-12-0204:02Charles Comstock
;; src/test_var_completion/core.clj
(ns test-var-completion.core
  (:require [test-var-completion.dependent :as depend]))

(println depend/a-value)
;; src/test_var_completion/dependent.clj
(ns test-var-completion.dependent)

(def a-value 1)
#2021-12-0204:03Drew Verleei made a github ticket to add in the extra context. https://github.com/clojure-emacs/cider-nrepl/issues/732#2021-12-0204:03Drew Verleeit's hard to say what the failure point is, but im guessing its related to cljs or shadow + emacs + nrepl.#2021-12-0204:04Drew VerleeI never have this issue in a clojure project. But i also end up working more in large cljs codebases.#2021-12-0204:07Charles ComstockGotcha, yea I'm not familiar with using shadow-cljs. I do use figwheel-main quite frequently on a semi-large project (15kloc of cljs/cljc). There are definitely a few places where the clojurescript support is a little more finicky, but I haven't experienced the issue you are referring to.#2021-12-0204:10Charles ComstockI do think trying to make a minimal shadow-cljs project demonstrating the problem that would really help in diagnosing the issue though!#2021-12-0204:16Charles ComstockOh one other thing that I noticed somewhere you described the problem as happening when one buffer said it was cider connected and the other did not? Did I understand that correctly?#2021-12-0204:28Drew Verleesee https://github.com/clojure-emacs/cider-nrepl/issues/732 for a toy project where i (hopefully) re-created at least something close to the issue. I'm glad you pushed me to do that. I would also be shocked if it was that easy to trigger and no one else was crying about it. However, im worried ill wake up tomorrow, follow the same instructions, and it will work. no one else will exp it, then the ticket will be closed, and the issues i see constantly and daily will continue to haunt me. 😢#2021-12-0204:32Drew Verlee> Oh one other thing that I noticed somewhere you described the problem as happening when one buffer said it was cider connected and the other did not? Did I understand that correctly? That's correct. I suspect there are a couple of things wonky at once unfortunately. That issue went away after i updated cider (i was on a very recent version though). I suspect it was more about restarting my repl for the 3rd time then the update.#2021-12-0204:51Charles ComstockYea I don't have any particular solution on the connected buffers issue, but I have experienced something funky there a couple of times, but have always been able to fix it by just forcing a reconnect. It's always really rare though and involved me doing something weird like update cider at the same time, swap between multiple projects. Haven't put my finger on what triggered it, but reconnecting from scratch always fixed it and then never had any issue after. It is frustrating when it happens but it was always weird enough I kinda assumed I got it confused in a wedged state.#2021-12-0204:51Charles ComstockThat said, I would definitely report that as a separate issue than the completion. If the buffer is not connected to cider, then all of the niceties will definitely not work.#2021-12-0204:52Drew Verlee> If the buffer is not connected to cider, then all of the niceties will definitely not work. That was the first time that happened and ill consider it a one off unless it comes up again 🙂.#2021-12-0204:54Charles Comstock(just for context I've encountered the cider connection confusion issue maybe every other month or so, and I use it daily so hence why I haven't submitted my own bug report)#2021-12-0204:55Charles ComstockAnyway, I will check in on this later, but hopefully the bug report helps, and even if it does work cleanly tomorrow maybe that will help diagnose it#2021-12-0201:24Drew Verlee• same project • same repl • different editor#2021-12-0203:43Drew VerleeThanks for the help, everyone. i started this conversation in hash_emacs because i wasn't sure where to go with it. Likely this is a cljs/shadow + cider issue and i have a github ticket for it. https://github.com/clojure-emacs/cider-nrepl/issues/732#2021-12-0203:50Drew VerleeTo add context, i'm currently at my third cljs job and in all three i feel constantly hamstrung by inconstant autocompletion and searching (find refs, declaration). The tools are constantly evolving (lsp, cider, etc..) and i have been very diligent in keeping up with those changes, but even now things are very inconsistent. But when i see my co workers use intelliji or vscode, these things just seem to work. Given a small sampling of Intelliji myself, it seems to be the case. Part of me voicing this here is so that we can learn from each other, if your experience has been drastically different please let me know. Share your setup and ill try it. Maybe ill learn its something specific to my project, or computer or whatever.#2021-12-0207:03practicalli-johnCursive has been around for many years now and piggy-backed off the Intellij static analysis that had then been around for many more years. I think clojure-lsp has only been very actively worked on in the last year (and now has new releases every few weeks) So Cursive should give a highly polished results every time. I expect clojure-lsp, now that has significant funding from Clojurist Together to quickly catch up to Intellij For now, it you want to jump to definitions, references and all the static analysis based features, then cursive seems the safer choice (as would be paying for a licence to do commercial work with cursive)#2021-12-0210:42Drew Verlee> I expect clojure-lsp, now that has significant funding from Clojurist Together to quickly catch up to Intellij If the analysis is better in LSP then cider, and it works cross platform (clj and cljs) then we should at least give emacs users the option for completion to come lsp right? Even via a function call? Maybe that already exists?#2021-12-0212:43practicalli-johnCompletion does come from LSP if using an LSP client in Emacs along with the specific language server process for the language currently being used (and it's all set up correctly in Emacs + Doom and Spacemacs make this relatively easy)#2021-12-0212:45practicalli-johnCider does not so any static analysis as far as I know. Cider understands all the expressions of the project that have been evaluated in a REPL started by Cider or correctly connected to from Cider.#2021-12-0212:54practicalli-johnFor an unfamiliar codebase of noticeable size or complexity, LSP already adds effective navigation through references (and now unit test count). I have used these LSP features effectively for Clojure and basic ClojureScript, but never used shadow-cljs enough to make assessment. Other people are using the same features for other editors (neovim, calva). However the LSP project is relatively new compared to the work done by Intellij (and the developer of cursive) It's therefore much more likely that issues will arise with LSP and many people are contributing bugs and fixes.#2021-12-0215:11Drew Verlee> Completion does come from LSP if using an LSP client in Emacs along with the specific language server process for the language currently being used (and it's all set up correctly in Emacs + Doom and Spacemacs make this relatively easy) I am running the emacs lsp client and Server. vemv suggested completion was coming from cider however. > Cider does not so any static analysis as far as I know. Cider understands all the expressions of the project that have been evaluated in a REPL started by Cider or correctly connected to from Cider. I linked a small example in the GH issue i posted on cider, it didn't matter if i evaled the var i expected to be autocompleted. > For an unfamiliar codebase of noticeable size or complexity, LSP already adds effective navigation through references (and now unit test count). LSP find definition or find reference currently works for me about 3/5 of the time. I can confirm at times it wont find references with a text search. I'll try to make some specific examples modeled around what i'm seeing. What i would be curious about is if it was working more often in VScode.#2021-12-0216:16practicalli-johnAs you may know there is more than one way to do things in Emacs. Cider can generate data for the completions backend as well as an LSP implementation.There is a lot of cross-over between CIDER as an IDE and an LSP client ans server implementation. I suspect there always will be unless there is more investment in Cider. And of course there are also different completion backends. This is why I use Spacemacs, as someone else has worked this out for me. I'll dig out your example from #cider and give it a try.#2021-12-0216:42ericdalloIf you manage to reproduce references/definition not working for clojure-lsp, please open an issue with minimal repro#2021-12-0219:08vemv> vemv suggested completion was coming from cider however. depends on whether you're using cider-nrepl + piggieback, or LSP. Both are different stacks. Are you running LSP at all? That would be great info to reflect in your GH issue.#2021-12-0204:00vemv@drewverlee There are a few things that have never been implemented to begin with, as cljs is trickier. Others have been historically slow (e.g. clj-refactor's cljr-slash , which I believe is finally fast again). Around 2017 I was a full-time cljs dev using cider, clj-refactor and figwheel "classic". Nowadays shadow-cljs appears to be more common, and Sesman is part of the mix as well which AFAICT wasn't all that smooth. From that 2017 experience I recall essentially flawless autocompletion and other core features (go to definition, cljr-slash). Definitely enough to get the job done. Probably right now the landscape is a little more complex, but also the codebases are much stronger so a flawless experience as you seek seems definitely possible. A key ingredient is actually making those happen. If nobody contributes / reports issues etc things will naturally degrade.#2021-12-0211:50pezIt is not flawless in Calva either, just putting that in here. Agree with @vemv, we need reports about how it works out there and also info about expectations in order to bring things closer to flawlessness. (Contributions towards fixing things are of course also welcome, but the first step is always to know more about problems.)#2021-12-0215:19Drew VerleeIm trying to get a sense of the field. how easy it is to do some common tasks. Git searching clojure evil mode movement etc... Emacs does this to my satisfaction in a lot of areas, which is why i haven't bit the bullet and moved.#2021-12-0215:52pezI think @U07FP7QJ0 started collecting some info about this… Sorry if I miss-remember, Arne, I don’t want to spam you! 😃#2021-12-0309:28plexusmaybe you're thinking of this? https://docs.google.com/spreadsheets/d/1PjW5Vaz3-DSTx6fkfHVbwVV5J6cfKq3xttwnwgzNS8Q/edit#gid=0 doesn't quite fit the bill maybe but it can be a starting point#2021-12-0313:14pezYes, that was it. A piece in the puzzle, hopefully.#2021-12-0215:11Drew Verlee> Completion does come from LSP if using an LSP client in Emacs along with the specific language server process for the language currently being used (and it's all set up correctly in Emacs + Doom and Spacemacs make this relatively easy) I am running the emacs lsp client and Server. vemv suggested completion was coming from cider however. > Cider does not so any static analysis as far as I know. Cider understands all the expressions of the project that have been evaluated in a REPL started by Cider or correctly connected to from Cider. I linked a small example in the GH issue i posted on cider, it didn't matter if i evaled the var i expected to be autocompleted. > For an unfamiliar codebase of noticeable size or complexity, LSP already adds effective navigation through references (and now unit test count). LSP find definition or find reference currently works for me about 3/5 of the time. I can confirm at times it wont find references with a text search. I'll try to make some specific examples modeled around what i'm seeing. What i would be curious about is if it was working more often in VScode.#2021-12-0415:02Drew VerleeHow do i link a cider session to my ELISP repl so i can answer these questions in the GH issue? https://github.com/clojure-emacs/cider-nrepl/issues/732#2021-12-0818:30Cora (she/her)for anyone using clojure-mode, here are some useful indents#2021-12-0818:31Cora (she/her)
(define-clojure-indent
    (defroutes 'defun)
    (GET 2)
    (POST 2)
    (PUT 2)
    (DELETE 2)
    (HEAD 2)
    (ANY 2)
    (OPTIONS 2)
    (PATCH 2)
    (rfn 2)
    (let-routes 1)
    (context 2)
    (ns '(1 0)))
#2021-12-0818:31Cora (she/her)the ns one is to match intellij cursive's indentation of ns#2021-12-0818:43Macrozwe have the cursive users match to emacs/cljfmt settings#2021-12-0818:44Cora (she/her)I guess it can go one way or another ¯\(ツ)/¯#2021-12-0818:44Cora (she/her)we have more cursive users than emacs users#2021-12-0818:48Cora (she/her)it's funny, cljstyle does it like intellij#2021-12-0819:01Macrozwe had originally more Emacs users but it's the LISP standard on some ways too#2021-12-0818:32dpsuttoni’d never heard intellij used a different ns indent. interesting#2021-12-0818:32Cora (she/her)I run into it at work all the time#2021-12-0818:32Cora (she/her)it's annoying#2021-12-0818:55dpsuttoni can imagine#2021-12-0818:58Cora (she/her)in an extra bit of fun news: cljstyle indents ns like intellij while cljfmt indents ns like emacs#2021-12-0818:59lukaszyou can make cljstyle work like emacs though: https://github.com/lukaszkorecki/command-center/blob/master/etc/cljstyle#2021-12-0819:00dpsuttonits a good marker to know at a glance who last edited the file 🙂#2021-12-0819:03Cora (she/her)@lukaszkorecki I think cljfmt could be made to work like intellij, too?#2021-12-0819:03Cora (she/her)I'm pretty indifferent, but we have more intellij users than emacs users#2021-12-0819:05lukaszI'm not sure, but it's a good question: in my team we have all of the editors (interllij, emacs, doom emacs, vim, vs code) and I'm forcing everyone to use cljstyle + shared config. So having the same tool integrated into all editors would be neat#2021-12-0819:09Cora (she/her)oh, I'm using doom emacs, too, but I don't think they fiddle with clojure indents#2021-12-0819:10Cora (she/her)they add a +clojure-disable-lsp-indentation-h function#2021-12-0820:42Cora (she/her)is anyone using a mode for asciidoc?#2021-12-0820:42Cora (she/her)there are a few out there#2021-12-0823:31lreadFunny you should mention adoc @corasaurus-hex, I’m just learning/setting up doom emacs and have just configured adoc-mode. (I don’t know if there are better choices, sorry).#2021-12-0823:32lreadI used this package in spacemacs too and found the the default font choices rather odd.#2021-12-0823:33lreadBut you can override them (https://randomgeekery.org/config/emacs-bmw/#headline-37):
(use-package markup-faces
  :config
  (set-face-attribute 'markup-title-0-face nil :height 1.0)
  (set-face-attribute 'markup-title-1-face nil :height 1.0)
  (set-face-attribute 'markup-title-2-face nil :height 1.0)
  (set-face-attribute 'markup-title-3-face nil :height 1.0)
  (set-face-attribute 'markup-title-4-face nil :height 1.0)
  (set-face-attribute 'markup-title-5-face nil :height 1.0)
  (set-face-attribute 'markup-secondary-text-face nil :height 1.0)
  (set-face-attribute 'markup-meta-face nil
                      :height 1.0
                      :foreground (face-attribute 'font-lock-comment-face :foreground))
  (set-face-attribute 'markup-meta-hide-face nil
                      :height 1.0
                      :foreground (face-attribute 'font-lock-comment-face :foreground))
  (set-face-attribute 'markup-list-face nil
                      :background (face-attribute 'font-lock-builtin-face :background)
                      :foreground (face-attribute 'font-lock-builtin-face :foreground))
  (set-face-attribute 'markup-table-face nil
                      :background (face-attribute 'font-lock-builtin-face :background)
                      :foreground (face-attribute 'font-lock-builtin-face :foreground))
  (set-face-attribute 'markup-verbatim-face nil
                      :background (face-attribute 'font-lock-string-face :background)
                      :foreground (face-attribute 'font-lock-string-face :foreground)))
(`markup-faces` is included with adoc-mode)
#2021-12-0823:34lreadHonestly, I often switch to Calva when editing markdown because its preview is pretty sweet.#2021-12-0823:38Cora (she/her)nice!! thanks!#2021-12-0823:38Cora (she/her)and yeah, vs code does a lot of great things#2021-12-0823:42lreadOh yeah, I meant VS Code…. simple_smile#2021-12-1422:48Edward CiafardiniI am using Emacs with Prelude. Recently, when I type M-x, it doesn’t open the prompt to execute commands anymore. I typed C-h k then M-x and it seems to be mapped to M-b now….. Any idea of how to fix this?#2021-12-1520:46agHas anyone figured out a way to turn java stacktraces to a nice list of namespaces/files? Why something like this:
at clojure.core$some.invoke(core.clj:2696)
can't be shown maybe something like:
clojure.core/some -- at src/clj/clojure/core.clj:2696
I refuse to believe there is no Emacs mode for that
#2021-12-1521:28ericdallomy guess is that @U04V15CAJ already asked himself something similar when implementing babashka:sweat_smile:#2021-12-1522:02agwhy? exceptions in bb scripts show something nicer?#2021-12-1522:04ericdalloyes :)#2021-12-1522:05ericdalloI think borkdude improved the exceptions for some cases, I remember he saying that somewhere#2021-12-1522:05ericdalloanyway, I don't think there is a emacs mode for that unfortunatelly :/ , a clojure lib that parses that would be really cool#2021-12-1522:09agyeah, anything would nice. I don't like staring into stacktraces (no one does), most of the time, instead, I choose to stare at the relevant code. But when something fails in CI, I look at them and I feel like this is exactly how "hating the job" and the burnout starts.#2021-12-1522:17borkdudeThe stacktraces that babashka shows aren't real Java stacktraces but interpreter stacktraces. But I think the necessary information is in the stack frames to make it look like that in normal Clojure#2021-12-1614:34andy.fingerhutDoes Clojure on the JVM keep full paths to source files? I thought discarded the directories and only kept the final file name?#2021-12-1614:35andy.fingerhutwhich if so, is at least one reason to use a variety of source file names, in particular avoiding core.clj in projects#2021-12-1614:40borkdudehmm yeah it seems so. https://twitter.com/borkdude/status/1404016344245415939#2021-12-1614:42borkdudealthough namespace names can be traced back to a file using io/resource and demunge#2021-12-1610:27borkdudeI'm trying to upgrade prelude on a linux system but I'm getting:
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "editorconfig")
  require(editorconfig)
  eval-buffer(#<buffer  *load*-522120> nil "/home/borkdude/.emacs.d/core/prelude-editor.el" nil t)  ; Reading at buffer position 14829
  load-with-code-conversion("/home/borkdude/.emacs.d/core/prelude-editor.el" "/home/borkdude/.emacs.d/core/prelude-editor.el" nil t)
  require(prelude-editor)
  eval-buffer(#<buffer  *load*> nil "/home/borkdude/.emacs.d/init.el" nil t)  ; Reading at buffer position 4770
  load-with-code-conversion("/home/borkdude/.emacs.d/init.el" "/home/borkdude/.emacs.d/init.el" t t)
  load("/home/borkdude/.emacs.d/init" t t)
  #f(compiled-function () #<bytecode 0x1e0f4d>)()
  command-line()
  normal-top-level()
Any hints @bozhidar?
#2021-12-1610:28borkdudeI made sure to install editorconfig - I don't even know why, but I did#2021-12-1610:34borkduderemoving the package editorconfig worked#2021-12-1918:53Drew VerleeHow do i figure out whats underyling the file path in red and why its going that?#2021-12-1918:54Drew Verleeit seems to be lsp adding that breadcrum. ill move the conversation there.#2021-12-1918:56ericdalloYes#2021-12-1918:56ericdalloIt's the LSP-mode breadcrumb#2021-12-2016:29dharmaturtleNoob here. I'm on vanilla Doom (and therefore Ivy) and am trying to follow the instructions https://www.reddit.com/r/spacemacs/comments/aibvd5/open_a_magit_buffer_for_a_projectile_project/eemxed5/. In particular: > SPC p p then choose your project with M-o v instead of RET or call (counsel-projectile-switch-project 13) directly When I press M-o it takes me to facemenu-keymap, and therefore M-o v is undefined. I'm guessing Doom changed something. I have no idea what it means to "call (counsel-projectile-switch-project 13) directly". I associate parens with editing with the config, and I'm pretty sure that's not what the poster meant. I don't see counsel-projectile-switch-project in M-x, and even if I did I would have no idea how to pass 13 to it. I believe https://github.com/hlissner/doom-emacs/blob/develop/modules/completion/ivy/README.org#plugins, but M-x counsel yields nothing. What am I missing?#2021-12-2017:01jkxyzI think that new installs of Doom now default to using vertico, but you can check which is enabled in your init.el. Not sure exactly what that reddit thread is asking, but if you're trying to get opening a project to run magit-status, I have this in my config:
(defun jk/switch-project-action (dir)
  "Run `magit-status' after switching to a new project."
  (magit-status))

(setq +workspaces-switch-project-function #'jk/switch-project-action)
#2021-12-2017:07dharmaturtleThat's pretty much what I wanted - and your config works for me. Thanks!#2021-12-2214:31bozhidarFYI - https://metaredux.com/posts/2021/12/22/cider-1-2-nice.html#2021-12-2307:47Drew Verleecan you explain why this is > Still, there was no easy way to just connect to a regular nREPL server and teach it all the tricks that CIDER needs it to know. I had thought most of the cider logic was in the server, when you say CIDER are you talking about the client? (emacs program?)#2021-12-2307:48Drew Verlee> By the way, did I mention that now nREPL’s sideloader is fully supported in CIDER, so you can load random Clojure libraries (not just nREPL middleware) on demand Awesome. (though i mostly work in cljs)#2021-12-2307:51Drew Verlee> Auto-fetch Java Sources and Javadocs yea! > (Lein-only) awww :cry does somethng out of this lib just need to be made to work with deps? https://github.com/clojure-emacs/enrich-classpath#2021-12-2307:53Drew Verlee> ClojureScript support continues to be an area that needs a lot of love 🙂#2022-12-2812:32bozhidar> I had thought most of the cider logic was in the server, when you say CIDER are you talking about the client? (emacs program?) Yes, for me CIDER has always been only the Emacs client. And yeah - the bulk of the code is on the server-side, so I was most referring here that you need cider-nrepl to support all of CIDER's features.#2022-12-2812:34bozhidar> does somethng out of this lib just need to be made to work with deps? https://github.com/clojure-emacs/enrich-classpath Yep, there's even an open PR with a potential idea. With Lein it was easy to integrate the library as a plugin, so we "magically" fetch the necessary things and update the classpath, but with tools.deps it's not super clear how to do this, without creating some wrapper around the clj command. I guess it's not particularly hard, but neither me, nor @U45T93RA6 uses tools.deps, so we'll leave it to someone else to tackle this.#2022-12-2813:04vemvThe lib itself needs no modifications. The problem indeed is how you invoke it: Lein has plugins, t.deps has not. So as mentioned we are inclined towards a clojure wrapper as shown in https://github.com/clojure-emacs/enrich-classpath/pull/8 . That PR works perfectly fine for its author btw, it's just that I don't consider it prod-quality yet. Someone else could pick that PR, that would be much welcome since its author is not as available these days.#2022-12-2813:07vemv> I guess it's not particularly hard, but neither me, nor @U45T93RA6 uses tools.deps, fwiw, I work with t.deps, both at work and with random git clones. My trick is to wrap tools.deps with Lein. Lein is so powerful that you can implement tools.deps in it in 100LOC and no external plugins. Here's an example of a project.clj that will parse sibling deps.edn files: https://github.com/jonase/eastwood/blob/8c920f6c8f1ec2aab78618fd71c6866207b1fa3f/.circleci/deps_project.clj So that's another way of using enrich-classpath in deps.edn projects, which I use daily. More of a personal hack than something I'd want to be widespread.#2022-12-2813:08vemvLastly, I reckon enrich-classpath will remain disabled by default for a couple more weeks. Couple fixes incoming#2022-12-2814:01Drew Verleethanks for the insight#2021-12-2317:25lspectorIs there currently beginner-friendly emacs Clojure setup with these properties? 1) cross-platform Mac/Windows, 2) trivial setup/config on both platforms, 3) bracket matching and re-indentation that works on incomplete expressions, 4) all basic functionality (incl buffer management, editing, repl interaction) accessible via menus or other standard UI elements, without requiring understanding emacs-specific concepts or key chords, etc.#2021-12-2317:29vemvProbably you'd be better off with Calva / VS Code, which afaik is quite hacker-friendly and definitely a polished project :) I say this because distros tend to be big and constantly changing, so you are doomed to tweak / understand what's going on#2021-12-2317:30vemvre-indentation that works on incomplete expressions might be an unsolved problem in general :) I think that once you get the hang of paredit or equivalent you won't really feel such a need#2021-12-2317:36andy.fingerhutI have a personal Emacs setup that I rarely tweak, but I only do Clojure as a very part-time hobby, and am happy with Clojure-mode for colorization of comments/keywords/strings differently, basic indenting features, and inf-clojure for very basic REPL interaction. If I were doing Clojure development full time, I would likely be looking to either spend at least a week's worth of time spread over months tweaking that Emacs configuration, or looking seriously at VScode+Calva or IntelliJ+Cursive.#2021-12-2317:47Ben SlessOn the subject of setting up spacemacs, it requires just adding to configuration layers the symbol clojure#2021-12-2317:47Ben SlessEverything else is handled for you#2021-12-2317:47Ben SlessBut backtracking, why emacs?#2021-12-2317:55vemv> Everything else is handled for you Perhaps I'd phrase it as everything else is intended to be handled to you, but that is an arduous task in a buggy, ever changing world So it's sort of a leaky abstraction. Emacs (whether it's homegrown or from a distro) requires one be willing to debug things from time to time, especially when API breakage is commonplace and the dependency manager has its quirks. I wouldn't give up Emacs for anything else but personally I haven't yet witnessed a flawless, 'packaged' experience.#2021-12-2317:58lspector@U45T93RA6 Calva is indeed a near miss, currently mostly just missing re-indentation of incomplete expressions, for which I've posted an issue. Lately I've been using Cursive, which does a better job of that, as have other tools in the past (like Counterclockwise and quite a few Common Lisp tools, etc).#2021-12-2318:05lspector@UK0810AQ2 perhaps there's no good answer to "why emacs," except that I try to re-evaluate my choices periodically and someone recently showed me that gnu emacs does have buffer management in a menubar at least, so I wondered if there was a more complete emacs-based solution these days that I should be considering. It sounds like the answer is probably no, and that I'll probably stick with Cursive or maybe switch to Calva if the indentation situation improves. FYI the main downside of Cursive for my situation is the huge amount of incidental complexity, involving things that my students won't understand or have any use for, but which must be dealt with in one way or another (even if just to ignore them) to do simple things.#2021-12-2318:09andy.fingerhutIf your students learn "I'm giving you one way to set up editing for this Clojure programming language that I understand and can help you with. Programmers throughout the world get into holy wars on preferences over such things, and you are welcome to participate in them outside of class, but if you have questions about the setup I've given you, I can help you. If you are a software developer for any significant length of time, you will likely develop your own strong preferences and customization settings for your favorite editor environment over time, and/or for several editor environments at different times in your life." That is a nice heads-up for anyone who hasn't learned that already, for what is probably coming.#2021-12-2318:10lspector@U45T93RA6 FWIW I know this is controversial but as a many-decades Lisper and Lisp teacher, I find paredit to be counterproductive, both for myself and for my students. I probably should have added requirement 5) paredit is off by default, or easy to turn off. Same for parinfer, but more so.#2021-12-2318:14Thomas HarnedCheck out #doom-emacs - it's got a very nice Clojure setup right out of the box. The one caveat is that it uses vim keybindings, so it helps to have some vim experience#2021-12-2318:15lspectorThanks @U0CMVHBL2 -- that's good advice!#2021-12-2318:21lspectorThanks @U01BTEYDC05 -- I will check it out, although I'm doubtful that vim keybindings will be helpful in my context. I'm aiming for as close as possible to no learning curve, because the editor behaves like the text editing environments they already know from the rest of their lives, just with some extra Clojure programming goodies (bracket matching, re-indentation, send to REPL, etc) that are easily discovered and used via standard UI elements.#2021-12-2318:22Ben SlessI found from experience that vanilla spacemacs + clojure "just works" ootb. However, if you want to go for the least opinionated platform, it would probably be VS Code. If you're targeting students, it's also fair to ask yourself if you're imposing your habits on them. If they're used to some form of text editing, I wouldn't force them out of it.#2021-12-2318:24Thomas HarnedTo @UK0810AQ2’s point, if you're looking for as close as you can get to "zero learning curve", you'll likely want to skip emacs altogether and use something like VS Code. Emacs is awesome, but it has a ton of unique quirks that will frustrate beginners.#2021-12-2318:26Ben SlessAs much as I like Emacs, I second this, go with VS Code and save ~yourself~ them the trouble#2021-12-2318:26lspectorYep, Calva and Cursive do appear to be the best options at the moment. Calva is currently missing one crucial feature (re-indenting incomplete code) and Cursive is thick with incidental complexity.#2021-12-2318:26lspectorI was just trying to see if a better emacs-based solution had emerged in the years since I last checked.#2021-12-2318:28Ben SlessOOTB it would either be Spacemacs or Doom, both with CUA. If you want to get a feel for the viability of these solutions, and it's for students, I'd suggest the following: • try them both yourself. See how they pan out. You can disqualify them immediately if they don't meet your expectations • Find some 10 volunteer students. split to two groups at random, have them try one configuration or the other, see how it works for them#2021-12-2318:28Ben SlessTo make an informed decision, you need information#2021-12-2318:29lspectorFWIW something much lighter weight would be even better, and I periodically also try to check text editors that have plugins... but so far all lack something crucial like (most often) re-indentation.#2021-12-2318:30lspectorOnce upon a time there was something called Clooj that was great, but I think it was abandoned, and Nightcode was great until, I think, parinfer became mandatory...#2021-12-2318:52ericdalloI see doom-emacs as the closest choice for what you seek besides Calva/vscode#2021-12-2322:24lspectorThanks all. Just fyi I explored a bit more and plan to stick with Cursive unless maybe Calva gets re-indenting for incomplete code before my spring semester starts, in which case I'll consider switching tho that. Some day I do hope that emacs "catches up" with the FRED editor that came with Macintosh Common Lisp in the 80s and 90s, which was basically emacs under the hood (but programmed in common lisp) and met all of my criteria here except for not being cross-platform and of course being a common lisp rather than Clojure environment.#2021-12-2322:25andy.fingerhutWith enough Elisp coding, time, frustration, and effort, I'm sure you can make Emacs behave like almost anything you want, but then, anywhere is walking distance if you have the time. One often does not have that kind of time 🙂#2021-12-2322:26ericdalloI already recommended doom-emacs for a lot of friends/co-workers, and I don't see it like something it needs a lot of knowledge, doom's has modules which when enabled makes emacs behave like modern IDEs :)#2021-12-2322:47lspector@UKFSJSM38 thanks but the installation instructions themselves for doom-emacs made me pretty sure this wasn't going to be a winner for me because of condition 2 (trivial setup/config). Probably fine for many, but for some of my undergrads, particularly those with Windows machines, this looks like too much.#2021-12-2401:42cstby@U06BV1HCH I'm curious to hear more about how you find paredit counter-productive. I haven't heard anyone say this before.#2021-12-2402:54lspectorI find paredit counter-productive in several contexts. I guess what I'm talking about here is strict paredit, which enforces structural soundness. I teach, and my students are usually learning a lot of new things at once, including a new language, a new programming paradigm, AI concepts, and how to develop and execute scientific research projects. I don't want them to have to learn a new way to type on top of all of this. They have well-honed text editing skills from other contexts, and I want to let them use them and get on with the work of thinking about functional programming and AI. If the editor reindents on command, then the student can see where the structure is messed up, or isn't what they intended. And they can use their existing editing skills to fix it. I can see the frustration when they're trying to do something but can't make the editor behave, preventing them from typing or moving things, or typing things they didn't ask for (like closing brackets). Another context is my own coding work. I often jump around when I'm writing, write things out of order and rearrange them, etc. I want to do this in the same way that I edit any text, which means lots of intermediate states that aren't structurally sound.#2021-12-2408:13magnarsWhile I see your point in not overloading students with new concepts, jumping around, writing things out of order, rearranging them, etc, sounds to me like a dream scenario for structural editing, not vice versa.#2021-12-2414:11lspectorI can see how structural editing would help with some ways of editing out of order, etc., but it absolutely drives me bonkers. I've been Lisping for about 35 years and still, if I have to work in a strict structural editor, I soon end up copying code into a plain text editor, editing it there (without bracket matching or re-indentation 😞), and then pasting it back into the structural editor. Super frustrating. I think one thing I often want to do is to make two copies of a bunch of code, which may itself not be balanced, and then remove different parts of each, which may end up structurally different. Trivial and natural using the editing skills that are built in to my muscles from all of the other writing and editing I do, but a weird puzzle that I have no interest in solving to edit structurally. Another thing that I think I often do is comment/uncomment chunks of code that may not be balanced, and then patch up the imbalance manually. Again, almost automatic from muscle memory using the skills I'm using to type and edit this comment, but a puzzle I don't want to think about to do structurally.#2021-12-2514:58magnarsSounds to me like you're set in your ways. That's fine, but don't confuse your habits with proper arguments. I also found it super frustrating to learn structural editing, having spent 24 years editing code without it. I even ranted about it on the Emacs IRC channel, at which point Phil Hagelberg said these undying words: "If you think paredit is not for you then you need to become the kind of person that paredit is for." That turned me around, and on the third attempt I was able to power through the pain. It was certainly worth it.#2021-12-2515:48lspectorI'm not making an argument for my preferences, or opining about what kind of person anyone else should be. As a teacher of diverse classes of newcomers, though, I will indeed argue that paredit can be counterproductive. In this context it's super helpful to have an environment that allows people to edit using the same skills and muscle memory and expectations that they bring to editing in the rest of their lives, with no editing-specific learning curve, aided by bracket matching and re-indentation that works on incomplete code. As it happens, that's what I want for my own coding as well, although of course others want different things.#2021-12-2516:08magnarsAgreed. Learning paredit at the same time as Clojure is for most people a step too far.#2021-12-2514:24ChaseHow is parinfer working on emacs these days? parinfer-rust works perfectly for me on vim while allowing for paredit functionality too (with vim-sexp ) but I'm getting my annual itch to get emacs up and running again. Just last time, I could not get parinfer smart mode working#2022-12-2705:09mister_mSpeaking of structured editing, does anyone have an easy introduction to paredit? I'm finding the C-h m help to be confusing.#2022-12-2707:37p4v4n@U01188CHUFL There is http://danmidwood.com/content/2014/11/21/animated-paredit.html#2022-12-2708:24vemvI remember the cheatsheet helping me out back in the day! I printed it and made sure to have it at hand :) https://github.com/joelittlejohn/paredit-cheatsheet/blob/master/paredit.pdf#2022-12-2715:59mister_mThank you both#2022-12-2900:50cl_jclojure-align in emacs blocks for a few seconds, anybody knows how to solve the problem?#2022-12-2906:57hindolHave you tried running the emacs profiler to understand which function blocks?#2022-12-2907:14cl_j
- command-execute                                                  54  61%
 - call-interactively                                              54  61%
  - apply                                                          54  61%
   - 
#2022-12-2907:15cl_jDon't know why lsp-format-region is there#2022-12-2907:25hindolHere's mine. My Emacs does not block like yours. Are you using clojure-lsp alongside CIDER by the way?#2022-12-2907:26hindolI am using Emacs with native comp by the way.#2022-12-2907:32cl_jyes, I have both lsp and cider running#2022-12-2908:04hindolMy indent-region function does not have a reference to lsp-format-region anywhere. Maybe activating LSP adds those extra calls.#2022-12-2908:09vemvA couple relevant defcustoms:
(setq lsp-enable-on-type-formatting nil)
(setq lsp-enable-indentation nil)
#2022-12-2910:36cl_j@U45T93RA6 Thanks very much!#2022-01-0119:58Ted CiafardiniBeen messing with my emacs prelude configuration and trying to get clj-kondo as the main linter for clj cljs and cljc files- So far it is working in clj files, but with cljs I am seeing this in the flycheck logs:
Syntax checkers for buffer portfolio.cljs in clojurescript-mode:

First checker to run:

  lsp (explicitly selected)
    - may enable: yes
    - may run:    t

Checkers that could run if selected:

  clj-kondo-cljs  select
    - may enable: yes
    - may run:    t
    - executable: Found at /opt/homebrew/bin/clj-kondo
Does anyone know how to override this? I am still pretty new to emacs, and I think there’s a simple solution, I just don’t know it gratitude
#2022-01-0120:00borkdudeAre you also using Clojure LSP by any chance?#2022-01-0120:00Ted Ciafardiniyes!#2022-01-0120:00Ted CiafardiniI mean - yes.#2022-01-0120:01borkdudeThen you don't need to configure clj-kondo as that comes bundled with it #2022-01-0120:01Ted Ciafardinilol sorry, been messing with this for hours and I got excited#2022-01-0120:02Ted Ciafardinithanks, I’ll look into this *#2022-01-0120:02borkdudeClj-kondo provides most of the linting in Clojure LSP and LSP also uses the analysis, so if you configure clj-kondo correctly LSP will also behave better #2022-01-0120:01Drew VerleeHow do you develop on emacs itself? I would like to use emacs to debug emacs by say printing some state when i'm running a command e.g cider-jack-in-cljs can i do that with the emacs function message or sometthing that will dispaly output (maybe to the messages buffer)#2022-01-0120:04ericdalloyes, I use (message "---> %s") all the time 😅#2022-01-0120:04ericdallothere are emacs debugger but I never got it working correctly to me#2022-01-0120:05ericdallomy emacs dev workflow is usually changing functions and evaluating and checking results, similar to clojure but without a lsp#2022-01-0120:10Drew Verlee@UKFSJSM38 i added my expression `(message "test") in the .el file and saved it. Then re-ran the command i'm sure it's in and didn't see the message in the *message buffer. What do i need to do to see it?#2022-01-0120:11Drew VerleeDo i have to tell emacs to reload stuff?#2022-01-0120:11Drew Verleeyes.#2022-01-0120:11Drew Verleecalling reload-file then calling the function shows the message.#2022-01-0120:12Drew Verleetime to go add elisp to my resume
#2022-01-0120:12Drew Verleemy starting rate is 1000 moon dollars.#2022-01-0120:12ericdalloYes, I use , e e or , e d#2022-01-0120:12ericdalloWhich is eval-defun I think#2022-01-0120:13Drew Verleethats nice, its the same hot keys as clojure.#2022-01-0120:13ericdalloElisp is awesome!#2022-01-0120:13ericdalloExactly!#2022-01-0120:15Drew VerleeYea. I have the time and motivation to get into it. I'm always curious when i see people going really deep into emacs to the point where it's a full layer ontop of there operating system.#2022-01-0120:24ericdalloYeah, maybe some day I migrate from BSPWM to EXWM 🤞 😛#2022-01-0121:02Drew Verlee@eric do you know of a good place to ask elisp questions? i don't want to overburden you or the clojure slack.#2022-01-0121:11ericdalloDoom's discord and emacs-lsp have channels for that which there usually people that help#2022-01-0121:12Drew Verleebut they will discover i use spacemacs and ill be run out of town.#2022-01-0121:12Drew Verleeill look into the emacs lsp channel.#2022-01-0121:10Drew VerleeIs risky-local-variable something specific to emacs here:
;;; Jack-in dependencies injection
(defvar cider-jack-in-dependencies nil
  "List of dependencies where elements are lists of artifact name and version.")
(put 'cider-jack-in-dependencies 'risky-local-variable t)
#2022-01-0121:10Drew Verleei need a way to quickly share the full context of the code i want to ask about#2022-01-0121:11Drew Verleeif this was my clojure project i would do a git-commit and link it.#2022-01-0121:11Drew Verleeon a meta level, i wounder how much time and money is lost trying to hide software that has little impact on a business IP.#2022-01-0121:16Drew Verleeoh, risky-local-varable... is the value were putting.#2022-01-0121:16Drew Verleebut...#2022-01-0313:38paulspencerwilliamsHappy New Year all. During my Christmas break, I performed a clean MacOS reinstallation and, in doing so, have lost the snowflake / magic configuration that allowed me to send meta to Emacs from my external WASD ISO USB keyboard. My keyboard has Mac printed keys and as typical on MacOS Alt to the left of cmd. However, I have to switch these in System Preferences so they work correctly. This works fine in all applications except Emacs where for example Alt-X which should translate as M-X ends up simply entering into the current buffer. I've tested all the typically problematic key mapping issues such as #, ", @ etc and all work fine in all apps + Emacs. It's purely this Alt / Meta issue. Pertinent emacs configuration:
(setq mac-option-key-is-meta t)
(setq mac-right-option-modifier nil)
And this is how I invert my keys in MacOS System Preferences - if I don't invert them, all works well, except my fingers disagree with Cmd being to the left of Alt!
#2022-01-0315:41paulspencerwilliamsSo, it appears that I can fix this not through software configuration etc, but by programming my WASD VP3 to swap Alt / Cmd. This appears to work in all apps including Emacs!#2022-01-0620:16QuestUsing Prelude Emacs with Helm Everywhere enabled, & sometimes Swyper seems to get "stuck" with its find pane opened in a bug state. Anyone seen this before (& fixed it?) I figure I could disable Swyper but I do like the search improvements it brings#2022-01-0700:24cstbySwiper would work well with Ivy. I believe that Ivy was originally an extension of swiper. If you're set on Helm, maybe try the ctrl-f package?#2022-01-0700:27cstbyFwiw, bbatsov switched to consult and selectrum in his own personal configuration. Not sure why prelude still uses helm. Most folks have had a positive experience with vertico and selectrum. https://github.com/bbatsov/emacs.d#2022-01-0723:10QuestI swapped over to Helm after trying out Ivy for a bit; considered Vertico/Selectrum but didn't want to swap off Helm due to both familiarity & the high value of integrations. I suspect that Swyper wasn't intended to be part of my Helm workflow; might be a remnant that I should manually fix from when I had Prelude-Ivy enabled. I do like it though, so I'll probably try to fix it before abandoning it. (I might eventually figure out how to intentionally trigger the bugged mode :thinking_face:)#2022-01-1019:08Ted CiafardiniA way to run something like git add -p in Magit?#2022-01-1019:15dpsuttonthat’s the stage chunks workflow?#2022-01-1019:18lukaszI think you can do that from the diff view - you can press s when viewing a diff chunk, and only stage that#2022-01-1019:18lukaszrather than a whole file#2022-01-1019:19dpsuttonyou can also higlight individual lines to stage “subchunks”#2022-01-1019:20lukaszah, so that's how I got into these strange diffs 😉 good to know#2022-01-1020:26Ted Ciafardinithanks 🙂#2022-01-1116:14practicalli-johnStaging in magit is very flexible. I often TAB opent files and hunks then use v to select specific lines in a hunk https://practical.li/spacemacs/source-control/magit/staging-changes.html#2022-01-1215:43kpavI dont know why I never thought to highlight chunks with v! My workflow is heavily dependent on staging chunks, this will be a lifesaver#2022-01-1123:21andy.fingerhutI know Emacs contains many functions that I have never used nor heard of before, but this one made me laugh out loud and explain what I was laughing about to my wife. I was trying to type M-x flu TAB to auto-complete M-x flush-lines, but accidentally left out the 'f' and got M-x lu TAB completing to M-x lunar-tables. Emacs happily created a new buffer with the text of the comment in my reply to this message.#2022-01-1123:21andy.fingerhut
Saturday, December 4, 2021: New Moon 2:45am (EST)
Friday, December 10, 2021: First Quarter Moon 8:38pm (EST)
Saturday, December 18, 2021: Full Moon 11:35pm (EST)
Sunday, December 26, 2021: Last Quarter Moon 9:30pm (EST)
Sunday, January 2, 2022: New Moon 1:36pm (EST)
Sunday, January 9, 2022: First Quarter Moon 1:13pm (EST)
Monday, January 17, 2022: Full Moon 6:48pm (EST)
Tuesday, January 25, 2022: Last Quarter Moon 8:47am (EST)
Tuesday, February 1, 2022: New Moon 12:49am (EST)
Tuesday, February 8, 2022: First Quarter Moon 8:52am (EST)
Wednesday, February 16, 2022: Full Moon 11:56am (EST)
Wednesday, February 23, 2022: Last Quarter Moon 5:39pm (EST)
#2022-01-1123:21andy.fingerhutAnd this amuses me, but does not surprise me.#2022-01-1123:26dpsuttonthat is hilarious. great find#2022-01-1123:26dpsuttoni want to open a feature request against vs code#2022-01-1207:46magnarsThe best part is that Emacs calculates these with mathematical simulations of the movements of the sun and the moon. Take a look at solar.el, for instance by looking up the solar-ecliptic-coordinates function. ❤️#2022-01-1220:04valtteriJust spent a little too long reading solar.el and lunar.el in awe. I have to say I really love emacs. 6+ years of daily use and it just keeps giving.#2022-01-1220:19dpsuttoni’m kinda chuckling at the things that make it into core. “Please add add smooth scrolling on osx” “NO”. “please simulate the movements of the sun and the moon” “YES”#2022-01-1221:07andy.fingerhutThey have their priorities 🙂#2022-01-1221:14agbtw solar.el is nicely used by circadian.el that allows you to set a color-theme based on time of the day or sunset/sunrise. I use dark theme at night and light theme during the day. But you can use multiple themes in between. It's almost funny (if it wasn't a bit sad) I know when it's time for dinner when Emacs changes its colors.#2022-01-1221:15dpsuttonthat’s awesome#2022-01-1221:17agFor a while I've been thinking of making it possible to calculate "intermediate" themes, in similar way like clojure.core/reductions work. Then maybe it would be possible to make the transitions super smooth. If you ever used f.lux you'd know what I'm talking about.#2022-01-1221:23agOr maybe even more prosaic use case - you like two different color themes, but still want to try some different shades of colors, that neither too light like the first theme, but also not too drastically dark as the second one. Wouldn't be nice if it was possible to calculate and lay out all possible color shade combinations? I mean, Emacs has everything what's needed for that, see color.el. It looks like nobody ever tried making something like that, that's all.#2022-01-1605:34adi> Or maybe even more prosaic use case - you like two different color themes Gives a new meaning to the term "solarised" themes.#2022-01-1207:46magnarsThe best part is that Emacs calculates these with mathematical simulations of the movements of the sun and the moon. Take a look at solar.el, for instance by looking up the solar-ecliptic-coordinates function. ❤️#2022-01-1414:52vemvAnyone has a thingy that inserts some boilerplate whenever a new .sh file is created? mine is:
#!/usr/bin/env bash
set -Eeuxo pipefail
cd "${BASH_SOURCE%/*}"
#2022-01-1415:02hindolGiven that CIDER (or clojure-mode) inserts the ns bits in every new Clojure file, this seems doable.#2022-01-1415:02vemvindeed :) perhaps someone has packaged it already#2022-01-1415:03hindolFound this link - https://emacs.stackexchange.com/questions/45629/template-for-new-file#2022-01-1415:06vemvlooks tasty! particularly as I already use yasnippet, thanks 🍻#2022-01-1415:07hindolAnd doom emacs has a file-templates module that uses yasnippet.#2022-01-1415:07hindolYou can check what they are doing in that module.#2022-01-1415:08hindolHere is the link to it - https://github.com/hlissner/doom-emacs/tree/develop/modules/editor/file-templates#2022-01-1606:33Ben SlessWhy create new shell files instead of babashka? 🙃#2022-01-1616:03tvaughanhttps://www.emacswiki.org/emacs/AutoInsertMode#2022-01-1716:55cstbyHas anyone gotten clojure-align-forms-automatically (from clojure-mode) to work with clojure-lsp?#2022-01-1716:56ericdalloclojure-lsp uses cljfmt which doesn't support yet vertical map alignments 😔 https://github.com/weavejester/cljfmt/issues/36#2022-01-1716:59cstbyGot it. There's no way to disable cljfmt entirely? Between clojure-mode and aggressive-indent mode, I've never had an issue with formatting.#2022-01-1717:00ericdalloyes, you can disable clojure-lsp formatting via client-side (lsp-mode) or server-side via .lsp/config.edn#2022-01-1717:02ericdalloI think that on lsp-mode is lsp-enable-indentation#2022-01-1717:10cstbyThank you. Setting lsp-enable-indentation to nil worked perfectly for me. 👍#2022-01-1921:57Drew VerleeIs it possible to squash all my commits on a branch into one coomit then rebase using the rebase command entry point or is that two actions?#2022-01-1921:58Drew Verleei want this because in this case, i only want to resolve the conflicts between the branches once, not for each commit in the branch.#2022-01-1922:12winsomeI think that would be two separate actions#2022-01-1922:12winsomesquash first, then rebase#2022-01-1922:31practicalli-john@drewverlee In the Magit rebase menu, there is an --autosquash option. I wonder if this does what you are looking for? Perhaps this https://fle.github.io/git-tip-keep-your-branch-clean-with-fixup-and-autosquash.html is interesting#2022-01-1922:35Drew Verleeit doesn't seem to#2022-01-1922:36Drew Verleei still get asked to resolve every single commit#2022-01-1922:36Drew Verleeagainst the rebase target#2022-01-1922:40Drew Verleethe magit rebase experience leaves a lot to be desired.#2022-01-1922:42Drew Verleee.g the 3 way merge panel can just get stuck in some buffer state where you want to save it but it gives you no clue how.#2022-01-1922:42Drew Verleeoh im sure there is a way, the problem is the interface doesn't lead you at all. You can also order a pizza in the same place#2022-01-1923:59lambduhhh@elle pulling you in here#2022-01-2017:07winsomeThis might be off-topic, but I've made a wordle clone in clojure and I'd like to be able to print out the colored squares in the repl, but the glyphs just turn up as those unicode squares with numbers inside. I've clearly got the font somewhere on my system since it shows up just fine in other applications, how do I get my emacs font stack to handle this correctly?#2022-01-2022:05winsomeI found this answer for setting up emojis in emacs, it works for this case as well: https://emacs.stackexchange.com/questions/62219/how-do-i-get-colour-emoji-to-display-in-emacs#2022-01-2022:13tomekwHey! 👋 Trying emacs afters years with vim and after 3 years break with it as well. I really can't find it in the docs. Pure smartparens setup (no doom, spacemacs): how do actually raise a sexp? Assume I've something like this: [:a [:b :c]] -> [:a :c] assuming my cursor is on :c.#2022-01-2023:52practicalli-johnYes, sp-raise-sexp with the cursor on :c will produce the desired result#2022-01-2113:38tomekwI must be blind, thank you!#2022-01-2116:17practicalli-johnsp-cheat-sheet is very useful, opens a buffer with all the smartparens functions and their descriptions#2022-01-2302:38Ted Ciafardinianimated docs are always super useful to me w/ sp: https://gist.github.com/jsmestad/1059d15e8debf5f2e7e81c92052c67d2#2022-01-2302:42Ted Ciafardinidoesn’t include an animated raise-sexp, but I still think its nice#2022-01-2410:09jumar@U05254DQM thanks for the tip. When I invoke sp-cheat-sheet it eventually shows but it takes several seconds. Any idea why it's that slow?#2022-01-2412:03practicalli-johnThe cheat sheet did take a bit of time to open. It is a big file, but don't know why it takes so long (perhaps it's automatically generated from the elisp code)#2022-01-2210:20daboone72Ohh it's like trying to find a needle in a hay stack sometimes where is the current window geometry stored?#2022-01-2210:24daboone72
(setq w (selected-window))
     => #<window 8 on windows.texi>
(window-edges)          ; Edges in order:
#2022-01-2302:33Ted CiafardiniWith Cider - I utilize these two functions primarily:
'cider-eval-defun-at-point
 'cider-pprint-eval-defun-at-point
#2022-01-2302:34Ted CiafardiniSometimes, the focus automatically jumps into the output buffer. Is there a setting or variable I can set that disables this shift of focus?#2022-01-2302:34Ted CiafardiniMore cider config:
(setq cider-interactive-eval-output-destination 'output-buffer)
(setq cider-redirect-server-output-to-repl nil)
(setq clojure-toplevel-inside-comment-form t)
(setq cider-repl-pop-to-buffer-on-connect nil)
#2022-01-2302:39dpsuttondo you send forms to the repl often? the cider-insert-X style functions?#2022-01-2302:39dpsuttonif so, that automatically highlights the repl buffer. There's a defcustom to prevent that#2022-01-2302:40Ted Ciafardinino, I prefer to keep things out of the REPL buffer -#2022-01-2302:40Ted Ciafardinimost of the time the two fns listed above work fine - but it will randomly hop me over into the output buffer upon eval#2022-01-2303:01dpsuttonThen no idea sorry. That was the one thing I could think of that puts you in the repl buffer#2022-01-2310:23ericdalloI think doom-emacs does that by default @edward.ciafardini,.maybe debug what they change#2022-01-2317:55DiegoI am trying to setup clojure-lsp to use some of it’s feature. But I am getting a conflict with cider , where the arity information that appears at the buttom of the screen gets substituted by and error about the arity of the function bein incomplete. I don’t know how to disable this as it is much less useful than displaying the arity of the function. Any ideas? This I my setting at the moment (I knoew they look messy :S)
(add-hook 'clojure-mode-hook 'lsp)
(add-hook 'clojurescript-mode-hook 'lsp)
(add-hook 'clojurec-mode-hook 'lsp)

(setq gc-cons-threshold (* 100 1024 1024)
      read-process-output-max (* 1024 1024)
      treemacs-space-between-root-nodes nil
      company-minimum-prefix-length 1
      lsp-enable-on-type-formatting nil

      ;; lsp-enable-indentation nil ; uncomment to use cider indentation instead of lsp
      ;; lsp-enable-completion-at-point nil ; uncomment to use cider completion instead of lsp
      )

(setq lsp-lens-enable t)
(setq lsp-signature-mode nil)
(setq lsp-ui-mode nil)
(setq lsp-ui-doc-show-with-cursor nil)
(setq lsp-headerline-breadcrumb-enable nil)
(setq lsp-ui-sideline-enable nil)
(setq lsp-modeline-code-actions-enable nil)
(setq lsp-signature-render-documentation nil)
(setq lsp-signature-auto-activate nil)
(setq lsp-completion-enable nil)
(setq lsp-eldoc-enable-hover nil)
#2022-01-2318:02ericdalloyes, let me find the config to use LSP only on that feature#2022-01-2318:04ericdalloThis should disable cider eldoc integration to use lsp only:
(setq cider-eldoc-display-for-symbol-at-point nil) ; use lsp
#2022-01-2318:05ericdalloand you probably want to enable lsp-eldoc-enable-hover to show the arity of the functions on the bottom#2022-01-2318:06ericdalloAlso, I personally like to enable the lsp-modeline-code-actions-enable as the UI change is minimal and very useful to know if there is a code action available on that line#2022-01-2318:07DiegoStill getting the same arity error displayed on the minibuffer#2022-01-2318:08DiegoThe arity information pops for a second before being replaced by the error message.#2022-01-2318:11ericdallohum, sounds like a cider feature that I'm not aware of, maybe cider-eldoc-display-context-dependent-info ? try disabling that one#2022-01-2318:11ericdalloalso, not sure if cider check that variable only at start, try restarting emacs#2022-01-2318:13DiegoActually even when cider is not running I get this error#2022-01-2318:14DiegoI am using prelude with some custom configurations of my own#2022-01-2318:14ericdallohum, so maybe it's another package using eldoc :thinking_face:#2022-01-2318:17vemvCider doesn't add any such linting as eldoc hints, has to be something else#2022-01-2318:17ericdalloyeah, never saw that message on eldoc from cider indeed#2022-01-2318:17ericdallooh#2022-01-2318:18ericdallodidn't notice but it's clj-kondo lint stuff but on bottom indeed#2022-01-2318:18ericdallomaybe you don't have flycheck or have your emacs configured to show the diagnostics on the bottom#2022-01-2318:18ericdallodo you have flycheck or flymake installed?#2022-01-2318:20Diegoyes, I have flycheck#2022-01-2318:21ericdallowhats your lsp-diagnostics-provider ?#2022-01-2318:22Diegowhere do I find that?#2022-01-2318:22ericdallotry M-x describe-variable and type that variable#2022-01-2318:23Diegoit’s set to auto#2022-01-2318:23ericdallosounds correct#2022-01-2318:24ericdallowhat shows on flycheck-list-errors ? is flycheck-mode enabled on that buffer?#2022-01-2318:26Diegoyes#2022-01-2318:27Diegoif I disable it the error message goes away, and I can see the arity doc#2022-01-2318:27ericdalloodd, so we need to understand why flycheck is showing it on the bottom and not on the buffer#2022-01-2318:49Diegodoes this look right?#2022-01-2318:55ericdallohum, maybe that lint is from those custom clj-kondo flycheck runners, I'd suggest disabling (or even uninstalling) both clj-kondo-* to check if the issue is fixed#2022-01-2318:55Diegook#2022-01-2318:58Diegodidn’t work#2022-01-2318:58Diegobut this did
(require 'flycheck)
(setq flycheck-display-errors-function nil)
#2022-01-2318:58Diegoshould that be right?#2022-01-2318:59DiegoI still see the errors with flycheck-list-errors so I suppose that should be fine#2022-01-2319:00ericdalloyes, it should show on flycheck-list-errors#2022-01-2319:01ericdallonot sure, I use doom-emacs which enables all of this by default 😅#2022-01-2319:01ericdallobut yeah, sounds good to me#2022-01-2319:01Diegooh haha#2022-01-2319:01Diegothat’s probably why#2022-01-2319:02Diegowell, thanks for the help, pretty sure I would be getting nowhere without it#2022-01-2319:03ericdalloglad you found it :)#2022-01-2319:05ericdalloBTW, this is the only feature I like from lsp-ui :#2022-01-2319:07Diegoinlining the error?#2022-01-2319:11ericdalloyeah, it prints the warnings/errors/info on the line when hovering the line: https://emacs-lsp.github.io/lsp-ui/#lsp-ui-sideline#2022-01-2611:12Carlook, I really get paredit and never deleting parenthesis, but sometimes when the buffer gets scrambled (because I use evil and sometimes some commands do the wrong thing), I would just like to be able to edit normally to get back to a proper state. What is your workflow for doing that?#2022-01-2612:24anonimitorafI just undo when that happens#2022-01-2612:54Roman RudakovIn smartparens-mode (and probably in paredit-mode as well) any symbol prefixed with C-q will be inserted as is, even it it produce unbalanced expression.#2022-01-2612:56Roman RudakovI don't use evil, so you probably should check keybinding for quoted-insert command#2022-01-2612:57cstbyDisable it temporarily, make the change, then re-enable it? Paredit is a minor mode, right? It should have an interactive command called paredit-mode to toggle it on or off.#2022-01-2613:41vemvyeah M-x paredit-mode or this defun which I bind to shift+backspace:
(defun vemv/force-backspace ()
  "Performs a deletion, overriding paredit safeguards"
  (interactive)
  (if (region-active-p)
      (progn (call-interactively 'kill-region))
    (delete-region (dec (point)) (point))))
#2022-01-2614:32codeasoneFellow borrowers of the above defun will want:
(defmacro dec (n)
  `(- ,n 1))
I like the idea of binding S-<backspace> better than toggling smartparens-strict-mode which is what I was doing till now - thanks for the tip @U45T93RA6
#2022-01-2614:59Linus Ericssonparedit don't know about cut with C-w, and paste with C-y, which might come handy.#2022-01-2615:01Linus EricssonSo when these things happens i usually mark the superflous parenthesis and cuts it with C-w. If a parenthesis is missing - i copy one of the kind that is missing and paste one where it is missing.#2022-01-2615:56practicalli-johnThere are Emacs packages to configure Evil to respect Clojure structure, such as https://github.com/luxbock/evil-cleverparens This helps minimise the issue occurring when using vim-style editing. Otherwise I would toggle the mode (I use smartparens in Spacemacs and toggle is SPC t p ) I like the idea of using C-q as a shortcut, as its usually just one paren. Also useful for copy paste fixes which easily have the same potential issue.#2022-01-2618:09ennI also “cheat” with C-w/`C-y` if it’s just a matter of a single errant or missing paren. If it’s more generally scrambled I disable paredit temporarily with M-x paredit-mode.#2022-01-2611:35jkxyzI use evil and smartparens, so when I'm in a state with unbalanced parens (usually only happens for me when fixing merge conflicts), I toggle smartparens-strict-mode with turn-{off,on}-smartparens-strict-mode#2022-01-2706:35ZaymonJust getting started out with Emacs, is anyone using v28 with native compilation of elisp?#2022-01-2706:37Cora (she/her)i was, with doom emacs#2022-01-2706:38Cora (she/her)now im using emacs 29 with doom emacs#2022-01-2706:38ZaymonOh sweet. Did it make a difference in performance? I’ve been learning the ropes and setting up a config from scratch. Managed to get cider / clojure-lsp working#2022-01-2706:38Cora (she/her)a little, but it's still slow on macos for me#2022-01-2709:12AkizHi, this drives me crazy. I am using iosevka and some words are unaligned like this. Somebody got same problem? It seems like inconsistent space-size to me but i am just guessing#2022-01-2710:39pavlosmelissinosnever seen that before with a monospace font but M-x whitespace-mode might help you confirm your hypothesis#2022-01-2711:49Akiz@UEQPKG7HQ Me neither… I will try whitespace-mode once it will appear again - it seems to be caused by lsp and in one or two project. I just restarted emacs 😞#2022-01-2715:38kpavIm using iosevka and lsp and have never seen this 🤷#2022-01-2716:00kpavFunny enough, I am experiencing it this morning...for some reason the line my cursor is on adds an extra space as well#2022-01-2716:01kpavI've noticed the cursor thing before, but never the inconsistent spaces#2022-01-2716:52AkizThe cursor is fine - it was not my intent to confuse you :-). I can not reproduce the reported bad alignment. Funny things is - there was a lot of errors wrongly reported by LSP so i deleted local legacy .clj-kondo folder and it may corrected both errors and alignment.#2022-01-2820:06ag@UBRV1HXPD try adjusting the frame font size. For some fonts, GUI gets messed up.#2022-01-2815:20jjttjjIs there a rebl-like datafy/nav integrated inspector thing built into emacs (specifically one built into emacs and not using a seperate OS window)#2022-01-2815:24winsomeI would love a https://vlaaad.github.io/reveal -like application in emacs#2022-01-2815:25ericdalloCan't you use reveal in a REPL or something like that?#2022-01-2815:27winsomeIt's still another application outside of emacs where all my goodies (avy, lispy, ace-window, etc.) don't work. When I've got text to manipulate, I prefer to have it in emacs. That said Reveal has graphical capabilities that I don't think Emacs can match, so there's room for both.#2022-01-2815:28ericdalloI see#2022-01-2815:29ericdalloNot sure would work render inside emacs indeed#2022-01-2923:01zaneCould always compile with xwidgets.#2022-01-2822:11anonimitorafcider-inspect? (well, sort of)#2022-01-2908:57Ben SlessThere is an open request to add tap support to the inspector in cider#2022-01-3006:24lilactownanyone know how to properly modify a spacemacs layer locally that is provided by default?#2022-01-3006:29Ben SlessDo you want to modify variables it provides or something else?#2022-01-3006:37lilactownwell what I really want to do is add another entry to this var https://github.com/syl20bnr/spacemacs/blob/develop/layers/+intl/keyboard-layout/config.el#L48#2022-01-3006:38lilactownI suppose I could figure out the right place in the lifecycle to modify it externally#2022-01-3007:42anonimitorafadd-to-list in your custom scripts section?#2022-01-3007:44Ben Slesswith the risk of modifying private vars#2022-01-3007:44anonimitorafYes#2022-01-3016:58lilactownI remembered that all these built in layers are kept in source control locally. so I just modified it and will rebase it on top of changes in the future#2022-01-3018:18lilactownhmm that did work except now I am having issues with magit https://github.com/syl20bnr/spacemacs/issues/15299#2022-01-3018:18lilactownhmm that did work except now I am having issues with magit https://github.com/syl20bnr/spacemacs/issues/15299#2022-01-3105:37ZaymonDoes anyone know how I can see these warnings—`13/8`—as a list for the whole project? The list all problems button just shows problems for the current buffer#2022-01-3106:47mpenetit's called diagnostics, so something like lsp-diagnostics. I personally use consult-lsp to list/browse these, via consult-lsp-diagnostics iirc#2022-01-3106:48ZaymonThanks! I’ll look into this 🙂#2022-01-3112:19ericdalloI like to use lsp-treemacs-errors-list#2022-01-3112:20ericdalloIf using vertico on doom-emacs, SPC c x will already list all of them quite nicely#2022-01-3113:05mpenetConsult lsp allows some nice filtering/previews. You can filter per level with a single char#2022-01-3113:05mpenetLike "e foo" to list all ERRORS containing foo#2022-01-3113:07mpenet(I do that in tandem with vertico too), consult adds these little things#2022-01-3113:07mpenethttps://github.com/gagbo/consult-lsp#2022-01-3113:09mpenetWhat does c x trigger in doom ?#2022-01-3113:12ericdalloI found vertico faster and it does the same#2022-01-3113:13ericdalloSPC c x list project errors if using vertico#2022-01-3113:13ericdalloif using ivy/other search engine it should list file errors only#2022-01-3113:14mpenetI am using vertico#2022-01-3113:14mpenetVertico just shows candidates#2022-01-3113:15mpenetConsult feeds the content to it basically#2022-01-3113:15ericdallooh, treemacs used to have a shortuct to filter only specific ones#2022-01-3113:15mpenetBoth are from the same author#2022-01-3113:17mpenetThe filtering pattern used in consult lsp is something you find in most consult modes#2022-01-3113:18mpenetYou can also export the list of candidates shown in a separate buffer (even after filtering)#2022-01-3113:18mpenetAnd have links to locations just work#2022-01-3113:18mpenet(that's via embark)#2022-01-3113:19mpenetVertico + consult + embark is really powerful#2022-02-0106:49ZaymonThanks! I’m rolling my own configuration so no doom emacs but I am going to try both vertico and consult and see which one I end up liking better over the next few days#2022-02-0106:51mpenetThey are not doing the same at all, they are complimentary#2022-02-0106:51mpenetI advise to use both in tandem#2022-02-0106:52ZaymonOh, is vertico like ivy?#2022-02-0106:52mpenetThe author of vertico and consult is the same person btw#2022-02-0106:52ZaymonBecause I already use ivy#2022-02-0106:52mpenetYes partly#2022-02-0106:53mpenetVertico + consult + orderless + embark = ivy/counsel/swiper. Small composable pieces#2022-02-0106:53ZaymonCool, thanks for the clarification 🙂 I might try consult+ivy first and see how that goes#2022-02-0106:53mpenetVertico & co are much cleaner imho and leverage emacs builtins#2022-02-0106:53mpenetI don't know if ivy can use consult#2022-02-0106:55ZaymonAh I think you’re right. You can see how new I am to the ecosystem 😂#2022-02-0106:57mpenetIf you need inspiration https://github.com/mpenet/emax it doesn't use doom#2022-02-0106:57ZaymonAppreciate the use of use-package#2022-02-0123:57Zaymon@UKFSJSM38 lsp-treemacs-errors-list works great thanks#2022-02-0218:59tomekwCross-posting as this may be a better channel https://clojurians.slack.com/archives/C01GE5PD249/p1643828364166759#2022-02-0219:05lukaszI built a small helper ns on top of tools.namespace to make this stuff easier, it's designed for component - but it might work with integrant#2022-02-0219:05lukaszI'd love to share it but GH is down 😢#2022-02-0219:07Derekhttps://docs.cider.mx/cider/usage/misc_features.html#reloading-code#2022-02-0219:09DerekI set cider-ns-refresh-before-fn and cider-ns-refresh-after-fn in my projects’ .dir-locals.el file#2022-02-0220:00kpavI was just looking into how to do this..perfect timing, thanks!#2022-02-0308:30tomekwI guess setting
(setq cider-refresh-after-fn "user/reset")
will do? 🙂
#2022-02-0309:33practicalli-johncider-refresh can be configured to call a function before and after the refresh, stoping and starting any services, e.g: https://practical.li/spacemacs/clojure-repl/component-lifecycle.html#configure-cider-refresh-to-use-component-lifecycle#2022-02-0309:37practicalli-johnCider-undef will remove names (vars) from the running REPL, useful to avoid the need to restart the REPL due to name changes. I rarely restart the REPL unless I really did something messy https://practical.li/spacemacs/clojure-repl/refresh-restart-repl.html#2022-02-0309:40tomekwThank you!#2022-02-0411:50teodorlu@U05254DQM thanks so much - now I can remove lots of small rich comments removing namespaces!#2022-02-0319:50pavlosmelissinosIn clojure-mode: I can see clojure-fill-paragraph with describe-function (`C-h f`) but execute-extended-command (`M-x`) comes up empty. I would expect both to be able to find it but surely I'm missing something. Any ideas?#2022-02-0320:29DerekIt’s not an interactive function#2022-02-0320:30Derekhttps://github.com/clojure-emacs/clojure-mode/blob/913e2450a77a6ddda051f55ac651c99337147db1/clojure-mode.el#L632#2022-02-0406:12ZaymonIs there a way to open this doc popup into its own window?#2022-02-0411:19ericdalloYes, check https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ lsp-ui-doc#2022-02-0411:20ericdalloYou can have that popup showing on eldoc instead of lsp-ui#2022-02-0411:24robert-stuttafordat a certain height, emacs starts making new modals appear below the current buffer, instead of to the side. does anyone perhaps know what setting controls this?#2022-02-0419:12ACtake a look at split-width-threshold and split-height-threshold they probably do what you want.#2022-02-0705:03robert-stuttafordperfecto thank you @U0124C56J5R!#2022-02-0414:44teodorluI've been thinking that making commits would be easier if they all just had the same commit message.
(defun teod/thinking-face ()
  (interactive)
  (insert "🤔"))

(defun teod/buffer-set-content-thinking-face ()
  (interactive)
  (erase-buffer)
  (teod/thinking-face))
😈
#2022-02-0414:44teodorlulast one is suited for Magit commit message buffers!#2022-02-0419:22Carloin emacs, we have the function cider-pprint-eval-defun-at-point that sends the result of a top-level from to a buffer named *cider-result* . The nice thing about that window is that the output is pretty printed. Can I use the same window to display the last tap>? In general, do we have a way of looking at pretty-printed tapped values from emacs?#2022-02-0421:17Ben SlessI opened a feature request in cider for that some time ago, I will probably get in soonish I hope#2022-02-0623:10CarloSometimes I evaluate a form that takes too long (maybe because I have a bug). Is there a way of interrupting the evaluation without killing the repl?#2022-02-0623:11dpsuttonUsing cider or another nrepl based client? There is usually a way to interrupt evaluation#2022-02-0623:11dpsuttonIf using a socket repl you will need to restart the process unfortunately #2022-02-0623:59Carlocider, after jack-in (clj version)#2022-02-0700:51dpsuttonThere should be a cider-interrupt bound to C-c C-c by default. #2022-02-0706:07magnars
(define-key map (kbd "C-c C-b") #'cider-interrupt)
#2022-02-0912:36robert-stuttafordExhibit A: a typical piece of code from a .cljc file in our codebase. When I use emacs' hide-show-mode (via 'hs-minor-mode hook), I'd love to be able to tell it to expand one level deeper to unwrap the #?(:clj ) directive. Does anyone have some idea how to do this? 😬#2022-02-0912:56pavlosmelissinosSomething like this? M-x hs-toggle-hiding will get you from one state to the other#2022-02-0912:59vemvHere's some code that toggles hs stuff according to custom regexes (in my case, ns forms), might serve of inspiration https://github.com/zenmacs/.emacs.d/blob/86732106270d7f01599d2d0fe50e0e13cbea0ef0/lib/non-submodules/vemv.clojure-interaction.el#L57-L66#2022-02-0914:49robert-stuttaford@UEQPKG7HQ right, i have a bind that applies that toggle to all the forms at the same time, folding it like you see there. i want it to fold from one level down for the :clj forms, without me having to manually key there and toggle it#2022-02-0914:49robert-stuttafordthanks @U45T93RA6 i'll check it out!#2022-02-1016:42pavlosmelissinosHow do you usually do code reviews? Github has this view where you can add comments/suggest changes to specific parts of a PR and I've been wondering if anyone has managed to make emacs integrate well with it? I'd love to have that on top of paredit, clojure-mode and cider.#2022-02-1016:45vemvI remember a peer using what I think was https://github.com/wandersoncferreira/code-review ? cc/ @UBSREKQ5Q who authored the package in question!#2022-02-1016:47pavlosmelissinosThanks, I'll check it out! Code reviews is the part of development that I spent the most outside of ~my comfort zone~ emacs and I don't like it 😛#2022-02-1104:07bartukaFeel free to send some feedbacks after you try the package 🙂 always good to hear users feedback#2022-02-1017:42varunoops sorry didn't mean to delete lol. i just figured it out right before you answered#2022-02-1017:42varunyeah disconnecting the repl and reconnecting fixed it#2022-02-1017:42varunthe stuff about the immutable classpath makes sense#2022-02-1201:22zhuxun2I just began using clojure-lsp with emacs. However, cljfmt does not seem to be working at all. Do I have to include cljfmt in my deps.edn for it to work? I couldn't find this in the installation tutorial...#2022-02-1202:24ericdalloNo, it's built in on clojure-lsp#2022-02-1202:24ericdalloAre you calling lsp-format-buffer manually?#2022-02-1202:24ericdalloWhat kind of code are you trying to indent?#2022-02-1208:35zhuxun2Here is a test I made.#2022-02-1208:36zhuxun2After executing lsp-format-buffer, I got:#2022-02-1208:36zhuxun2@UKFSJSM38#2022-02-1217:48vemvcljfmt generally fixes indentation only, it's not a canonical formatter. The idea is to be a little more lenient, allowing style differences where it's hard to establish a single truth zprint is better oriented towards canonicalization. Whether it can have 100% technical coverage or social acceptance, is another story. Super interesting and flexible project anyway.#2022-02-1217:51ericdalloyes, with clojure-lsp, formatting that code I get this:
(defn
  f
  []
  42)
#2022-02-1217:52ericdallo@U6SEJ4ZUH try formatting:
(defn
  something
     to
       format)
it should format to:
(defn
  something
  to
  format)
#2022-02-1201:40zhuxun2It always says "no format changes" despite there's obvious lines need to be formatted...#2022-02-1203:21Drew Verleeanyone using emacs 28? i'm updating today from 27 and i'm curious what, if any, issue people have encountered.#2022-02-1211:29pavlosmelissinosIIRC I just got some warnings when I upgraded and had to update some packages and setqs in my init.el#2022-02-1220:20Drew VerleeHas anyone tried this for clojure development? https://github.com/dandavison/delta I think it's saying it will show specific diffs in my working file. Which i think i would really enjoy.#2022-02-1220:34Drew Verleenope, never mind it still just has diffs in the git buffer#2022-02-1222:43practicalli-johnMagit seems that do the most popular important aspect for me, like word level diff highlights. If I am diff'ing outside of Emacs (very rarely) then I use meld (application on Linux)#2022-02-1222:49practicalli-johnSpacemacs can highlight changed lines in the fringe, or as highlighted lines in the source code buffer using Smeargle https://practical.li/spacemacs/source-control/magit/version-highlighting.html#2022-02-1311:41hkjelsit yields better diffs, but there are performance-issues. At least last time I tried with magit-delta, there were some issues that I didn’t bother to investigate#2022-02-1316:58Drew Verlee@U0B1SDL67 is there a difference from the diff you get from setting magit-diff-refine-hunt to 'all ? in the context of a init.el file under spacemacs layers:
(git :variables magit-diff-refine-hunk 'all)
That seems to get me the same level of diffing only it doesn't try to color the code (only the diff) which i prefer as it lets me focus on the changes more.
#2022-02-1317:45Drew VerleeI would like some feedback on a hypothetical piece of emacs functionality i'm thinking about building. Imagine your threading some data through a functional pipeline, like any day working with clojure. (-> some-data ...) Now "some-data" is really a hash-map full of keys, it's like a big bag and at times you might need to pull some out. What if you could fire off a command and then select the keys you need? So "*" is the cursor (-> some-data *) will open a tiny window right there with the list of keys [<k_1> <k_2> ... <k_n>] each with a checkbox you can use to select. The selected keys are then available to paste. so you could just pick one (-> some-data :k_1) Of i you picked two you would get (-> some-data [:k_1 :k_2]) And obviously you would have to wrap it. maybe in something like "select keys" or maybe in "juxt". Currently solutions allow you to create a list easily enough, but not quickly select they keys beyond text manipulation. e.g i can print or create the full list but then i have to to remove keys. I'm not suggesting this is a huge win, just that I think this flow would be slightly more economical in a lot of common cases i run into.#2022-02-1317:51vemvIt sounds good to me, with the nuance with the cost of building it might be somewhat excessive compared to the cost of (-> some-data (doto pprint)) or such, then copying the interesting keys by hand I have this yasnippet https://raw.githubusercontent.com/zenmacs/.emacs.d/master/snippets/clojure-mode/ppr which I can use while inside a ->, so I'm not interrupted by a require step#2022-02-1318:00vemvA really generalized fix would be to make https://github.com/alexander-yakushev/compliment/ able to offer completions based on evaluating the sexp being completed So in this UI, the options would be determined by evaluating (-> x) , and observing that select-keys needs a set of keys, so one then evaluates (-> x keys)#2022-02-1318:01vemvIt's probably a lot of work, but also would show well what can be accomplished with the "CIDER approach" (favor eval over static heuristics)#2022-02-1317:51Drew Verleeis there a cider eval option that keeps the surrounding s-expression and produces the result? What would be close to my suggestion is a fn similar to 'cider-eval-last-sexp-and-replace' only without the replace part. e.g (-> {:a 1 :c 2} keys *) 'cider-eval-sexp-and-keep' (this doesn't exist) (-> {:a 1 :c 2} keys *) [:a :b]#2022-02-1318:05vemvDon't know the answer directly but these seem self-contained, probably you can make your own https://github.com/clojure-emacs/cider/blob/83f18a9ad4b97614bf1ec9e65444ebc90dd8bddf/cider-eval.el#L935-L958#2022-02-1512:42vemvWhat do you all use for "project-wide search and replace"? I hacked something highly to my liking based on helm-ag back in 2017 (which worked with ag and rg alike). However that only works in Emacs 25 (or 26 sometimes), which I managed to keep using quite flawlessly until these days - now it's much less of a viable option. I reckon my requirements are simple: • Search project-wide, ideally honoring rg ignore rules or at least .gitignore • Preview each found match as a single line in some sort of UI • I can adjust my search query, and results/preview are updated real-time • Replace all occurrences with an input that is asked interactively, after I got to see the preview of the found results Ideas welcome!#2022-02-1513:02pavlosmelissinosdeadgrep is awesome for "project-wide search", the replace part I still do manually 😄 Apparently it has https://github.com/Wilfred/deadgrep#beta-features (beta) which allows you to "edit files directly from results buffers" but I haven't tried it#2022-02-1514:08mpenetyou can do that with vertico (interactive list) + consult-git-grep (project wide search, with live preview) + embark (to export the list in new buffer) + wgrep (edit results in buffer)#2022-02-1514:08mpenetsounds complicated but it's not#2022-02-1514:08practicalli-johnhelm-ag works fine for me, usually coupled with iedit when editing the changes that are found. I havent needed anything more https://practical.li/spacemacs/spacemacs-basics/evil-tools/replacing-text-across-projects.html#2022-02-1514:10practicalli-johnI have ripgrep binary installed, so can use its filtering patterns in the initial search https://practical.li/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#2022-02-1514:10mpenetconsult can work with ag/rg/gitgrep/grep, you have the choice#2022-02-1514:11mpenetin my experience git-grep gets the most relevant results and is often the quickest#2022-02-1515:25vemvThanks! from what I remember, with vanilla helm-ag too many steps were involved, hence my tweaking which IIRC halved the involved steps. I really appreciate a 'streamlined' workflow which I can eventually master by muscle memory, I guess I can use vanilla helm-ag again, and tweak again the bits that seemed redundant. Hacking from scratch sure is more effective than reverse-engineering whatever I did 5y ago :)
#2022-02-1516:34ericdallodoom-emacs uses vertico with ripgrep under the hood and it works amazingly well#2022-02-1607:25mpenetmost of the modes from vertico author are really well done (consult, marginalia, corfu, etc), and they all compose nicely.#2022-02-1607:53vemvNice! Do you have a search-and-replace wrapped under a defun or such? I'd be less enthusiastic about understanding/debugging each step from scratch#2022-02-1608:30mpenetI just trigger consult-git-grep via a binding, the results show via vertico in the minibuffer, then once I am happy with the selection I trigger embark-export to get all the matches in a separate buffer via another binding and just edit the buffer contents, save, done#2022-02-1608:30mpenetit's very quick#2022-02-1608:31mpenetconsult-git-grep + vertico is useful for other things, you can use that to navigate around, vertico will do a buffer preview as you go up/down the matches in the minibuffer#2022-02-1703:56anonimitorafI use cousel-rg + ivy-occur (setting ivy-calling to t when I want to preview each search result's file and also allows me to do mass edit)#2022-02-1717:14Michael Stokleydo folks use emacs to track var usage across projects? if so, how?#2022-02-1717:15ericdalloYes, using #lsp is one of the ways https://clojure-lsp.io/features/#find-all-references-of-a-function-var-keyword-or-namespace-alias#2022-02-1717:16Michael Stokleydoes it work across projects?#2022-02-1717:16ericdallooh, I see your point now#2022-02-1717:16ericdalloonly if it's a mono-repo#2022-02-1717:17Michael Stokleyword#2022-02-1717:17ericdalloand you open the mono-repo as a project-root#2022-02-1805:29Drew Verlee@U7EFFJG73 vars in different projects aren't the same var according to the compilers... right? or do i misunderstand the question. I think the common way this is done is through a database? Or if you important a project into another (like a library), wouldn't it be "the same project".#2022-02-1816:58Michael StokleyAccording to the compilers? No, I suppose not. I am asking about importing one project into another. Can Emacs track the usage of one var, from a library, across downstream usages in other projects. This is something intellij can do (unless I’m mistaken).#2022-02-1817:00Michael StokleyIt’s not something I would normally expect, especially since the group of consuming projects would be arbitrary.#2022-02-1817:02ericdalloIntellij finds it if you import the root project, just like clojure-lsp will find it as well#2022-02-1817:49Michael Stokleyoh, nice!#2022-02-1912:44Linus EricssonIs there a way to call emacs elisp code from a jacked in cider connected clojure JVM? Preferably some kind of ”eval this string in this particular connected emacs”.#2022-02-1914:28jumarWhy would you do that?#2022-02-1914:53Linus EricssonI want to interface from clojure to org-mode.#2022-02-1914:54vemvemacsclient --eval ,,, should be invokable over sh#2022-02-1914:55Linus EricssonThanks! I guess I give it a try!#2022-02-1918:25respatializedhttps://github.com/clojure-emacs/clomacs#2022-02-2123:38zhuxun2Is there a way to eavesdrop the LSP packets between emacs and the clojure-lsp? I couldn't figure out why clojure-lsp/cljfmt is not working for my Emacs.#2022-02-2123:39ericdalloyes, check https://clojure-lsp.io/troubleshooting/#client-server-log#2022-02-2123:48zhuxun2@UKFSJSM38 Here is what I got from the log. Seems that the formatting request was returned with a null response:#2022-02-2123:48zhuxun2Does this mean cljfmt was not configured properly?#2022-02-2123:52ericdalloit means there is nothing to format on that file#2022-02-2123:53ericdallodo you have the sample code you are trying to format?#2022-02-2123:54zhuxun2Yeah, here is the file:#2022-02-2123:56ericdallowhat's your output of lsp-clojure-server-info ? the version specifically#2022-02-2123:58zhuxun2Here is the output of lsp-clojure-server-info#2022-02-2123:59ericdalloyou have a really outdated clojure-lsp#2022-02-2123:59ericdallohttps://clojure-lsp.io/installation/#2022-02-2200:10zhuxun2hmm... I installed the latest clojure-lsp, but the problem remains#2022-02-2200:11zhuxun2Same file to format#2022-02-2200:11zhuxun2I noticed the ":cljfmt {:indents {}}" but I don't remember specifying that anywhere#2022-02-2200:12ericdallothose are default ones for client-settings, it's expected#2022-02-2200:13zhuxun2Wait, it's working now#2022-02-2200:15zhuxun2Turns out I made a typo in my .cljfmt.edn which resulted in an invalid config for cljfmt#2022-02-2200:16zhuxun2My bad... though it might be useful if clojure-lsp can report that kind of error somehow#2022-02-2200:16zhuxun2Unless cljfmt never reports error for invalid config#2022-02-2200:16ericdallounfortunately, cljfmt swallow the exception and just report there is no formatting#2022-02-2200:18zhuxun2That's too bad#2022-02-2200:18zhuxun2Thanks anyways!#2022-02-2203:51zhuxun2Can clojure-lsp use a custom formatter? I would like to make my own fork of cljfmt but I am not sure if I can hook it up with clojure-lsp#2022-02-2213:17ericdallono, not possible at the moment#2022-02-2320:20DiegoDoes anybody experience some laggyness in the editor when using lsp-mode? I am particularly having issues with paredit. E.g. barf goes from being immediate to taking (what feels like) at least 300ms. Getting this messages during every edit:
LSP :: Applying 1 edits to `server.clj' ...
Applying 1 edits to `server.clj' ...done 
#2022-02-2320:25ericdallomaybe it's related with the fact that every time you use pareit with lsp-mode, by default lsp-mode call textDocument/formattingRange , which is not a really fast operation on clojure-lsp, causing this lag. You can disable this behavior though, just not recall the variable to set#2022-02-2320:26ericdalloYou can confirm this behavior checking lsp-mode logs, check https://emacs-lsp.github.io/lsp-mode/page/troubleshooting/#lsp-log#2022-02-2320:32DiegoI see this:
Cancelling textDocument/codeLens(14) in hook after-change-functions
Cancelling textDocument/documentHighlight(12) in hook after-change-functions
#2022-02-2320:35ericdallothis seems not related#2022-02-2320:36Diegohmm, that’s all I see#2022-02-2320:37ericdalloDid you opened lsp-log? with lsp-workspace-show-log ?#2022-02-2320:40Diegono, just went into the *lps-log* buffer. lsp-workspace-show-log returns IO logging is disabled#2022-02-2320:41ericdalloas mentioned on the link aboce, you need to enable lsp-log-io variable#2022-02-2320:44Diego:face_palm:#2022-02-2320:44DiegoI see it now. Yes, textDocument/formattingRange is there.#2022-02-2320:47DiegoSo how could I find how to disable it? Can’t find anything online or on the emacs-lsp repo related to textDocument/formattingRange .#2022-02-2320:48ericdalloI think I found it, it's lsp-enable-indentation#2022-02-2320:48ericdalloset it to nil#2022-02-2320:49Diegoyeah, it works!#2022-02-2320:51ericdalloGood :)#2022-02-2321:36DiegoThanks @UKFSJSM38#2022-02-2320:45Alex Miller (Clojure team)Just a reminder that the State of Clojure 2022 survey https://www.surveymonkey.com/r/clojure2022 is open and to make sure you register your use of Emacs (Question #20)#2022-02-2412:02rickmoynihanCan anyone help debug this issue I’m getting using clojure in Emacs/cider … When I run cider-find-dwim on a symbol for a dep I haven’t visited the definition of yet, I get prompts like this: > Directory ‘/Users/rick/.m2/repository/com/github/oliyh/martian/0.1.20/martian-0.1.20.jar:martian/’ does not exist; create? (y or n) n If I respond n a few times and then repeat the cider-find-dwim command it works. Any ideas what might be causing it?#2022-02-2414:29vemvDoesn't ring a bell, feel free to create an issue#2022-02-2416:13rickmoynihanI’m not convinced it’s cider that’s the problem#2022-02-2416:13rickmoynihanprobably another package or piece of config#2022-02-2414:09Nathan RogersHello, I mentioned in #beginners that since beginning the Clojure Applied book, I have encountered numerous Emacs crashes. This seems inexplicable as I never seem to encounter Emacs crashing. Does anyone have any information on known issues, or have others experienced similar behavior?#2022-02-2414:31Benjaminhttps://emacs.stackexchange.com/questions/21643/what-do-i-do-when-emacs-is-frozen it freezes this can help. Else the only real generic advice is to go from a minimal config and enable config/ packages 1 by 1#2022-02-2415:04practicalli-johnI've been using CIDER with Emacs commercially for many years and only ever experienced crashes an occasional nightly build of Emacs. As well as running the Emacs debugger, also try running the Emacs profiler. As suggested, try a minimalist config, or try Spacemacs, Doom or prelude community configurations (each of which support Clojure easily)#2022-02-2415:05practicalli-johnIf helpful, this book documents how I use CIDER and Spacemacs for Clojure development and more general editing https://practical.li/spacemacs/#2022-02-2416:01vemvcould be the choice of emacs binary in question? emacsformacosx tends to the the most stable choice in Mac. Others can add extra tweaks which are nice but also a little more prone to weird issues#2022-02-2416:01vemvalso could be arm vs intel if you're on mac#2022-02-2514:25Caseyhi there folks. I'm looking for a mechanism to switch buffers/files by namespace rather than file. I use doom with ivy+projectile and use the projectile-find-file to hop around the codebase. But I'd much rather browse at the namespace level than the file. Any idea if there's some combo of cider/lsp that can make this happen? Or maybe let me open the question more: how do you browse around namespaces ?#2022-02-2514:26ericdallomaybe you can use consult-lsp-symbols ?#2022-02-2514:26ericdallothere is no such feature that return only namespaces though AFAIK#2022-02-2516:18ennThis isn’t quite what you are looking for, but I have a snippet that sets the names of Clojure buffers to the namespace, rather than the file:
(defun tc/rename-buffer-to-ns ()
  (interactive)
  (when (buffer-file-name)
    (let ((ns (clojure-expected-ns)))
      (when (not (string= "" ns))
        (rename-buffer ns)))))

(add-hook 'clojure-mode-hook 'tc/rename-buffer-to-ns)
#2022-02-2516:19ennHandy for navigating buffers once they’re open, but doesn’t really address the problem of finding files#2022-02-2517:07practicalli-johnhelm-lsp-workspace-symbol looks very useful, lists namespaces and symbols in those namespaces (I assume this is similar to consult-lsp-symbols) Otherwise, I either jump to definition if the namespace or function is used in the current buffer (and easy to jump the cursor too) Mostly I use projectile find file - fuzzy matching of the pattern means _ characters can be skipped (as can most of the name), so narrowing by namespace name would be the same pattern as use with filenames anyway. cider-browse-ns could be used, although I believe it only lists loaded namespaces and requires navigating through a document popup that contains a link to the namespace file. Much more fiddly.#2022-02-2518:15practicalli-johnoh, and there is cider-find-ns which lists all loaded (evaluated) namespaces in the current project. This seems to be what the original ask was (assuming the namespaces are all loaded in the running REPL)#2022-02-2608:42Caseyconsult-lsp-symbols is only available in doom when using vertico. But I'm using ivy.#2022-02-2608:44Caseycider-find-ns is nice! But it doesn't prioritize "project" ns over ns from dependencies#2022-02-2608:44CaseyI'll play some more with these#2022-02-2610:55jmckitrickI use easy-kill almost constantly for selecting/copying sexps. After M-w then I press s as many times as needed to select additional sexps. I run weekly builds of emacs 29 HEAD. Since about a week or so ago, this feature no longer works. I’ve gone back to emacs 28, and it’s fine. Any ideas?#2022-02-2611:21jmckitrickI should add easy-kill has not changed in quite some time#2022-02-2817:07ericdalloAny reasons to not use code actions instead of manually calling the command? The code action is a reliable way since if it's available it's because clojure-lsp knows how to require it.#2022-03-0202:23DiegoThat was a response to a message I deleted? Yeah, I found about the actions immediately after I posted my question, so that’s why I deleted it. I got confused because clj-refactor has an ...add-missing-libspec command that does the same thing.#2022-03-0304:44anonimitorafHey guys, I recently switched from ivy -> vertico. One thing I'm missing is being able to: • Search a project with some string • Preview each match (i.e. get shown the file for each match) Anyone know if something like this is supported for vertico?#2022-03-0304:51mpenetconsult adds this (and more).#2022-03-0306:42anonimitorafAh cool, I'll check it out#2022-03-0307:10anonimitoraf
(consult-customize
    consult-ripgrep consult-git-grep consult-grep
    consult-bookmark consult-xref
    consult--source-bookmark
    :preview-key '(:debounce 0.25 any))
Sweet, just what I wanted
#2022-03-0307:11mpenetconsult if full of gems#2022-03-0307:12anonimitorafYeah I've been skimming the readme. Any other ones you use yourself @mpenet?#2022-03-0307:12mpenetif you pair its usage with embark you can get really nice workflows#2022-03-0307:13mpenetyes, consult-line (equivalent of swiper) and a few others#2022-03-0307:14mpenetmy conf is public: https://github.com/mpenet/emax/blob/master/init.el#L294#2022-03-0307:35anonimitorafSweet as, I'll check it out#2022-03-0311:27jmckitrick@mpenet consult and embark are the 2 you are talking about?#2022-03-0311:31mpenetyes#2022-03-0311:34jmckitrickHmm. I need to decide if it’s worth switching from counsel/swiper etc :thinking_face:#2022-03-0312:02mpenetit is#2022-03-0312:51jmckitrickWell, I’m seriously considering it. What’s the best way to avoid a nasty learning curve or reconfiguration nightmare? I have everything dialed in nicely and I love it, but I’m always looking for ways to improve and replace outdated tools.#2022-03-0312:57mpenetI'd say go all in an replace ivy/swiper/counsel with vertico/consult/embark/orderless/marginalia, in my experience they are much easier to configure#2022-03-0312:58mpenetivy is quite an enormous package that entangles with a lot of other packages, I remember having to fight against it quite a bit when I was using it#2022-03-0312:58mpeneteither use an existing user config as base, or just go through the readme of vertico, it gives a lot of hints on how to make it all work together#2022-03-0313:00mpenetthen you'll discover about corfu vs company and dig yourself deeper into that rabbithole 🙂#2022-03-0313:00mpenetmost of these packages are either from the same author or people that all contribute to the same bunch of repositories. Small composable pieces#2022-03-0313:09jmckitrickok, that will be my Friday emacs project!#2022-03-0414:35jmckitrick@mpenet I’m going to spend the day with your emacs setup for those packages. This should be fun. I need to take some notes first to find my way around lol#2022-03-0416:08jmckitrickI’d love to see a table mapping ivy/swiper/counsel features to corresponding features in this new suite#2022-03-0416:33lukaszoh no, we're replacing ivy now - I just finished removing helm last year 😢#2022-03-0417:43magnarsI'm still using ido and grep, perfectly happy with that.#2022-03-0417:50magnarsI'm sure vertico and friends is some pretty cool software, don't get me wrong - but use whatever works for you, no need to reconfigure everything every two years#2022-03-0417:53lukaszyeah, I learned that during my helm migration - mostly due to performance issues I was running into#2022-03-0417:54lukaszI'm not planning to replace ivy anytime soon because it works for me#2022-03-0418:09jmckitrickYeah, I’m on the fence. I do have my system dialed in pretty well right now, but I still like to see emacs innovate in a crowded field of IDEs and dev tools.#2022-03-0418:09jmckitrickAnd only when it helps me get my work done, of course!#2022-03-0418:40jmckitrickembark especially seems extremely useful#2022-03-0712:19BenjaminHello emacs clojure friends. Who uses lispy and evil and has a story for multiple cursors? Using evil-mc seems to be clunky#2022-03-0712:28BenjaminAlso it can brake undo#2022-03-0716:04practicalli-johnI've used evil-mc with evil-cleverparens and havent experienced any clunkyness. I've not experienced any issues undoing changes from evil-mc. Havent used lispy I'm afraid.#2022-03-0720:00jvtrigueros+1 for evil-cleverparens, I tried lispy but too many things wouldn’t work quite right.#2022-03-0720:33Simion Iulian BeleaI use lispy, evil and evil-mc+multi-edit. Now issues so far.#2022-03-0720:34Simion Iulian Beleathough, I still need to get used to the different shortucts and modes for creating multiple edits with mc and multiedit#2022-03-0815:46jasonjcknis evil cleverparens still maintained by anyone? hasn't been updated in years and i had to fork it for some minor fixes #2022-03-0911:56jumarDoes anybody else have problems with melpa? My emacs keep getting stuck on Contacting host: https://clojurians.slack.com/archives/C09C8GRLY/p1646814584636759#2022-03-0911:57jumarIt was happening to me yesterday too. Most of the time it just freezes on this "Contacting host" thing without progressing further.#2022-03-1004:09ahungryI've had similar happen if melpa was unavailable - were you able to hit it via web browser or telnet/netcat when experiencing the issue?#2022-03-1007:51jumar@m131 I can open the main page in the browser but my emacs is still stuck. All these work in the browser: • https://melpa.org/#/https://elpa.gnu.org/https://elpa.nongnu.org/ I captured tcpdump for the host https://melpa.org but it's big and hard to make sense of, especially since it's https.#2022-03-1007:55jumarNow it actually looks like it works, it's just the minibuffer that's frozen and misleading - further discussion here: https://clojurians.slack.com/archives/C09C8GRLY/p1646898926240989?thread_ts=1646814584.636759&amp;cid=C09C8GRLY#2022-03-1417:24Alex Miller (Clojure team)in case anyone here can help... https://ask.clojure.org/index.php/11621/emacs-standard-configuration-error#2022-03-1614:05jmckitrickI went through a recent guide on setting up emacs to display emojis on my mac. In a clojure file I’m working on, I can paste in an emoji w/o issues. However, there are other characters (`\uD83D` , etc) that should be emojis but are rending as raw codes. Is there a simple fix? I tried changing buffer file encoding to UTF-16 but that doesn’t seem to help.#2022-03-1614:09paulspencerwilliamsSo, this morning, I’ve been trying and failing to understand why I can’t perform http requests from org-mode on Clojure apps that are being debugged with Cider. If the apps are simply run from a Cider repl, these kind of http requests work okay:
#+begin_src shell :results raw 
curl -X GET -k --header 'Accept: application/json' --header "authorization: Bearer ${token}" ''
#+end_src
But if I cider-debug-defun-at-point on the endpoint handler and execute the above org mode src block, it hangs with
#2022-03-1614:11magnarsI'm guessing that Emacs freezes while waiting for the curl to return, preventing the debugger from kicking in.#2022-03-1614:12dpsuttonthat sounds like a good theory. un-instrument the function, add a (Thread/sleep 15000) and see if you can interact with emacs while the request takes 15 seconds.#2022-03-1614:18paulspencerwilliamsTrying, cheers guys!#2022-03-1614:20paulspencerwilliamsYeah, Emacs freezes for 15 seconds..#2022-03-1614:21paulspencerwilliamsI wonder if I can make the org mode block async…#2022-03-1614:21dpsutton:results raw means it will put the result of the computation into the block right? If you drop that does it still freeze emacs? Maybe if it doesn’t have to wait on results it is a bit more free?#2022-03-1614:22magnarsEmacs was single threaded for 30 years, so that's still the default pretty much everywhere. There might be some hoops you can jump through to mend that.#2022-03-1614:24paulspencerwilliamsI’m currently trying https://github.com/astahlman/ob-async but will try removing the :results header afterwards!#2022-03-1614:32paulspencerwilliamsNeither that package with :async or removing the :results header improved matters.#2022-03-1614:36paulspencerwilliamsSaying that, that package’s readme shows specifically sh babel scripts showing the benefits. Maybe my install didn’t work correctly.#2022-03-1614:50paulspencerwilliamsRTFM @U064B4L0K!!!! I’d installed but forgotten to require it. Works a treat with
#+begin_src shell :results raw :async
both with 15 second sleep and debugging! Cheers!
#2022-03-1614:10paulspencerwilliamsIf I execute pkill -SIGUSR2 Emacs , Emacs comes back to life with
Debugger entered--entering a function:
* symbol-overlay-refresh(1 5 0)
  call-process("/bin/zsh" "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b..." (t "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/e...") nil "-c" "/bin/zsh")
  apply(call-process "/bin/zsh" "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b..." (t "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/e...") nil ("-c" "/bin/zsh"))
  process-file("/bin/zsh" "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b..." (t "/var/folders/6t/jjj6xvtx39v9m8fvvcqsgj940000gn/T/b...") nil "-c" "/bin/zsh")
  org-babel--shell-command-on-region("/bin/zsh" #<buffer  *Org-Babel Error*>)
  org-babel-eval("/bin/zsh" "token=$(curl -X GET -k --header 'Accept: applicati...")
  org-babel-sh-evaluate(nil "token=$(curl -X GET -k --header 'Accept: applicati..." ((:colname-names) (:rowname-names) (:result-params "replace" "raw") (:result-type . value) (:results . "replace raw") (:exports . "code") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no")) nil nil)
  org-babel-execute:shell("token=$(curl -X GET -k --header 'Accept: applicati..." ((:colname-names) (:rowname-names) (:result-params "replace" "raw") (:result-type . value) (:results . "replace raw") (:exports . "code") (:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no")))
  org-babel-execute-src-block(nil ("shell" "token=$(curl -X GET -k --header 'Accept: applicati..." ((:colname-names) (:rowname-names) (:result-params "raw" "replace") (:result-type . value) (:results . "raw replace") (:exports . "code") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 357 "(ref:%s)"))
  org-ctrl-c-ctrl-c(nil)
  funcall-interactively(org-ctrl-c-ctrl-c nil)
  call-interactively(org-ctrl-c-ctrl-c nil nil)
  command-execute(org-ctrl-c-ctrl-c)
#2022-03-1701:21winsomeWhat's the best way to rename a bunch of files? I can get an occur buffer via projectile-find-file, and I can edit it, but when I try to save it just prompts me for a file to save the changes in, instead of renaming all the files.#2022-03-1701:22winsomeI've now spent way more time than it would take to manually do them one by one, but I'm determined to do it the emacs way :p#2022-03-1701:47Cora (she/her)I imagine something like this? http://pragmaticemacs.com/emacs/dired-rename-multiple-files/#2022-03-1701:47Cora (she/her)that's just in one directory, though#2022-03-1701:48Cora (she/her)this feels like a problem best solved in a shell, to me, though#2022-03-1704:06winsomeYeah, I may have to - my files are not in the same directory. Thanks for the link, though, dired is great!#2022-03-1818:26agyou can use find-name-dired and then use the wdired mode to rename files.#2022-03-1819:10winsomeThat worked! Thanks#2022-03-1706:07teodorluPlease do report back if you figure it out - I'm curious! If you revert to Unix tools, "find ... -exec ..." might work. https://unix.stackexchange.com/questions/227662/how-to-rename-multiple-files-using-find#2022-03-1708:38mpenetyou can do that via embark#2022-03-1708:39mpenetuse some command to list all the files you're interested in (consult find file, project.el/projectile find file, etc) , embark-export, edit dired buffer that contains your filtered results (via wdired-change-to-wdired-mode), save and done#2022-03-2002:58jmckitrickAfter switching to vertico/orderless/consult/corfu has anyone had issues with completion on namespaced symbols or symbols with an alias?#2022-03-2003:00jmckitrick@mpenet I’m using your emacs config for inspiration, but I’m not sure I’m ready to run cider and lsp side-by-side so I’m skipping that for now#2022-03-2004:58ACthere are a few github issues about this (spread across cider, corfu, orderless repos). here’s one — https://github.com/clojure-emacs/cider/issues/3019 I currently work around this by using the basic completion-style for cider buffers.
(use-package cider
  ...
  :hook
  (cider-mode . (lambda () (setq-local completion-styles '(basic)))))
(there are probably better ways to set it, but I’m hoping it’s temporary)
#2022-03-2013:03jmckitrickThat did the trick! Thank you @U0124C56J5R#2022-03-2014:27apt> After switching to vertico/orderless/consult/corfu has anyone had issues with completion on namespaced symbols or symbols with an alias? I don’t remember having that kind of issues. However, I think I’m relying solely on lsp for completions (I’m using eglot + inf-clojure , not cider, if that’s relevant)#2022-03-2315:33AkizWhy eglot instead of lsp-server?#2022-03-2320:03aptIt felt more emacsy than lsp-mode. Maybe that’s because I had lsp-ui or something, though, and it’s unrelated to lsp-mode itself. In any case, I like eglot ’s defaults and I enjoy it being so minimal and unobtrusive. But both are great. Note that jumping to definition does not work for external dependencies in eglot yet.#2022-03-2320:05aptAdditionally, using eglot was part of an experiment of creating my own config and using small packages. I stopped using doom-emacs (which is great, btw) and started my own config, used vertico, corfu with no automatic completion instead of company, eglot, inf-clojure instead of cider etc. I enjoyed the result.#2022-03-2409:48AkizInteresting I would love to see a demo of this. Did you do it because you want a cleaner and more minimalistic setup that just works? Or did you get some extra functionality also?#2022-03-2417:19apt> Did you do it because you want a cleaner and more minimalistic setup that just works? Yeap, that sums it up well. Fewer moving parts. Simpler and intentionally dumber. By far, the biggest difference is using inf-clojure (socket repl) instead of cider(nrepl). I think my workflow doesn’t have anything exceptional, it’s just using a repl. Sean Corfield has a few good videos. He’s not using Emacs but he uses a socket repl as well. Here’s my current config: https://github.com/Andre0991/dotfiles/blob/master/emacs.el#2022-03-2616:16Akiz@U976F1AR2 Just a question -Why do you use Corfu if you dont have an automatic completion for Clojure? Just because of elisp?#2022-03-2616:17aptFeel free to ask. corfu gets Clojure completions with LSP#2022-03-2616:26AkizHmph, I am trying eglot right now - that works. Corfu works for me in elisp buffer (or eshell). But i dont get any completion with eglot + corfu in clj buffer. This is my config.
(use-package eglot
      :ensure t)

(add-hook 'clojure-mode-hook 'eglot-ensure)

(use-package corfu
         :config 
         (add-hook 'prog-mode-hook 'corfu-mode)
         (add-hook 'shell-mode-hook 'corfu-mode)
          (with-eval-after-load 'corfu
              (setq corfu-auto nil)
              (define-key corfu-map (kbd "SPC") #'corfu-insert-separator)))
#2022-03-2616:27AkizAnd i misunderstood your message https://clojurians.slack.com/archives/C099W16KZ/p1648065929668689?thread_ts=1647786473.842079&amp;cid=C099W16KZ where you say “no automatic completion”#2022-03-2616:31aptOh, sorry for the confusion. I meant ‘no automatic completion’ in the sense that the completions list does not show up automatically. I have to press tab in order to show them. This is corfu’s default behaviour, by the way. It’s customizable.#2022-03-2616:34AkizAh, tab doesnt work for me in clojure buffer (no cider or infer installed yet). Both processes are running. Strange. Otherwise - this minimalistic setup seems great for my 2019 i3 macbook#2022-03-2616:38aptNice, good to hear that. On having tab to get completions in Clojure, I think having eglot connected to the clojure-lsp server should be enough. As the config has
(add-hook 'clojure-mode-hook 'eglot-ensure)
it should connect to LSP just after visiting a Clojure buffer (assuming clojure-lsp is on PATH)
#2022-03-2617:45AkizIt does, lsp works great. I just dont see any corfu integration. It will be some silly mistake probably on my side. Thanks#2022-03-2708:29AkizIve got it… It is mapped to meta+tab in clojure. Btw. i am looking at your vilpy package - would you use it with evil?#2022-03-2720:30aptIt can be used with evil. The README has some elisp for preventing some bindings shadowing. I don’t use evil nowadays, though. When I used lispy/`vilpy` with evil, I mostly stayed in insert mode when editing lisps.#2022-03-2213:23Ben SlessDid anyone's Emacs start persisting undo-tree files?#2022-03-2213:54lassemaattathere was some recent discussion of this over at reddit, https://www.reddit.com/r/emacs/comments/tejte0/undotree_bug_undotree_files_scattering_everywhere/#2022-03-2214:02Ben Slessthanks!#2022-03-2218:16tvaughan
(use-package undo-tree
  :bind
  (("C-z" . undo-tree-undo)
   ("C-c z" . undo-tree-visualize))
  :init
  (let ((undo-tree-history-directory (expand-file-name "undo-tree" user-emacs-directory)))
    (setq undo-tree-history-directory-alist `(("." . ,undo-tree-history-directory))))
  :config
  (global-undo-tree-mode t))
#2022-03-2310:13genmeblogHow to explicitly select clj-kondo as a backend for flycheck in lsp-mode? looks like lsp-mode brings own checker which reports nothing and this checker is set by default...#2022-03-2310:13genmeblog#2022-03-2310:14borkdude@U1EP3BZ3Q As I'm developing clj-kondo I always use my own clj-kondo version together with clojure-lsp. To do this, you have to disable diagnostics in ls-mode#2022-03-2310:15borkdude
lsp-diagnostics-provider :none
#2022-03-2310:15genmeblogstill it doesn't work...#2022-03-2310:15genmeblog
;; clojure

(use-package flycheck)
(use-package flycheck-clj-kondo)
(use-package clojure-mode
  :config (require 'flycheck-clj-kondo))
(use-package cider
  :custom ((cider-eldoc-display-context-dependent-info t)
	   (cider-repl-pop-to-buffer-on-connect 'display-only)
	   (cider-overlays-use-font-lock t)
	   (cider-repl-buffer-size-limit 60000)))
(use-package clj-refactor)
(use-package clojure-mode-extra-font-locking)
(use-package sayid)
(use-package cljr-ivy)
(use-package clojure-snippets)
(use-package clj-decompiler)

;; lsp

(use-package lsp-mode
  :hook ((clojure-mode . lsp))
  :custom ((lsp-lens-enable t)
	   (lsp-enable-indentation nil)
           (lsp-diagnostics-package :none)
           (lsp-clojure-custom-server-command '("/usr/local/bin/clojure-lsp")))
  :config (dolist (m '(clojure-mode
		       clojurec-mode
		       clojurescript-mode
		       clojurex-mode))
	    (add-to-list 'lsp-language-id-configuration `(,m . "clojure"))))

(use-package lsp-ui :commands lsp-ui-mode)
(use-package lsp-treemacs)
(use-package lsp-ivy)
#2022-03-2310:15genmeblogah wait... provider!#2022-03-2310:17genmeblog@U04V15CAJ thanks a lot! I was setting wrong variable 😕 Now it works.#2022-03-2316:54ericdallo> brings own checker which reports nothing and this checker is set by default... FYI: lsp-mode checker uses server diagnostics, which if you are using clojure-lsp uses clj-kondo under the hood anyway with extrac checks like unused-public-var , so if you are not developing clj-kondo or similar and it's using lsp-mode already with clojure-lsp I suggest stick to lsp's diagnostics#2022-03-2318:35genmeblog@UKFSJSM38 thanks, I know that clj-kondo is used under the hood. However it seems to skip some test (like unused fn args for example) which are important for me.#2022-03-2318:42ericdallonot really, this is all delegated to clj-kondo, we have all features clj-kondo has#2022-03-2318:42ericdallomaybe something with your config?#2022-03-2318:43ericdallo#2022-03-2318:55genmeblogHmmm... Possibly. I posted Clojure part of confif at the beginning of this thread. Will take a look at this again...#2022-03-2408:08genmeblogIt was definitely something wrong with my config. Now it works. Thanks.#2022-03-2316:06CarloI started getting the weirdest error, and I'm not sure how to debug it. If I start a repl in a very barebone project, (one file with no definitions, and the deps.edn file is just {}, I get:
nREPL server started on port 42689 on host localhost - 
;; Connected to nREPL server - 
;; CIDER 1.2.0snapshot, nREPL 0.9.0-beta3
;; Clojure 1.10.3, Java 11.0.12
;;     Docs: (doc function-name)
;;           (find-doc part-of-name)
;;   Source: (source function-name)
;;  Javadoc: (javadoc java-object-or-class)
;;     Exit: <C-c C-q>
;;  Results: Stored in vars *1, *2, *3, an exception in *e;
;;  Startup: /run/current-system/sw/bin/clojure -J-Dghostwheel.enabled=true -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0-beta3"} refactor-nrepl/refactor-nrepl {:mvn/version "3.0.0-alpha13"} cider/cider-nrepl {:mvn/version "0.27.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
Execution error (NullPointerException) at user/eval6938 (REPL:11).
null
I wasn't having this problem yesterday, and I'm unsure about what changed
#2022-03-2316:11dpsuttoni’m guessing something in your user file changed#2022-03-2316:12dpsuttonbut just run `/run/current-system/sw/bin/clojure -J-Dghostwheel.enabled=true from a terminal and see if you can recreate. then try the whole form /run/current-system/sw/bin/clojure -J-Dghostwheel.enabled=true -Sdeps ‘{:deps {nrepl/nrepl {:mvn/version “0.9.0-beta3”} refactor-nrepl/refactor-nrepl {:mvn/version “3.0.0-alpha13"} cider/cider-nrepl {:mvn/version “0.27.2”}} :aliases {:cider/nrepl {:main-opts [“-m” “nrepl.cmdline” “--middleware” “[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]“]}}}’ -M:cider/nrepl`#2022-03-2316:39Carlowhere's the user file? The first invocation gives me a repl, the second one:
$ /run/current-system/sw/bin/clojure -J-Dghostwheel.enabled=true -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.9.0-beta3"} refactor-nrepl/refactor-nrepl {:mvn/version "3.0.0-alpha13"} cider/cider-nrepl {:mvn/version "0.27.2"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
nREPL server started on port 45425 on host localhost - 
and then no more output
#2022-03-2316:49dpsuttonthe file user.clj#2022-03-2316:50dpsuttonsomewhere on your classpath possibly#2022-03-2316:50dpsuttonok so it starts up successfully from the terminal#2022-03-2316:50dpsuttonanother thing to try is to m-x nrepl-toggle-message-logging and see what messages are being sent and see if you can identify which form is causing an error#2022-03-2317:08CarloAnd if I do that in the *nrepl-messages file I get:
(-->
  id         "1"
  op         "clone"
  time-stamp "2022-03-23 18:07:47.853539798"
)
(<--
  id          "1"
  session     "3a6296e1-8dc9-4953-830c-f7096037a642"
  time-stamp  "2022-03-23 18:07:47.867360287"
  new-session "3f8edff6-2be6-4805-88e4-861d35f0e780"
  status      ("done")
)
(-->
  id         "2"
  op         "clone"
  time-stamp "2022-03-23 18:07:47.887012884"
)
(<--
  id          "2"
  session     "b288116f-d426-41c8-a1d1-0f934195b7ab"
  time-stamp  "2022-03-23 18:07:47.888980355"
  new-session "da2c4d47-e11b-4b6b-bb19-5c56effce8ec"
  status      ("done")
)
(-->
  id         "3"
  op         "describe"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:47.907917218"
)
(<--
  id         "3"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:47.915637077"
  aux        (dict ...)
  ops        (dict ...)
  status     ("done")
  versions   (dict ...)
)
(-->
  id                                 "4"
  op                                 "eval"
  session                            "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                         "2022-03-23 18:07:47.949186858"
  code                               "(let [__value (clojure.core/apply clojure.core/require cloju..."
  column                             1
  file                               "*cider-repl clojure/malliOmg:localhost:39249(clj)*"
  inhibit-cider-middleware           "true"
  line                               11
  nrepl.middleware.print/buffer-size 4096
  nrepl.middleware.print/options     (dict ...)
  nrepl.middleware.print/print       "cider.nrepl.pprint/pprint"
  nrepl.middleware.print/quota       1048576
  nrepl.middleware.print/stream?     "1"
)
(<--
  id         "4"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:48.060764262"
  err        "Execution error (NullPointerException) at user/eval6938 (REP..."
)
(<--
  id         "4"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:48.102727695"
  ex         "class java.lang.NullPointerException"
  root-ex    "class java.lang.NullPointerException"
  status     ("eval-error")
)
(-->
  id                                 "5"
  op                                 "stacktrace"
  session                            "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                         "2022-03-23 18:07:48.104261194"
  nrepl.middleware.print/buffer-size 4096
  nrepl.middleware.print/options     (dict ...)
  nrepl.middleware.print/print       "cider.nrepl.pprint/pprint"
  nrepl.middleware.print/quota       1048576
  nrepl.middleware.print/stream?     "1"
)
(<--
  id         "4"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:48.105132252"
  status     ("done")
)
(-->
  id         "6"
  op         "out-subscribe"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:48.106093896"
)
(-->
  id                                 "7"
  op                                 "init-debugger"
  session                            "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                         "2022-03-23 18:07:48.107134403"
  nrepl.middleware.print/buffer-size 4096
  nrepl.middleware.print/options     (dict ...)
  nrepl.middleware.print/print       "cider.nrepl.pprint/pprint"
  nrepl.middleware.print/quota       1048576
  nrepl.middleware.print/stream?     "1"
)
(-->
  id                           "8"
  op                           "version"
  session                      "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                   "2022-03-23 18:07:48.117185766"
  debug                        "false"
  insert-newline-after-require "true"
  prefix-rewriting             "false"
)
(<--
  id         "8"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:48.123624126"
  status     ("done")
  version    "3.0.0-alpha13"
)
(-->
  id                           "9"
  op                           "version"
  session                      "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                   "2022-03-23 18:07:48.138939798"
  debug                        "false"
  insert-newline-after-require "true"
  prefix-rewriting             "false"
)
(<--
  id         "9"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:48.143182456"
  status     ("done")
  version    "3.0.0-alpha13"
)
(-->
  id                           "10"
  op                           "artifact-list"
  session                      "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                   "2022-03-23 18:07:48.160728478"
  debug                        "false"
  force                        "false"
  insert-newline-after-require "true"
  prefix-rewriting             "false"
)
(-->
  id                           "11"
  op                           "warm-ast-cache"
  session                      "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp                   "2022-03-23 18:07:48.162174268"
  debug                        "false"
  ignore-paths                 nil
  insert-newline-after-require "true"
  prefix-rewriting             "false"
)
(<--
  id         "10"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:49.417052327"
  artifacts  ("side-fx" ...)
  status     ("done")
)
(<--
  id            "6"
  session       "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp    "2022-03-23 18:07:49.969334107"
  out-subscribe "3f8edff6-2be6-4805-88e4-861d35f0e780"
  status        ("done")
)
(<--
  id           "11"
  session      "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp   "2022-03-23 18:07:51.459600573"
  ast-statuses "()"
  status       ("done")
)
(<--
  id         "5"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:53.869526756"
  class      "java.lang.NullPointerException"
  message    nil
  stacktrace ((dict "class" "clojure.core$with_meta__5437" "file" "core.clj" "file-url" "jar:file:/home/carlo/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj" "flags" ("clj") "fn" "with-meta" "line" 220 "method" "invokeStatic" "name" "clojure.core$with_meta__5437/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/with-meta") ...)
)
(<--
  id         "5"
  session    "3f8edff6-2be6-4805-88e4-861d35f0e780"
  time-stamp "2022-03-23 18:07:53.870304907"
  status     ("done")
)
#2022-03-2317:10CarloI think this could be the culprit:
stacktrace ((dict "class" "clojure.core$with_meta__5437" "file" "core.clj" "file-url" "jar:file:/home/carlo/.m2/repository/org/clojure/clojure/1.10.3/clojure-1.10.3.jar!/clojure/core.clj" "flags" ("clj") "fn" "with-meta" "line" 220 "method" "invokeStatic" "name" "clojure.core$with_meta__5437/invokeStatic" "ns" "clojure.core" "type" "clj" "var" "clojure.core/with-meta") ...)
#2022-03-2317:10dpsuttoni think it was blowing up on `(let [value (clojure.core/apply clojure.core/require cloju...” `#2022-03-2317:11Carlowhere is that? (I know that I have written some code that looks like that in my emacs config#2022-03-2317:11Carlobut where do you see it in the trace?#2022-03-2317:11dpsutton#2022-03-2317:11Carlooh I see#2022-03-2317:11dpsuttonmessage 4. and then an error#2022-03-2317:12Carlook I understand what's the problem here; in my emacs config, I wrote:
(after! cider-mode
  (defun cider-tap (&rest r)
    (cons (concat "(let [__value "
                  (caar r)
                  "] (tap> (with-meta __value {:portal.viewer/default :portal.viewer/pprint}))
                     __value)")
          (cdar r)))

  (advice-add 'cider-nrepl-request:eval
              :filter-args #'cider-tap))
it turns out that I can't do the with-meta wrapping, but I wish I understood why
#2022-03-2317:14Carlobasically I was trying to wrap every message that passes through tap> with some metadata (to set the portal viewer), but maybe some values can't accept metadata and they blow up?#2022-03-2317:23dpsuttoncaar isn’t a valid function name#2022-03-2317:23dpsuttonand cdar what are those?#2022-03-2317:24dpsuttonah i missed how they were interspersed in the string there#2022-03-2317:24dpsuttonwell, that’s your problem. i’m not sure what you’re trying to accomplish but the error is in your code#2022-03-2317:27Carlosure, thank you, I think my original problem is solved, I'll confirm as I finish upgrading emacs. I'll ask if there's some construct that can't get metadata in another channel! ☺️#2022-03-2317:28dpsuttonanything that doesn’t implement IObj i believe#2022-03-2317:28dpsuttonso lots of java things. numbers, strings, etc#2022-03-2317:28dpsuttonits not universally applicable#2022-03-2317:29dpsuttoni’d probably turn that into something like (doto value portal/view) or something like that#2022-03-2504:39ahungrycaar and cdar, good old common lisp trickled into emacs-lisp 😄 I love this one:
defun cddadr (x)
  "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X."
#2022-03-2504:40ahungryI think in CL they go even further htan cddadr / cddddr#2022-03-2504:51dpsuttonI think the does require them out to like nine or so#2022-03-2514:03MarisEldoc was not working for me in Emacs. Now I have to do this:#2022-03-2514:03Maris
(defun eldoc-hack ()
  (setq eldoc-documentation-strategy 'eldoc-documentation-default)
  (eldoc-mode 1))

(use-package clojure-mode 
  :hook (
	 (cider-mode . eldoc-hack))
#2022-03-2520:12agusing lsp?#2022-03-2520:13agcheck the value of cider-eldoc-display-for-symbol-at-point#2022-03-2520:14agand if you're using lsp then also lsp-eldoc-enable-hover#2022-03-2514:05MarisDoes anyone know why? I am using cider 1.3.0.#2022-03-2817:18QuestMagit specific, but can I get this error to be ignored when running magit-checkout-branch ? This is always thrown with any unstaged change, even when I'm creating a new branch from the current HEAD (which inherently can't conflict) Cannot checkout when there are uncommitted changes Is there a better way to do this? This is one of the last uses that I still have for git CLI over magit; faster to run git checkout -b than 2x magit-stash + magit-checkout-branch .#2022-03-2817:56pavlosmelissinosDo you mean magit-branch-checkout? Either way, I don't get that error (with magit 3.3.0), even when I have tracked changes, so maybe it's on your end? :thinking_face: Can you share your magit config and version? (Btw aren't you running magit commands from the magit-status buffer? Even if you had to do "2x magit-stash + magit-checkout-branch" you'd only have to write z z b c <name of branch> z p which is - probably- still easier to type than git checkout -b)#2022-03-2817:57Andreayou could advice that function to stash for you, no? If you are not familiar with advicing functions, you can add something like
(advice-add 'magit-checkout-branch :before
              (lambda (&rest _)
                (shell-command "git stash;"))
#2022-03-2823:34QuestHmm, making the function stash for me might work. But it's odd that it doesn't repro. I'll experiment tomorrow and see if I can figure out what's causing this#2022-03-2908:04HagenekI have problems with which key, I get the following message when I press SPC SPC in spacemacs. Anyone have ideas to how I can find out whats wrong?#2022-03-2910:16practicalli-johnI assume you have tried restarting Emacs, especially if new packages have been installed#2022-03-2910:18practicalli-johnhttps://practical.li/spacemacs/install-spacemacs/troubleshooting.html guide as advice on trying to fix issues with Spacemacs I haven't experienced this problem myself, although I haven't updated packages for a few weeks#2022-04-0610:47HagenekThanks 😃#2022-03-2918:05quollIf I have an evil-mode question, am I best to ask here, or in the more vi-focused areas like #doom-emacs or #spacemacs, please?#2022-03-2918:16ericdalloIMO this is a good channel#2022-03-2922:02tomdn.b. I'm the maintainer of evil and I'm not even in #doom-emacs or #spacemacs 😬#2022-03-3000:51quollWell it's on my home computer, not my work machine (actually, the work machine is probably behaving the same. I should check). I’ll ask when I'm back on my personal computer again 🙂#2022-03-2918:07quollI know that's vague, but I was just after general guidelines#2022-03-2918:54jmckitrickThere’s a feature of ivy and swiper I’d like to duplicate in vertico/consult/embark. I use ‘C-s’ to start a search, then I have a binding for ivy-yank-word that lets me build my search string with only one keybinding. I have found kludgy ways of doing this in embark and consult, but it seems there should be a better way.#2022-03-2918:58agI'm intrigued, but I don't get what you're saying. Can you elaborate?#2022-03-2919:00zachDoes vertico, consult, embark provide a keymap you can use?#2022-03-2919:57ag@U061KMSM7 are you talking about converting i-search to swiper search on the fly?#2022-03-2919:57jmckitrickYes, I think that’s what it is… let my check my config…#2022-03-2919:59jmckitrickyes, swiper, and also swiper-thing-at-point. But I start with swiper rather than i-search with C-s, and then yank in the next word (subword mode in Clojure means :foo-bar-baz is 3 words, of course) and progressively show the matches with each press.#2022-03-2920:00jmckitrick@U0390SFMN93 I can do it with about 5 keystrokes, but I can’t find an equivalent for ‘ivy-yank-word’#2022-03-2920:06agcheck vertico-map see if anything binds to yank#2022-03-2920:08agI thought you're talking about starting with i-search, then turning it into swiper (in your case consult-line), where it pre-populates the initial string with what you've already typed.#2022-03-2920:10agExamples of that kind of integration can be found in https://github.com/minad/consult#use-package-example scroll down to ";; Isearch integration" line#2022-03-2920:12aptCan you give an example where you would need this workflow? Since you mentioned embark, if the point is over :foo-bar-baz, you can use embark-act and n/p for moving thru matches#2022-03-2920:26jmckitrick@U0G75ARHC @U976F1AR2 Thanks for the suggestions… I’ll check them out and report back#2022-03-3009:50djmIs this what you’re after? https://github.com/minad/consult/issues/378#2022-03-3011:20jmckitrick@U015KH5ENEM That’s exactly what I was talking about. So there really is no analogue for the isearch/ivy feature. Thanks!#2022-03-3011:37djmNot exactly, but I would think that the code here https://github.com/minad/consult/issues/378#issuecomment-891551565 would work more often than not (if consult-line + M-n M-n isn’t sufficient, or if starting with isearch and then using consult-line won’t do).#2022-03-3010:31Carlois there a way to tap> the value that the cider debugger is highlighting?#2022-03-3101:17Carlowait, I just witnessed a behavior I wish I knew more about: I was working on a file in a project, than I followed some symbol definition in a dependency, I made some modifications there and I could immediately use the new function in my project. But then, I closed emacs. When I reopened it, and started a new repl, the dependency still had the patch. How is that possible? Where's the patched version stored?#2022-03-3101:20CarloI found them in ~/.gitlibs, but where's the reference to a particular checkout stored in my project then?#2022-03-3101:23CarloOk, I see that some kind of info has to be contained in the .cpcache folder in my project, but I'd still like to know better how it works. Are these caches per-project?#2022-03-3104:16jumarYou should be able to see the filename when you jump to a dependency's file. That will tell you what thing you are changing. I use mostly leiningen and there the modifications aren't easily "saveable" in the same way, I think (because such dependencies are typically JAR files)#2022-03-3107:21vemvThe mechanism is pretty easy to understand:
~/.gitlibs/libs/eftest/eftest $ ls
4fc03680c590aca6a13aa837c07b6eb54b7dbab9
there's one dir per git SHA. if two projects consume the same git dep at the same git sha, they use the same dir If they specify different SHAs, there will be two different checkouts residing in two independent directories
#2022-03-3107:22vemvit makes sense that modifications are persistent - these are vanilla checkouts that you can modify like any other one. Perhaps CIDER should enable read-only-mode to not make modifications so easy (after you would M-x read-only-mode to disable it again if you know what you're doing)#2022-03-3108:31jumarWith lein deps it's typically read-only but I guess that's because they are JAR files.#2022-03-3109:25CarloNo, I love the fact that they are so easily editable! 😍#2022-03-3114:01quollThis may be for @tomd, but others may know... Please note: I don't really know emacs at all. If you say, "Have you tried X" then my response will be, "I didn't know that X existed, and I have no idea how to even start trying to use it". With a basic setup of emacs+evil, does anyone know how I can get ^R to do "redo", please? My previous system worked correctly, but I've just installed emacs on 2 new systems and am encountering this problem. I note that the https://github.com/syl20bnr/spacemacs/issues/14036, so I'm wondering if it's a more general issue? I discovered the evil-undo-system setting, but installing undo-tree and setting it to that didn't work, and neither did installing undo-fu and trying that one. (I only kept one installed at a time).#2022-03-3114:13tomdevil's maps should set this up for you by default:
(define-key evil-normal-state-map "\C-r" 'evil-redo)
what happens if you do C-h k C-r in normal mode?
#2022-03-3114:14tomd(`C-h k` is describe-key which is handy for debugging this sort of thing)#2022-03-3114:24tomdalso if you do C-h v evil-undo-system <return> and let me know what that is - customizing this is the easiest way to make redo just work™ and probably the actual answer to your question#2022-03-3115:16quollI do have "C-h k" in my notes, and I use it a lot 🙂 When you say, "normal mode" do you mean when evil is not enabled? Or evil is enabled and you're not in insert mode? (if it's the latter, then it's bound to (evil-redo count)#2022-03-3115:17quollevil-undo-system is set to nil#2022-03-3115:19quollBTW, the system I fiddled with all weekend is another machine. This one right now is basically emacs+cider+evil, and not much else. There is very little manual config at all#2022-03-3115:23tomdsorry, technically I meant "normal state" (the latter)#2022-03-3115:25quollThat's OK. It's what I thought you meant, but I didn't want to mess you up#2022-03-3115:25tomdok so you just need to customize evil-undo-system and you should be fine:
(customize-set-variable 'evil-undo-system 'undo-tree)
in your init.el should do it
#2022-03-3115:26quollOh... I wasn't aware of the customize- prefix#2022-03-3115:27tomdyeah it's the "proper" way to set things that were defcustom'd#2022-03-3115:28quolloh... now it wants me to enabled 'global-undo-tree-mode' to use undo-tree commands?#2022-03-3115:29tomdah sorry I thought you had undo-tree up and running. you can choose undo-fu if you have that#2022-03-3115:29quolllike I said, new install#2022-03-3115:30tomdsorry you mentioned something about undo tree at the top and I didn't read properly#2022-03-3115:31tomdyou can choose undo-redo if you're on emacs 28 or later, and that's built in#2022-03-3115:32tomd(they're all much of a muchness afaic, but if you have specific undo/requirements, then you may want to look into the differences)#2022-03-3115:32quollSorry... On the weekend I was trying this with another machine. I installed undo-tree, and that didn't work. I then uninstalled it and installed undo-fu, and that didn't work. Today I'm on a work machine. I haven't installed either undo-tree nor undo-fu, mostly because I don't know how to use them, and I couldn't hook them up to evil#2022-03-3115:33tomdif you're not on emacs 28, I'd install undo-fu and set that as you evil-undo-system. it's very simple from my experience#2022-03-3115:42quollSorry... I was just trying to see if I could get brew to update to a more recent emacs, but it doesn't seem to know about anything after 27.2#2022-03-3115:43quollWhew. This worked. Thank you very much.#2022-03-3115:45quollI was stuck on trying: (setq evil-undo-system 'undo-fu) as this doesn't work#2022-03-3115:46quoll(or (set 'evil-undo-system 'undo-fu), which I believe is the same thing, but I tried both anyway 🙂 )#2022-03-3115:52tomdah glad it's up and running for you 🙂#2022-03-3115:52tomdcustomize-set-variable ftw#2022-03-3118:02ag@ericdallo is there a way to show nested levels of a map in lsp breadcrumbs header? i.e. when the cursor positioned in a map like {:foo {:bar {:zap 1}}} inside the innermost element, could I make it to display in breadcrumbs :foo :bar :zap?#2022-03-3118:03ericdalloI think it could be possible, but it'd need a some work on clojure-lsp side, not that easy though
#2022-03-3118:05agAlright, I was curious thinking maybe lsp does that already. lsp does so many cool things, I don't even know anymore what it can and can't do... lol#2022-03-3118:16ahungryThis is a little helper I wrote some time ago for Emacs+CIDER - at the time, I don't think there was an equivalent (not sure if there is now):
(defun my-cider-tinker ()
  "Evals current defn at point and attempts to call it with user args."
  (interactive)
  (lexical-let* ((my-form (read-string "args: "))
                 (eval-result (call-interactively #'cider-eval-defun-at-point))
                 (my-buffer (current-buffer))
                 (my-place (cider-defun-at-point 'bounds)))
    (cider-interactive-eval
     (format
      "(let [x (@*1 %s)]
(prn)
(prn \"my-cider-tinker result:\")
(prn x)
x)"
      my-form)
     (cider-interactive-eval-handler my-buffer my-place))))
When executed on a form (typically a function defn), it prompts the user for args, and then runs the form/fn with those args and prints the result
#2022-04-0119:42agfyi: lexical-let is obsolete since the introduction of true lexical binding in Emacs 24.1.#2022-04-0119:42aghttps://www.gnu.org/software/emacs/manual/html_node/elisp/Lexical-Binding.html#2022-04-0120:38borkdudeHi. I'm able to hang emacs in clojure-mode by typing: (def ^{:macro_}) with the underscore being my cursor. On debug I see this:
Debugger entered--entering a function:
* #f(compiled-function () #<bytecode 0x1fe4d41470e9>)()
  imenu--generic-function(((nil clojure-match-next-def 0)))
  imenu-default-create-index-function()
  imenu--make-index-alist(t)
  which-function()
  which-func-update-1(#<window 3 on foo.clj>)
  which-func-update()
  apply(which-func-update nil)
  timer-event-handler([t 0 0 500000 t which-func-update nil idle 0])
  recursive-edit()
  debug(lambda)
* thing-at-point--end-of-sexp()
  bounds-of-thing-at-point(sexp)
  clojure-match-next-def()
  imenu--generic-function(((nil clojure-match-next-def 0)))
  imenu-default-create-index-function()
  imenu--make-index-alist(t)
  which-function()
  which-func-update-1(#<window 3 on foo.clj>)
  which-func-update()
  apply(which-func-update nil)
  timer-event-handler([t 0 0 500000 t which-func-update nil idle 0])
#2022-04-0120:39borkdudeI was able to retrieve the debug with:
pkill -USR2 Emacs
#2022-04-0120:39ericdalloCan't repro on doom-emacs#2022-04-0120:41borkdudeclojure-mode version 5.13.0#2022-04-0120:42borkdudeThe above text is the only thing in the buffer#2022-04-0120:42borkdudeno other code#2022-04-0120:44ericdallodoes it freezes always? or is it flaky?#2022-04-0120:44borkdudealways freeze#2022-04-0120:45ericdalloSo, I repro if I write that code and then try to M-x eval-expression (clojure-match-next-def)#2022-04-0120:45ericdalloso it does seems something to be fixed either on clojure-mode or imenu that call that function#2022-04-0120:45ericdalloprobably clojure-mode itself#2022-04-0120:46vemvhttps://github.com/clojure-emacs/clojure-mode/blob/c339353f9e649b3af084f1bb6ce759e614a2f243/clojure-mode.el#L749 suspicious?#2022-04-0120:46ericdalloc/c @U45T93RA6#2022-04-0404:57JasonI have a project that clojure-lsp just does not work well on, it takes forever to start up and respond to requests. I use Cider and love it and would be happy enough with it alone but I'm trying out all of my options. Assuming I can't figure out how to make clojure-lsp more performant, will using ctags be meaningful on top of using Cider? I tried universal-ctags but the default clojure tag generation didn't work for me. Is it worth digging into?#2022-04-0405:25lassemaattaHave you tried consulting #lsp regarding the performance problems?#2022-04-0405:26pithylessIf you want to debug the performance problem, perhaps try to run the clojure-lsp and clj-kondo binaries directly on your source code (without emacs) and provide some debugging diagnostics for #clj-kondo and #lsp (depending where you think the problem lies). I've found clojure-lsp (with clj-kondo integration) to provide a lot of linter help while writing code to make it an essential dev tool at this point.#2022-04-0406:03JasonThanks! I did run clojure-lsp diagnostics and found it took about 15 minutes to run. I'll look into what kind of information #lsp finds useful and see if I can get it. I have been able to use clj-kondo via flycheck-clj-kondo to get linter help.#2022-04-0411:07ericdallo15minutes sounds a lot, please ask on #lsp We are improving performance a lot during releases and we even have one at master right now, so trying a #clojure-lsp-builds may help check if the issue is gone already#2022-04-0411:09practicalli-johnI didn't find ctags worth the effort for Clojure. There isn't much support for the language it seems and I didn't manage to create a reliable config. Clojure-LSP can take time if there are large data files to analyse (e.g. data analysis/science related projects), so the slowness of LSP may be project specific. Try clojure-lsp on a very simple (new) project and see if there is a performance issue with LSP in general or just a specific project. There is a lot of cross-over between CIDER, clj-refactor and Clojure-lsp. I disabled a lot of LSP and a bit of Cider and dropped clj-refactor a long time ago.#2022-04-0503:05JasonI'm sure it's project specific, I've had no issues on my personal projects but a particular giant monorepo causes issues. I'm about to try excluding sections of the repo and see if it gets better. I'll go to #lsp if I can identify specifics.#2022-04-0405:09dpsuttonI'm not sure that CIDER plays nice with ctags. It uses its Clojure's source information for var information. I highly recommend clojure-lsp in addition to CIDER. I think you can make CIDER use its own navigation (which is a bit better for dynamic vars) and use clojure-lsp as a fallback#2022-04-0616:23Drew VerleeWhat version of emacs do you suggest running? I see emacs 28.1 was just released. It seems like i'm on GNU emacs 29.0.5 but it has been acting really unstable recently (crashing, slow startups, etc..). Would it be better to use the more stable release on 28.1 with a fresh install? Ubuntu's software manager is showing me i can install version 1:26.3+1-1ubuntu2 which i'm assuming is version 26 so ill have to go elsewhere.#2022-04-0616:31ericdallo26 is too old, I use emacs 29 master and didn't notice any issues for a while#2022-04-0616:31ericdalloI update it every 2-3 weeks#2022-04-0616:31ericdalloyou should use 28.1 if don't want breaking changes all the time, it should be pretty fast enough#2022-04-0616:32ericdallobasically the main key features regarding performance is: • 27 introduced native json parsing, quite important for lsp users • 28 introduced native compilation which improves emacs speed overall#2022-04-0616:33Drew Verleehow do you update version 29? I should have kept notes on how i installed it.#2022-04-0616:34ericdalloI use NixOS so I use https://github.com/nix-community/emacs-overlay, you can use Nix too via MacOS#2022-04-0616:37agI second Eric's suggestion. I've been using Emacs 29 for a few months. My primary workstation is a Mac, installed it using brew formula {:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "2b4e464a4858065b475e586b1912"}, :content ("[email protected]")}. It is quite stable, except some minor things that were deprecated long ago, things like cl - they are getting slowly removed or modified, now without warnings. I think it's time, since many of them were obsolete since v24#2022-04-0616:39ericdalloProbably for mac users this is a more convenient install method ☝️#2022-04-0616:39Drew Verleeill try using the snaps from https://snapcraft.io/emacs.#2022-04-0618:36mpenet@U0DJ4T5U1 I use this on Ubuntu https://github.com/mpenet/emax/blob/master/install-emacs.sh#2022-04-0618:36mpenetYou just need to clone the emacs repo first#2022-04-0618:36mpenetIt should be easy to modify#2022-04-0618:37mpenetJust remove pgtk if you are not using Wayland#2022-04-0618:37Drew VerleeI'm take a look, thanks a lot!!#2022-04-0618:38mpenetI last used it a few weeks ago. I suppose it still works#2022-04-0708:02mpenetjust to confirm, it works with current master, I just recompiled: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2022-04-07#2022-04-0710:28practicalli-johnhttps://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa provides nightly builds of Emacs (which is given the version 29.0.50) Add the PPA and apt install emacs-snapshot Most nightly builds are pretty stable, so I tend to install it and not update (unless there are issues) Recommend removing the emacs and emacs-common packages and use the snapshot equivalents Snapshot package will point the emacs command to emacs-snapshot when installed#2022-04-0710:30practicalli-johnI'd only recommend the Emacs Snap package as a last resort, they take up a lot of space, install multiple copies and have several access constraints#2022-04-0900:02Drew VerleeIt's really weird that the default (snaps) isn't stable or ideal. is it just transition pains?#2022-04-0900:05Drew Verleethat seems to have worked flawlessly btw john, ty again. ... Edit: i obviously meant "flawlessly" not lawlessness. Wow.#2022-04-0900:39practicalli-johnI've used the Ubuntu Emacs PPA when ever the Ubuntu release didnt have a version of Emacs I wanted. There have been a surprising number of Emacs releases since the last Ubuntu LTS version was released and it seems the packaging in Debian hasnt kept up. The latest intermediate Ubuntu release includes Emacs 27.1, as does the next Ubuntu release in a few weeks. Emacs 28.1 wasnt released soon enough to be included in the new LTS and so I expect Emacs 28.x to appear as part of the 22.10 Ubuntu release. So for now, I'm using a nightly build via the emacs-snapshot package, which seems to work very well with Spacemacs.#2022-04-1210:01teodorluOn Linux, I’ve been running Emacs 28 from source for about half a year. To update simply, git pull , make and sudo make install. I was surprised by how simple that was, and I appreciated avoiding the indirection and packaging. Finding the right branch to track was quite simple too. Emacs source: https://savannah.gnu.org/projects/emacs/ Now that Emacs 28 is out, I guess getting prebuilt binaries should be easier.#2022-04-0618:01paulspencerwilliamsWhat binding do others typically use to copy sexps? I was surprised that smartparens has a sp-copy-sexp function but it has no binding.#2022-04-0618:05dpsuttonI just use M-w#2022-04-0618:05dpsuttonkill-ring-save#2022-04-0618:11paulspencerwilliamsOh, I've tried that several times but when I do it first time, I get 'The mark is not set now, so there is no region'.#2022-04-0618:12paulspencerwilliamsI did something just, although I forget what, which enabled me to use M-w fine,#2022-04-0618:35dpsuttonyou create a region. put your point somewhere, hit C-[space] and move to the end of your selection. the sexp navigations work great here#2022-04-0618:38paulspencerwilliamsOh right, you have to create the region. I was hoping you wouldn't need to do that like with sp-copy-sexp - I know it's only a few keystrokes...#2022-04-0618:40mpenetexpand-region is quite nice for this#2022-04-0618:41mpenetAnd it works for more than s-exps#2022-04-0618:41paulspencerwilliamsOh, that's a package isn't it?#2022-04-0618:41mpenetYes#2022-04-0618:42paulspencerwilliamsI've installed that before - I was surprised I'd need a separate package to do what I consider such a simple and basic thing, but perhaps it was the right thing to do!#2022-04-0618:42mpenetIt's one of my favorite packages, can't live without it now#2022-04-0618:44mpenetIf you just need to copy sexps it's overkill, but like I said it works with a lot of stuff (quoted values, comments, various semantic things depending on the mode)#2022-04-0618:47paulspencerwilliamsOh yeah, expand-region + M-w work well! Cheers all!#2022-04-2304:13Charles ComstockExpand region is good, but there is also the builtin mark-sexp bound to C-M-SPC or /cdn-cgi/l/email-protection#2022-04-2306:41paulspencerwilliamsOoh, that sounds faster! Cheers#2022-04-0621:22agDoes anyone have a small elisp helper that turns leiningen type deps to deps.edn type (and maybe vice-versa), i.e., [org.clojure/clojurescript "1.11.4"] -> org.clojure/clojurescript "1.11.4" {:mvn/version "1.11.4"} I can probably spend a few minutes to write one, but maybe someone has done that already. Would you be so kind to share? Thanks.#2022-04-0710:44practicalli-johnNot lisp, but there is a Clojure project that converts Lein deps to Clojure CLI deps. It may provide some ideas https://github.com/hagmonk/depify#2022-04-0711:25Benjaminyou are right I also wanted this for a while so here:
(defun lein-deps-to-deps (beg end)
  (interactive "r")
  (save-excursion
    (goto-char beg)
    (while (re-search-forward
	    "\\[\\(.+?\\)\\s-\"\\(.+?\\)\"\\]"
	    nil
	    t)
      (replace-match
       "\\1 {:mvn/version \\2}"))))
I forgot to use end
(defun lein-deps-to-deps (beg end)
  (interactive "r")
  (let ((end (save-excursion
	       (goto-char end)
	       (point-marker))))
    (save-excursion
      (goto-char beg)
      (while (re-search-forward
	      "\\[\\(.+?\\)\\s-\"\\(.+?\\)\"\\]"
	      end
	      t)
	(replace-match
	 "\\1 {:mvn/version \\2}")))))
#2022-04-0713:56paulspencerwilliamsHow can I disable all auto indenting within Org mode? I’ve tried disabling org-indent-mode and electric-indent-mode amongst other experiments but Emacs continues to attempt (and screw up) indenting in Org mode. For example, at lunch today, I created a yasnippet to allow me create a nicely formatted begin_src block, but Emacs has decided. that I want Indentation setup for shell type zsh. Nope, I just want the snipped, all snippets and all future text entry in org to be manually indented.#2022-04-0713:57paulspencerwilliamsNote, its out of the box attempts and indenting json within that source block is hilarious.,#2022-04-0907:24w08rWorth having the gql as a separate source block? Then maybe bring it into the shell block as a variable? I did raise this a while back and keep meaning to have a stab one day: https://github.com/davazp/graphql-mode/issues/39#2022-04-0914:25paulspencerwilliamsCheers, so the idea would be to reference an external source file, so indentation would occur there? That might work in some cases, but in my specific use case of learning elastic search in depth, inlining this stuff is actually more important than making it executable.#2022-04-1112:34hkjels
(setq org-adapt-indentation nil)          ;; Disable indentation of content below headlines
  (setq org-edit-src-content-indentation 0) ;; Disable indentation of source blocks
  (setq org-src-preserve-indentation nil)   ;; Disable indentation for exported source blocks
  (setq org-indent-indentation-per-level 0) ;; Keep everything flush-left
#2022-04-1112:36hkjelsI’ve disabled all indentation as well, as it doesn’t behave as expected at all times#2022-04-2017:12paulspencerwilliamsPerfect @U0B1SDL67, that works a treat. Thank you.#2022-04-0713:58dpsuttoni’ve found that when editing the source blocks in org to use C-c ' which is org-edit-special and it’ll open a buffer just for the source in the correct mode#2022-04-0714:01paulspencerwilliamsCheers, so that might help within the source block, but doesn’t help the end_src being indented about 8 characters?#2022-04-0714:05paulspencerwilliamsIn fact, I need any auto indenting to be done after application of the snippet. It does seem the special window works better when the code’s already sensibly edited than in the main org buffer, but it’s messed up before that point.#2022-04-1008:31Benjaminwhat I'd like to have is basically a scratch buffer with an attached jvm and cider. Does somebody have a flow for this?#2022-04-1010:44CarloLike, a permanent scratch buffer? I use:
(after! clojure-mode (setq cider-allow-jack-in-without-project t))
(after! clojure-mode (setq cljr-suppress-no-project-warning t))
to be able to jack in from any file without warnings, but that's about it. In your case, you could also:
(setq initial-major-mode 'clojure-mode)
to have your scratch buffer automatically be in clojure-mode, but from there you still need to jack-in manually.
#2022-04-1011:25jumarThere's cider-scratch or something like that #2022-04-1011:28Benjamintrue cider ships cider-scratch#2022-04-1013:51aptIf you don’t need a jvm, you could use a bb project#2022-04-1107:14plexusI have a permanent *sratch-clj* buffer backed by babashka, it's great#2022-04-1107:15plexusThere are a few different ingredients, Corgi has a convenient jack-in-babashka which creates a *babashka-repl* https://github.com/lambdaisland/corgi-packages/blob/main/corgi-clojure/corgi-clojure.el#L192-L211#2022-04-1107:16plexusIt then falls back to that babashka repl in any clojure buffer that doesn't have an explicitly connected REPL https://github.com/lambdaisland/corgi-packages/blob/main/corgi-clojure/corgi-clojure.el#L72-L88#2022-04-1107:17plexusthen it's just a matter of doing this in your init.el
(when (executable-find "bb")
  (corgi/cider-jack-in-babashka))
(with-current-buffer (get-buffer-create "*scratch-clj*")
  (clojure-mode))
#2022-04-1109:38jumarWhat is the advantage of using babashka-baked scratch buffer instead of built-in cider-scratch?#2022-04-1109:41plexusno need to start a JVM?#2022-04-1109:43plexusthe point of this *scratch-clj* is that it's always there, regardless of which cider repl connections do or don't exist. And babashka is fast to start in small in memory footprint making it very convenient for this.#2022-04-1109:49jumarI see - I guess I don't usually have such a need 🙂#2022-04-1016:28vemvmicro quality of life improvement I came up with recently, hope it helps someone else! Prevents quitting Emacs on non-empty scratch buffers. I never want to save a scratch buffer, however if there's stuff there, chances are it has info that I should move elsewhere before quitting
(defun kill-emacs-only-if-scratch-is-empty (f &rest args)
  (if (equal ""
             (with-current-buffer (get-buffer "*scratch*")
               (buffer-string)))
      (apply f args)
    (message "*scratch* is not empty!")))

(advice-add 'kill-emacs ':around 'kill-emacs-only-if-scratch-is-empty)
#2022-04-1107:13plexusWould love to get people's input on this: https://twitter.com/plexus/status/1513414616893857794#2022-04-1119:10BenjaminI usually add a space, like this: #_ bbb so that I can easily move around and add/delete the #_. (I use Symex, which makes this extra convenient). (aaa #_bbb |ccc) (aaa #_ |bbb ccc)#2022-04-1119:10Benjaminhttps://countvajhula.com/2021/09/25/the-animated-guide-to-symex/#2022-04-1316:04aptI think it should move to the next sexp (which is tautological, yeah). ccc is not a sexp so it’s not there. There’s no other sexp in the example so I dunno, I wouldn’t use the ‘next sexp’ operation on that.#2022-04-1317:30plexusccc is absolutely an s-exp, it's what traditional lisp calls an atom, which qualifies as s-expression#2022-04-1317:31plexushttps://en.wikipedia.org/wiki/S-expression#2022-04-1317:43aptOh okay. Didn’t know that atoms were sexps. Interesting. Thanks!#2022-04-1315:58DiegoI’ve been having a huge amount of emacs crashes lately, where the UI just freezes and CPU usage goes to 100% (in MacOS), does anyone know how can I debug what’s going on?#2022-04-1316:13dorabIs this happening in a bare emacs (with no additional packages loaded) as well? I'd try to isolate the package causing the problem by removing them one by one (or binary search).#2022-04-1316:20DiegoHaven’t tried on a bare emacs, but debuging like that sounds kind of painful. Is there any way to log what’s going on?#2022-04-1316:25genmeblogDo you use clojure-lsp?#2022-04-1316:25Diegoyes#2022-04-1316:26genmeblogAre you able to look at the processes? Also, please check lsp backend version.#2022-04-1316:27genmebloghttps://github.com/clojure-lsp/clojure-lsp/issues/884#2022-04-1316:27genmeblogIt was my case.#2022-04-1316:30Diegohmm, yeah that might be the problem. I’ll try without that package and see if it gets fixed.#2022-04-1316:31genmeblogMy case is fixed so it's important to have the latest version of the backend.#2022-04-1316:43DiegoI see. Do you know if I update the clojure-lsp package does it update the lsp backend as well?#2022-04-1317:14genmeblogNo, it should be done separately.#2022-04-1408:58plexusA trick that might or might not help you, if send emacs a SIGUSR2 signal it will interrupt whatever it's doing and enter the debugger. I've used this countless times to unjam an Emacs that's spinning at 100%, and the stacktrace can give you a hint of where the problem lies.#2022-04-1408:58plexushttp://mbork.pl/2016-05-15_debug-on-whatever#2022-04-1408:59plexuse.g. killall -USR2 emacs on linux#2022-04-1408:59plexussometimes it's so stuck that even this doesn't help, but it's worth trying#2022-04-1408:59plexusthis will also turn on debut-on-quit, so it will enter the debugger every time you press C-g afterwards. You can turn that back off with M-x toggle-debug-on-quit#2022-04-1417:08Diegothanks plexus will try that#2022-04-1415:31Drew VerleeIs there a emacs tool that lets you make comments on specific lines of files, such that those comments are attached to the file? They are saved elsewhere and just displayed, and you can toggle them on and off.#2022-04-1415:32Drew VerleeI'm thinking like how github comments work. Or google docs, etc... Put another way, these are comments I can see, but no one else. Of course, syncing this over multiple changes, with multiple players, would be impossible without reconciliation, but still, it would be kinda cool.#2022-04-1415:44Derekhttps://github.com/thanhvg/emacs-virtual-comment No experience using it#2022-04-1415:45Derek~I’m also unsure what ‘Built with Spacemacs’ means for people using regular emacs~#2022-04-1520:20ag@U0DJ4T5U1 I think you want https://github.com/alphapapa/magit-todos maybe?#2022-04-1713:31Drew VerleeThe virtual comment functionally might work as they aren't saved as part of the file. Thanks for the suggestions.#2022-04-1815:49soulflyerThere is this: https://github.com/bastibe/annotate.el#2022-04-1815:53soulflyerI found it useful for a while, but it didn't always cope well with changing files so I haven't used it much recently.#2022-04-1418:06DiegoDoes anyone have problems with repl errors being shown in react-native (run with shadow-cljs) projects in cider? E.g. If I try to compile (nth [] 10) it will return a :repl/exception! but nothing will appear in the repl buffer. I can see the message on the nrepl-messages buffer, but I guess it’s the intended way.#2022-04-1423:22zhuxun2Does clojure-lsp respect .cljfmt.edn? It does not in my tests but maybe I'm doing something wrong.#2022-04-1423:23ericdalloIt should. It searches for a .cljfmt.edn file#2022-04-1423:23ericdallohttps://clojure-lsp.io/settings/#all-settings#2022-04-1500:07zhuxun2@UKFSJSM38 You are right. Turns out there was a syntax error in my .cljfmt.edn#2022-04-1817:47wilkerluciohello folks, I wanna start learning emacs for Clojure development, where is a good place to starting reading about doing the setup?#2022-04-1818:00lilactownafter a cursory glance, https://practical.li/spacemacs/ seems to cover the essentials and be relatively up to date#2022-04-1818:02nivekuildepends where you're coming from but I say just start with vanilla emacs and read the CIDER docs, then see what you don't like and go from there#2022-04-1818:04wilkerlucioI like to have a modern setup (cider + lsp), I have years on Vim, currently on years on IntelliJ, but no experience with Emacs (even moving cursor still strange, rsrs)#2022-04-1818:04nivekuilif you like vim bindings then spacemacs is good#2022-04-1818:05lilactowni never was able to get traction with Emacs until I started again with spacemacs. YMMV#2022-04-1818:05lilactownit is very "batteries included"#2022-04-1818:05ericdalloI highly suggest using #doom-emacs , you can enable clojure module + lsp flag and most everything should work OOTB#2022-04-1818:06lilactownI've heard of doom. what's the sell over spacemacs for clojure dev?#2022-04-1818:14wilkerluciocurious on this one as well#2022-04-1818:17nivekuilI understand doom to be much less opinionated than spacemacs, like you can break out of it and evolve it to be more customized easily#2022-04-1818:18nivekuilbut I have never used either :) vanilla gang#2022-04-1818:19nivekuilthe benefits of vanilla are that the defaults are so bad it forces you to learn emacs lisp#2022-04-1818:20ericdalloIMO doom startup speed is insane.. it pre-compiles all packages used by your config and has a great tool to manage upgrades and package updates, also it has support for emacs native-compilation which is something that is really handful#2022-04-1818:20ericdalloI know spaceemacs supports modules, but it seems to me doom's modules are easier to configure/customize#2022-04-1818:21nivekuilnot sure why spacemacs wouldn't support native-comp, does it only support an old emacs version? native-comp is really nice#2022-04-1818:23nivekuilin general startup speed is irrelevant because people run emacs as a daemon and then use emacsclient which starts up instantly and doesn't lose state. very handy for programming over SSH from your phone for example.#2022-04-1818:24lilactowni always have emacs running, but i do have general performance issues sometimes when using e.g. autocomplete#2022-04-1818:25ericdalloyeah, I'm one of the people that use that, but at least at Nubank, this is not common as it seems it doesn't work for MacOs (I'm not a mac user)#2022-04-1818:25lilactownhaven't tried the latest emacs yet. hoping native compilation will help#2022-04-1818:25ericdallonative-comp and emacs 27+ helps with that for sure @U4YGF4NGM#2022-04-1820:25César Olea@UKFSJSM38 I have emacs running as a daemon with native-comp in macOS. I can hit cmd + e and a new emacs frame pops up instantly, ready to go. Let me know if you would like any assistance. That being said, it's way easier to achieve the same in Linux.#2022-04-1820:27ericdalloOh, I'd love to understand what are the steps necessary to make that work, know lots of co-workers that would love to have that working#2022-04-1820:28ericdalloI know there are multiple ways to install emacs on mac, I bet that affects if daemon will work#2022-04-1820:34wilkerlucio@UKFSJSM38 when I installed with brew install emacs it setup the daemon by default here (the output of install talked about it, and how to restart it and etc...)#2022-04-1820:36ericdallobut does that install what emacs version and with native-comp support?#2022-04-1820:36wilkerlucioit did install 28, not sure about the native-comp thing#2022-04-1820:38wilkerluciois there a way to check if its native-comp or not?#2022-04-1820:38ericdallohum, interesting, at Nubank mac users install via:
brew install 
#2022-04-1820:38wilkerlucioI'm currently running this one to see the result#2022-04-1820:38wilkerluciojust finished, seems like the daemon is an option here too:
 was installed to:
  /usr/local/opt/
#2022-04-1820:39wilkerluciowith the brew services#2022-04-1820:39ericdalloyes, I think this tells if it's native compiled: M-x
(and (fboundp 'native-comp-available-p)
            (native-comp-available-p))
#2022-04-1820:40César OleaHow you do it depends on two things: 1. Whether or not you want native compilation (also known as gcc emacs) 2. Whether your are on an intel mac or not If you are only interested in running emacs as a daemon but don't need/want gcc emacs, it's just a matter of downloading emacs, say from https://emacsformacosx.com/ and then use macOS launch agent to launch emacs server at startup, here's a nice guide for it: https://briansunter.com/blog/emacs-daemon-macos/ Once you get it running, test that it's working by going to the terminal and executing /Applications/Emacs.app/Contents/MacOS/bin/emacsclient -c it should open up an emacs frame. With the emacs server started in the background you can then setup something like skhd to use a global keybinding, so that you can invoke a new emacs frame from anywhere.#2022-04-1820:41César OleaI'm on a m1 mac, so to get gcc emacs working I used https://github.com/jimeh/build-emacs-for-macos/ and used one of the "known good commits" listed here https://github.com/jimeh/build-emacs-for-macos/issues/6#2022-04-1820:42César OleaMy version of emacs is reported as 29.0.50.#2022-04-1820:48ericdallotks @U02DNF3TW3E, will tell to a coworker to give a try following that and let you know if any issues!#2022-04-1820:49wilkerlucio@UKFSJSM38 seems like running brew services start d12frosted/emacs-plus/ after installing with brew install also works#2022-04-1820:49ericdalloawesome! good to know!#2022-04-1820:52César OleaI tried using the emacs-plus version in brew to get gcc emacs working in a m1 mac but it wouldn't work. Everything compiles but when loading up emacs it would complain about not being able to use libgccjit. YMMV though.#2022-04-1820:54wilkerluciocan you guys tell me the difference between the emacs and emacs-plus packages?#2022-04-1820:55ericdalloI have no idea 😂#2022-04-1820:55lilactownthere are various ways of packaging emacs and several forks to run on different platforms, using different GUI frameworks#2022-04-1820:56lilactownthe one i use on macOS is https://github.com/railwaycat/homebrew-emacsmacport#2022-04-1820:57César OleaNo idea honestly. For the longest time I used to run whatever https://emacsformacosx.com/ had and it was fine. Then I switched to linux and used whatever was in the repo of the distribution that I was using, until finally settled in building my own.#2022-04-1821:04lilactowni think main emacs has come a ways in supporting native macOS GUI (cocoa) since i started using it#2022-04-1822:25lreadIf you do go for doom (I’m was on spacemacs now on doom), there’s #doom-emacs And @UKFSJSM38’s https://github.com/ericdallo/dotfiles/tree/master/.doom.d.#2022-04-1902:04wilkerluciogoing with doom-emacs for now 🙂#2022-04-1912:25wilkerluciofor anyone taking this tour, I found this awesome playlist on learning for Emacs Doom: https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj#2022-04-1915:58lreadOh nice @wilkerlucio! I’m relatively new to the cult, so very helpful!#2022-04-1818:59jmayaalv@wilkerlucio the way i did it was https://www.masteringemacs.org/ to understand the basic stuff#2022-04-1819:00jmayaalvThen prelude https://prelude.emacsredux.com/ as it gives a more barbone config than doom#2022-04-1819:02jmayaalvIf you want to understand the emacs config, prelude is just simple, doom its way too complex (at least for me) or check https://github.com/lambdaisland/corgi which seems analogous to prelude#2022-04-1820:15wilkerluciothanks @jmayaalv, I'll start with Doom because I wanna fiddle the least with configurations at this point, just wanna get something that works, and after adjusting I may start learning more about how things work#2022-04-1912:25wilkerluciofor anyone taking this tour, I found this awesome playlist on learning for Emacs Doom: https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj#2022-04-1902:31wilkerluciois there a way to bind commands to the alt key on macos (not the meta key, but in my attempts it looks like emacs threats alt and meta as the same key, is there a way for them to behave as different keys for binding?)#2022-04-1910:12jkxyzI think that by default Option is not setup as the Meta key. I always had to configure that manually. There are a few options to set this up as you want it: https://www.emacswiki.org/emacs/MetaKeyProblems#h5o-15#2022-04-1910:15jkxyzAnd then you should be able to add bindings with the Alt modifier like A-x#2022-04-2012:29magraI use emacs with exwm as window manager. In all my adventures with emacs meta is just a synonym for alt. ymmv#2022-04-1911:06tvaughanI’m trying out https://github.com/raxod502/radian and so far so good. It’s a good balance between vanilla emacs and an “emacs distribution” #2022-04-1911:09mpenetradian is very opinionated#2022-04-1911:10mpenetdon't get me wrong, I like most of it, but some packages depart a bit from more popular/arguably-better alternatives#2022-04-1911:14mpenetimho ultimately you would want to build something you have full control over: use-package + straight.el + whatever packages you like. That gets you very far without involving too many complicated bits. That can be a single init.el file.#2022-04-1911:45tvaughanThis is exactly what I have with radian. The author of radian is also the author of straight.el. From the radian readme > If you are a fan of my Emacs packages (such as straight.el, el-patch, Selectrum, CTRLF, prescient.el, Apheleia, Blackout) then you will find all of them configured here. Sure, you'll be much happier with radian if you're already using these packages, but if you're new to emacs I'm unsure how much this matters. With spacemacs and doom you're much more locked into their way of doing things than with radian IMHO#2022-04-1911:47mpenetyes I know, I have mixed feelings about selectrum/ctrlf & co tho#2022-04-1911:47mpenetbut that's what's great when you build your own, you can pick & choose 🙂#2022-04-1913:00rakyiI keep using prescient because I really like how it sorts by frequency and recency by default. Do you guys know if there is a way to replicate that behavior with the vertico stack?#2022-04-1913:03mpenetvertico can work with the default savehist#2022-04-1913:06mpenetit's nearly the same (minus frequency), but I can't tell the difference after having used both#2022-04-1913:12mpenetmy problem with selectrum is that it somewhat reinvents a completion ui instead of re-using most built-ins'. So you end up having to teach other modes about it one way or the other instead of just relying on the fact these modes most often are just completing-read* compliant. That makes for some hairy configs in some cases. Vertico is less intrusive imho.#2022-04-1913:13mpenetbut again, that's great we have so many choices. I know many happy ivy / helm users too 🙂#2022-04-1913:39rakyiDefinitely! I tried using vertico, but I really missed sorting by frequency. In fact IIRC selectrum was created partly because prescient sorting wasn’t possible or was too hard to build with the built-ins for completion or something like that.#2022-04-1913:47mpenetit should be possible in theory, ordering is separate from completion ui, see for instance orderless#2022-04-1914:07tvaughan> my problem with selectrum is that it somewhat reinvents a completion ui instead of re-using most built-ins'. Perhaps I've misunderstood, but this is what consult is for. From https://github.com/raxod502/selectrum#complementary-extensions > Useful commands based on completing-read are provided by consult. Consult is designed as the counsel equivalent for Selectrum and Icomplete or more generally any completion system based on completing-read. https://github.com/minad/consult#2022-04-1915:35Benjamin@U0P7ZBZCK selectrum / vertico provide ui. Consult provides selections and can work with either#2022-04-1911:25vemvvery good point about full control. I'd use straight.el if I were to rebuild my setup, but git submodules haven't failed me over 10y. it gives me a special kind of happiness to not have my software randomly broken 😇#2022-04-1911:36mpenetstraight brings a bit more than submodules, the fact it can use melpa (& others) metadata is really great#2022-04-1911:36mpenetalso pinning (just like submodules kinda/sorta)#2022-04-1911:37mpenet(I used to use submodules)#2022-04-1911:37mpenetit's super easy to update/revert/pin#2022-04-1911:38BenjaminHi, does somebody have a lispy (optionally + lispyville) + evil configuration and likes to share? I'm interested in lispy setups with evil. Specifically I'm on the hunt for a superb multicursor setup that works with lispy.#2022-04-2014:30zhuxun2@ericdallo I'm trying to make my first pull request to clojure-lsp. What is your development setup? Do you use make debug-cli after ever time you made a change to the code? Is there an equivalent of hot-reload where you don't lose state when making updates to the build?#2022-04-2014:38ericdalloyes! this should help a lot: https://clojure-lsp.io/development/#2022-04-2014:38ericdalloyou can jack-in to the clojure-lsp repl :)#2022-04-2014:49ericdalloLMK if need any help#2022-04-2014:51zhuxun2The tutorial is awesome! One complaint: lsp-clojure-server-info does not open an actual split window and it crops many lines:#2022-04-2014:52zhuxun2I haven't found a way to redirect the output to an actual window. This info disappears after any keystroke#2022-04-2014:56ericdalloyou can access via *messages* buffer, but yeah, we could improve lsp-mode to move that to a window#2022-04-2014:57zhuxun2Oh I got it now. Didn't realize this is a message. Thought it's a temporary window with a weird behavior...#2022-04-2014:59zhuxun2Never mind then. It's perfectly fine this way.#2022-04-2015:00ericdalloyeah, we could do something similar I did for lsp-clojure-server-log#2022-04-2015:01zhuxun2I guess so. People usually don't expect messages with pages of text.#2022-04-2015:03ericdalloyep, that was to be temporary 😅#2022-04-2014:47plexusIf I may also pitch Corgi here as an alternative to spacemacs, it has much of the feel of spacemacs but at a fraction of the size and complexity. It's the result of years of frustration running into issues with spacemacs and having a hard time debugging them because there is just so much going on. https://github.com/lambdaisland/corgi#2022-04-2019:19ag@U07FP7QJ0 if I remember it, you briefly used Doom after Spacemacs, is that right?#2022-04-2022:18richiardiandreaI went for Emacs Live long time ago and now I am kind of rolling my own ...Emacs Live + borg framework - one day I'll have to simplify stuff and from what I am reading I like corgi's idea thanks for sharing#2022-04-2105:31plexus@U0G75ARHC no, never used Doom myself, I just answer Doom support requests for Chemacs2 😛#2022-04-2108:16practicalli-johnThanks @U07FP7QJ0 Corgi looks like an excellent approach. I'm still very happy with Spacemacs, but I am interested in trying Corgi as an alternative. I found Doom too different in terms of user interaction, making it hard to switch#2022-04-2118:34ag> no, never used Doom myself Oh, I see. For some reason, I thought you left Spacemacs, then tried Doom for some time, and then decided to build Corgi. I'm pretty sure if you explained the reasons why you moved from Spacemacs - I'd find (at least) a few relatable points. But I was curious to hear your thoughts on Doom and how Corgi's philosophy and structure differ. So far, skimming through the documentation of Corgi, which I have to say - is very enjoyable to read; I specifically like the notion such as 'the framework shouldn't constantly be tossing a monkey wrench...', https://github.com/corgi-emacs/corgi/blob/main/corgi_manual.org#packages-all-the-way-down > it’s a standard Emacs config, and it’s your config That was my main problem with Spacemacs - things often get intertwined, and even though I used Spacemacs-base and built my config mostly using my own custom layers, things would break unexpectedly due to upstream changes or additions that I never wanted. It took me a couple of days to move to Doom. I simply started a list of features and keybindings that are important to me, and one by one either cherry-picked them from Spacemacs or found similar features in Doom modules or third-party packages. Lots of things I like about Doom; I love its built-in macros: map!, add-hook!, after!, et al. https://github.com/hlissner/doom-emacs/blob/master/core/core-lib.el#L1 I don't know if you're familiar with them, and not sure if Corgi has anything similar. Check them out. Also, I think it would be great if all Evil-based framework authors came together and worked out a single standardized convention for top-level and mode-based keybindings. It's such a mess right now - everyone does it differently - Spacemacs, Doom, Evil-collection. And that's just in Emacs-land, I'm sure, there are Neovim starter kits with "Spacemacs like" bindings, and they have it differently. We need an Evil taxonomist, some kind of Carl Vimmaeus to clean up this mess.#2022-04-2306:03didibusCorgi's probably not for me then, I'm one of those Emacs devs that don't like modal editing 😛#2022-04-2306:04didibusI still use Emacs though, but in Holy mode, that's what I like about spacemacs mostly. Though I should give Doom a try, it seems not using it for VIM like editing might be a bit ackward#2022-04-2306:05didibusThat might also be why Spacemacs doesn't cause me any problems. I remember when using it in Evil mode, that whole vimification thing was hit and miss I felt.#2022-04-2014:49lukaszI'll always advocate for rolling your own config (especially that use-package simplifies a lot of the pain) and ditching your vi habits 😉#2022-04-2014:56plexusAgree on the first part, which is really what we're trying to encourage again > Corgi is an unbundled Emacs config. Instead of providing a full config we provide a set of packages (see corgi-packages) for use with Straight.el package manager. The Emacs config itself (the contents of ~/.emacs.d) are yours. We provide a sample-config. Hard disagree on the latter, see https://github.com/lambdaisland/corgi/blob/main/corgi_manual.org#vim-style-modal-editing#2022-04-2015:21lukaszAt this point I've been using both Emacs and Vim roughly the same amount of time and maybe because of that I'm not so religious about which way of editing is faster. Also probably because I spend more time reading and analyzing the code rather than writing it :man-shrugging:#2022-04-2015:24plexusDid you read the link? It's not about what is faster, it's about the risk of RSI. More concise is a nice bonus. I used Emacs for 12 years before switching to vim style, it was not the easiest transition, but I value my health too much to continue to flirt with RSI.#2022-04-2015:24plexusThat's about ~5 years ago#2022-04-2015:28lukaszI can relate: I broke my wrist when I was 11 and suffer from it too - what made more difference for me was fixing my posture of all things, not so much the editor I use. There's so many factors to this I guess#2022-04-2015:48plexusThat's really true.#2022-04-2016:33adiI don't have RSI, but I've felt strains and transient pains from time to time after hyperfocus computering. For me three things help a lot, to keep things "normal". 1. Avoid typing in the first place (seriously, avoiding the "Repetitive" bit is useful). Lots of typing stuff for me is thinking / revision stuff. So I do that in my head or on paper / whiteboard. 2. Put Ctrl and Meta under my thumbs https://en.wikipedia.org/wiki/Space-cadet_keyboard, so no Emacs Pinky. 3. Use chording for moving around / yank / kill etc. I also use Vim, but separately. But I get how EVIL will give similar results. All of this presumes adequate keyboard, mouse, display, work-desk ergonomics. But all said and done, "methods to not need to type" category of stuff is the main thing for me. Additionally, "using one's body and strenghtening it" category of stuff is also fundamental to my, ah, process. IMHO strain injuries are rooted in mechanical imbalance as much as they are rooted in overuse.#2022-04-2022:00nivekuilWRT ergonomics and vim: I actually started using emacs instead of vi because I type in dvorak. The real win for emacs here is that you can change its ergonomics to your liking, which is what the most important aspect of ergonomics anyway -- personalization#2022-04-2110:49practicalli-johnI never really understood the value of Vim style editing until I learned how to speak the language of vim, ironically due to using Emacs/Spacemacs. After 20 years of IDE's and editors, switching to Vim-style editing made a massive productivity boost for me. It did take a couple of weeks to get comfortable, but I could feel the benefits as I switched The Vim-style key bindings feel so much simpler, therefore easier to retain, easier to touch type, than the chorded approach that Emacs uses by default. I used to use a very limited set of Cider commands when using the Emacs key bindings, as I found them very hard to remember If someone does not touch type, I assume the vim or Emacs approach makes a lot less difference. But for myself as someone who has touch typed since school, I greatly benefit from Vim-style editing and note a big difference when it's not available.#2022-04-2114:22lukaszI find this really interesting - I always though of vi style modal editing as definitely superior to how editing works in emacs (and I'm a touch typist too, I learned on what looked like soviet era typewriters back in the 90's), but now I'm as proficient in the "emacs way" as I was when using vim. Maybe as not precise (I do miss things like d4w sometimes). I suspect it's just down to me hyper-optimizing my own setup both in terms of hardware (mechanical keyboard with stiff keys to exercise my muscles) and software (I hand rolled my own config and have use a lot of sequential shortcuts like C-x p g etc). I wish this was studied in more rigorous way#2022-04-2114:41plexusThat would be super interesting, but might be near impossible to control for all the variables.#2022-04-2114:48lukaszYeah, indeed. I've seen some articles some years ago but they were mostly focused on "raw" WPM which in programming is not always as relevant#2022-04-2121:04nivekuilchording has always felt pretty good to me, but I used a keyboard with light actuation force (e.g. cherry mx reds) and karate chop the CTRL. nowadays I use a keyboardio model 01 and having modifiers on thumb keys is amazing#2022-04-2121:05nivekuilvim style editing is definitely better for navigating a single file, but do you find it better for navigating projects too?#2022-04-2121:27practicalli-johnYes, I use vim-style key sequences for 99% of everything I do in Spacemacs. I navigate a project using projectile and navigate between projects using layouts (perspective), Both have a sequence of keys rather than chorded key bindings in Spacemacs. There are the odd chorded key bindings, like C-c C-e to edit the results of a project search with helm-ag, but its a tiny amount#2022-04-2118:34ag> no, never used Doom myself Oh, I see. For some reason, I thought you left Spacemacs, then tried Doom for some time, and then decided to build Corgi. I'm pretty sure if you explained the reasons why you moved from Spacemacs - I'd find (at least) a few relatable points. But I was curious to hear your thoughts on Doom and how Corgi's philosophy and structure differ. So far, skimming through the documentation of Corgi, which I have to say - is very enjoyable to read; I specifically like the notion such as 'the framework shouldn't constantly be tossing a monkey wrench...', https://github.com/corgi-emacs/corgi/blob/main/corgi_manual.org#packages-all-the-way-down > it’s a standard Emacs config, and it’s your config That was my main problem with Spacemacs - things often get intertwined, and even though I used Spacemacs-base and built my config mostly using my own custom layers, things would break unexpectedly due to upstream changes or additions that I never wanted. It took me a couple of days to move to Doom. I simply started a list of features and keybindings that are important to me, and one by one either cherry-picked them from Spacemacs or found similar features in Doom modules or third-party packages. Lots of things I like about Doom; I love its built-in macros: map!, add-hook!, after!, et al. https://github.com/hlissner/doom-emacs/blob/master/core/core-lib.el#L1 I don't know if you're familiar with them, and not sure if Corgi has anything similar. Check them out. Also, I think it would be great if all Evil-based framework authors came together and worked out a single standardized convention for top-level and mode-based keybindings. It's such a mess right now - everyone does it differently - Spacemacs, Doom, Evil-collection. And that's just in Emacs-land, I'm sure, there are Neovim starter kits with "Spacemacs like" bindings, and they have it differently. We need an Evil taxonomist, some kind of Carl Vimmaeus to clean up this mess.#2022-04-2102:20Drew VerleeIs the js to cljs translation feature i just saw in calva available via emacs? If so, how? If not, 😢.#2022-04-2106:20vemv@U0ETXRFEW: what is it based on?#2022-04-2106:23pezI've ripped src/js_cljs/core.cljs out of @U3Y18N0UC’s js2cljs: https://gitlab.com/mauricioszabo/js2cljs Will pick it from Clojars once it's available there.#2022-04-2106:24pezThere's an online UI for it: https://mauricioszabo.gitlab.io/js2cljs/#2022-04-2106:26vemvThanks! :hugging_face: (I have no idea how to build an emacs helper out of cljs files)#2022-04-2106:28pez@U45T93RA6 in the #calva thread about this I posted about an experiment where I used some clj-suitable to enumerate the js/ entries. No idea if that is the right way to go for js2cljs, but anyway, FYI. https://clojurians.slack.com/archives/CBE668G4R/p1650465566657349#2022-04-2106:29pezMaybe we need an cljs2elisp converter too? 😃#2022-04-2106:30pezNah, but maybe we can set up a server running this, and non-js editors can query that one? Or something...#2022-04-2106:40vemvWhile I'd wager that this feature would be a bit convoluted to ship in CIDER, emacs does have a generic "take this region and run it through a command" functionality (namely shell-command-on-region) Assuming one has https://gitlab.com/mauricioszabo/js2cljs checked out in his computer, the shell command could invoke said program.#2022-04-2106:50pezYeah, it is unclear how well it fits in Calva, even. But since it has cljs glue set up, I choose to do it that way.#2022-04-2108:43plexusCorkey, Corgi's key binding system, now has a dedicated repo and a full README https://github.com/corgi-emacs/corkey#2022-04-2108:44plexusNote that things are a little in flux now that we're reorganizing packages and moving to a dedicated github-org, I'll try to make sure at least the sample config works out of the box again in the coming days.#2022-04-2112:27CarloI love the idea of signals!#2022-04-2118:45Cora (she/her)the stability of doom is great#2022-04-2118:45Cora (she/her)too#2022-04-2118:46Cora (she/her)it does patch things, though, sometimes#2022-04-2118:46Cora (she/her)advice appears 69 times in the codebase https://github.com/hlissner/doom-emacs/search?q=advice (not all of them are actually adding advice)#2022-04-2118:48Cora (she/her)you can see all it does for clojure here https://github.com/hlissner/doom-emacs/tree/master/modules/lang/clojure#2022-04-2119:03ag> the stability of doom is great ehmm, using 'stability' and anything Emacs-related in the same sentence not always justifiable, but in this case, I rather agree; overall, Doom feels a lot safer than Spacemacs. At least, when something breaks, I no longer have to scratch my head - it's relatively easy to figure out. With Spacemacs, it was almost always a puzzle.#2022-04-2306:00didibusHum... I wonder why that is, spacemacs is just a bunch of packages, same as doom no. Does doom have like a testing of packages together before cutting a new "doom" release#2022-04-2311:14practicalli-johnI've used Spacemacs for many years and found it very stable, rarely had issues and most were fixed with a new package update or updating a config if a package API changed The only potential difference in stability between Spacesmacs and Doom Emacs I am aware of is the way they manage package updates. This makes sense as both configurations have the goal of making packages work well together. Spacemacs used Melpa as the package repository, so in effect you could get daily builds of any packages (not recommended), a few hours after changes are checked into their respective code repositories. You control when you update packages, so there is no need to update packages if they already do all you need. Doom Emacs chooses to pin packages to specific versions, so I assume those packages change very infrequently. So to get new features you need to unpin the package and specify a newer version (or I assume raise an issue to ask Doom to pin a newer version of the package). An Emacs package or occasionally an Emacs build is far more likely a source of an issue than either Spacemacs, Doom or Prelude.#2022-04-2312:03mpenetDepending solely on melpa/melpa-stable opens the door of repeatability issues. Without pinning you are way more likely to hit bugs. Doom is way better in that respect but you can also just use straight.el directly (doom uses it) and get the same benefit#2022-04-2312:05mpenet(I personally don't use Doom, just use-package+straight.el)#2022-04-2315:46didibusOh, not a fan of pinning, I'm a compulsive updater of my packages, can't resist a new feature or a big fix haha#2022-04-2315:47didibusUnless there's an easy, update all pinned deps to latest command?#2022-04-2316:42mpenetThere is yes#2022-04-2316:43mpenetYou call pull all packages to the latest version, try it and if you like it repin to that, or revert with another command#2022-04-2316:43mpenetstraight-pull-all and straight-freeze-versions iirc#2022-04-2316:44mpenetCan't remember the revert function on the top of my head#2022-04-2316:48lukaszstraight.el uses git under wraps, right? you can "just' revert the history of a given package - I think it tracks that too (I have straight.el configured but don't use any features like that )#2022-04-2317:06mpenetYes, it uses melpa metadata but fetches what it can via git#2022-04-2317:07mpenetThe pin/lock file of straight basically contains git shas#2022-04-2402:58didibusAnyone tried: https://github.com/emacs-eaf/emacs-application-framework ? Seems it be cool to have Portal as a buffer inside Emacs#2022-04-2407:33sleepyfoxPinning is the only thing saving you from a supply chain attack. It may be a little more work, but then so is taking backups.#2022-04-2414:38aptI find pinning to be overkill for a personal config (w/o distros such as Doom etc). I just install the latest version of all packages and it works fine. No use-package either, just plain old with-eval-after-load and require. My startup is fast. If I ever have to revert some package (I haven’t needed it so far), I can manually install a previous version. straight.el is cool but it adds more complexity and a bigger surface area for bugs https://github.com/Andre0991/dotfiles/blob/master/emacs.el#L1#2022-04-2511:43plexusMelpa is IMO fundamentally broken. It doesn't keep all versions of packages so pinning isn't really an option. The end result is that when two users install the same non trivial config the chance that they are running the same identical code is near zero. It's a nightmare for maintainers, with many bugs being not reproducible. Melpa-stable is supposed to be a solution for this, but few maintainers actually test their package with -stable dependencies, so the end result is that using melpa-stable is less stable than just running the latest of everything. I used to auto update my packages, most frustrating year of my life. Complete Russian roulette. With corgi we bundle a straight versions file which we auto install on first run. Every user runs the exact same code. Finally some degree of sanity.#2022-04-2512:13mpenetyes not using straight.el nowadays is asking for trouble#2022-04-2512:17aptIt depends on the complexity of your setup – the number of packages you have, the packages themselves, etc. I never had any trouble by not using straight.el.#2022-04-2512:19mpenetit's more work not to use imho 🙂 - my setup is quite simple. If you don't upgrade often, do not have to have the same config on multiple machines maybe you can somewhat justify not doing the effort, but even then I think it's worth upgrading, it's very a small amount of work for a lot of security/flexibility#2022-04-2512:23aptGood point, it makes it easier to have a multiple machines setup. It’s not my case, but I can see how it can be useful for that, for example.#2022-04-2705:58didibusI've got a multiple machine setup but have never had issues going with latest. In fact, I've had more issues by not always being on latest. Like others have said, most package maintainer test their own package alongside the latest of everything else. I think the risk in saying: Everyone is on the exact same set of deps Is that not everyone is running that on the same computer/os/emacs combination. This is what has gave me the most trouble, different OS, different Emacs build, they can introduce edge cases. And often those edge cases are first fixed in the latest versions.#2022-04-2707:38plexusThe benefit with having a pinned set of versions as we do with Corgi is that if that happens we can help troubleshoot it, because we know what version people are running, and once it's fixed we can upgrade everyone, so everyone gets a more stable experience.#2022-04-2716:25didibusHum. Interesting. But in my experience my issues are not reproducible on other environments. That's what I meant. Like my windows machine will be the only one broken I need to fix for example. Or only my Linux box running an old RHEL5 will have to be.#2022-04-2723:15BenjaminAnyone aware of a command to define a missing definition or function from the call-site signature? In other words, if I am writing something like this: (with "|" as the cursor position)
(ns com.example.todo
  (:require [com.example.new-idea :as new-idea]))

(defn whatever []
  (new-idea/generate :arg 23 "bar")|) 
I'd like to be able to call a command that produces this either finding or creating the appropriate namespace/file:
(ns com.example.new-idea)
,,,
,,,
(defn generate [arg arg2 arg3]
  ())
,,,
Or getting a bit more fancy:
(ns com.example.todo
  (:require [com.example.new-idea :as new-idea]))

(defn whatever []
  (new-idea/generate :arg {:seed 23
                           :prefix "bar"})|) 
and get:
(ns com.example.new-idea)
,,,
,,,
(defn generate [arg {:keys [seed prefix]}]
  ())
,,,
#2022-04-2800:06ericdalloThere is a similar function on clojure-lsp, a code action that creates both ns + function or function if ns exists#2022-04-2800:07ericdalloCheck for create-function https://clojure-lsp.io/features/#clojure-lsp-extra-commands#2022-04-2800:14BenjaminAh splendid. Thank you!#2022-04-2807:45plexusA long shot but maybe someone here has an idea. This seems to be a particular problem with babashka nREPL+cider+evil-mode. When evaluating a form and it throws an error it'll pop up the *cider-error* buffer as usual, but somehow it's not properly initialized. There's no syntax highlighting, no line numbers (I have global display-line-numbers-mode on), and not all key bindings are present. The most annoying one is that pressing q will do evil's macro record, instead of quit-window. However doing pretty much anything (moving the cursor, switching to another buffer, doing M-x, ...) will trigger the initialization. Suddenly syntax highlighting kicks in, line numbers are there, key bindings are installed... and this makes it really hard to debug, no matter what I try to inspect the state of the buffer undoes the problem I'm trying to diagnose... does this ring a bell to anyone?#2022-04-2812:28ericdallomaybe you can try toggle-debug-on-quit , and try to press C-g right before syntax highlight and other things kick in, it should print a stacktrace where emacs stopped when you pressed C-g#2022-05-0522:56jvtriguerosIf you find anything else on this, please post. I’m experiencing something similar with cider-inspect and babashka#2022-04-2903:37zhuxun2Does clojure-lsp support automatically adding require/import into ns?
#2022-04-2904:59didibusI'm not sure, but clj-refactor can do that: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-missing-libspec#2022-04-2912:08ericdalloYes, it does#2022-04-2912:08ericdallohttps://clojure-lsp.io/features/#clojure-lsp-extra-commands#2022-05-0104:05Drew VerleeMy emacs mini buffer function hints are broken. It seems like a couple thinks are competing to use it and what ends up winning in just the displaying the symbol name my cursor is on. Any ideas how i can debug this? Like if i hover over clojure.core/spit i get "spit" in the minibuffer.#2022-05-0106:24pavlosmelissinosdescribe-mode tells you which minor modes are active in the current buffer. If you disable them all and re-enable them one by one you'll find out which one is causing it. I've had a similar issue with highlight-symbol-mode (but I'd get the number of occurrences instead of the symbol name). I solved it by overriding a function.#2022-05-1814:35genmeblogI have the same problem. Sometimes... I suspected lsp but now I suspect iedit. Will be investigating soon.#2022-05-2420:54genmeblog@U0DJ4T5U1 have you figured out what was the reason? I failed 😕 It's so undeterministic in my case.#2022-05-2421:00Drew VerleeI didn't.#2022-05-2421:00Drew VerleeI'll check if it's still an issue...#2022-05-2615:02genmeblogok, looks like it's lsp-mode, @UKFSJSM38 seems that eldoc and highlighting (multiple) interfere together, still not 100% sure about that. I'll try to record some examples soon.#2022-05-2615:03ericdalloI know of a conflict of lsp and cider, that's why I have cider-eldoc-display-for-symbol-at-point as nil on my config#2022-05-2615:08genmeblogThanks, I'll verify this.#2022-05-2615:10ericdalloBTW doom-emacs is https://github.com/doomemacs/doomemacs/blob/master/modules/lang/clojure/config.el#L85#2022-05-2615:13genmeblogStill I observe really strange behaviour.#2022-05-2615:16genmeblog
(map |) ;; nothing in minibuffer, lens shows [invalid arity]
(map| ) ;; the same
(map |) ;; minibuffer displays doc
(map identity|) ;; minibuffer shows doc for identity
(map identity |) ;; the same
(map identity [|]) ;; the same (identity)
(map identity [1 2]|) ;; the same
() ;; minibuffer shows `map` docs (sic!) 
#2022-05-2615:19ericdallothat's a clojure-lsp issue, regarding using outdated analysis, not sure there is a easy fix for that, but a issue makes sense on clojure-lsp#2022-05-2708:02genmeblogissue created: https://github.com/clojure-lsp/clojure-lsp/issues/995#2022-05-0110:40CarloI use defn-like macros to add spec information. Would there be a way of font-locking them as the original defn?#2022-05-0111:13CarloHere's a solution:
(font-lock-add-keywords
 'clojure-mode
 '(("(\\(>defn\\)\\s-+\\(\\w+\\)"
    (1 font-lock-keyword-face)
    (2 font-lock-function-name-face))))
#2022-05-0208:41borkdude#2022-05-0212:50ericdallodid you consider having the same for jet? I know we can create custom functions to shell out and achieve that, but having useful commands/functions built-in in a package sounds like a good idea to me :)#2022-05-0212:51ericdallofor example, I use to have this function on my config:
(defun jet-pretty ()
  (interactive)
  (shell-command-on-region
   (region-beginning)
   (region-end)
   "jet --pretty --edn-reader-opts '{:default tagged-literal}'"
   (current-buffer)
   t
   "*jet error buffer*"
   t))
#2022-05-0213:23borkdudeI'm happy to receive a PR for that and make you the author. I don't know enough about elips myself#2022-05-0213:32ericdalloCool, I can give it a try later :)#2022-05-0407:58plexusFor folks who are curious about Corgi development, I did a small write-up of how we're approaching key bindings https://github.com/corgi-emacs/corgi/issues/23#2022-05-0408:16vemvIt's also possible to preemptively remove bindings from all foreign modes. It's what I do - my least favorite thing in the world is hitting a shortcut by accident and invoking some crazy command with it IMO Emacs got wrong the whole notion of "modes define keybindings". It's users who should - according to their preferences and usage patterns#2022-05-0408:17plexus100% agree, do you have some pointers for bulk removing key bindings? I've looked at it in the past but didn't find an elegant solution.#2022-05-0408:34vemvI think that my approach boils down to iterating https://github.com/zenmacs/.emacs.d/blob/cbe6088f8e8cd892b81c10cf9e2400f02b1942f7/lib/non-submodules/vemv.data.el#L11-L22 and invoking global-unset-key over each item. There might be some other step needed for a comphensive removal, but that should buy a good first 99%!#2022-05-0411:51practicalli-johnWould Corgi provide / support an alternative keybinding for Esc, for example pressing fd in quick succession in insert mode returns to normal mode? This is the first thing I usually add to Neovim, so assume its not a common Vim binding#2022-05-0413:33plexusit conflicts with a vim binding, you'll have to make a case that this is an order of magnitude more useful and thus worth breaking vim compat over#2022-05-0415:16practicalli-johnCan you elaborate on what vim binding the fd key binding conflicts with? I am aware of the f binding by itself in normal mode to find a character on the current line, but not aware of a vim binding for the fd combination. I couldnt find anything in a search. Its something I specifically add to NeoVim, so curious as to what I am replacing. Thank you.#2022-05-0415:33plexusif f is bound then you can't bind fd, right? it's either a command or a prefix key
f               f{char}         1  cursor to Nth occurrence of {char} to the
                                   right
#2022-05-0415:36practicalli-johnBut f isn't bound to anything but the f character in insert mode, or have I missed something?#2022-05-0415:37plexusoh of course right we're talking about insert mode, yes f inserts itself, sorry for being a bit slow 🙂#2022-05-0415:38plexusI'm aware of this fd hack but not sure how widespread it is... feel free to open an issue, it's worth considering, or at least providing a snippet for people#2022-05-0408:16Benjamin
turn  this

  [de.otto/nom "0.2.0"]

  into this

  de.otto/nom {:mvn/version "0.2.0"}

(defun lein-deps-to-deps (beg end)
  (interactive "r")
  (replace-regexp-in-region
   "\\[\\(.+?\\)\\s-\\(\".+?\"\\)\\]"
   "\\1 {:mvn/version \\2}"
   beg
   end))
I wanted this function sometimes
#2022-05-0408:19plexusrelated, this is a bb script I use to turn project.clj into deps.edn. Sometimes still requires manual editing afterwards but it's very helpful as a starting point https://gist.github.com/688735af4d8b0879f7a98a9d2d8d3cbb#2022-05-0513:37practicalli-johnWhen building Emacs from source, are there any configuration flags that people recommend: I've used --with-native-compilation to make Emacs super fast, but wondering if there are other useful ones, especially for Linux. I build from source as I didnt find any Ubuntu Linux packages for Emacs 28 (although there are packages for 27.1 and 29.0.50), but https://github.com/practicalli/blog/issues/129 was relatively easy#2022-05-0513:42ericdalloI think there is the pgtk one but I never tried#2022-05-0513:42ericdallobut I know it was merged, so it depending on your emacs version it will be already available: https://www.reddit.com/r/emacs/comments/rj8k32/the_pgtk_pure_gtk_branch_was_merged/#2022-05-0513:51jkxyzI've been running Emacs with pgtk and native-comp for a while since I switched to Wayland. This is on Emacs 29 though, not sure if it's available for 28#2022-05-0514:09codeasoneHere's how I build 29.0.50 (i.e. off master) - which I do 3-4 times a year without a hitch and have been for a few years now. I intentionally built up the --with settings from a --without-all baseline and haven't noticed anything missing or wonky in my builds:
export CC=/usr/bin/gcc-10 CXX=/usr/bin/gcc-10
export CFLAGS="-O3 -mtune=native -march=native -fomit-frame-pointer"
./autogen.sh
./configure --without-all --with-cairo --with-gif --with-jpeg --with-png --with-rsvg --with-xml2 --with-zlib --with-threads --with-json --with-file-notification=inotify --with-gnutls --with-modules --with-xft --with-libotf --with-native-compilation --with-harfbuzz --with-mailutils
make NATIVE_FULL_AOT=1 -j$(nproc)
sudo make install
With these system dependencies: https://gist.github.com/codeasone/edc7ada6874c60167887f3901432b76a This is on Mint 20.3
#2022-05-0514:12codeasoneRuns like grease-lightening I'm pleased to say#2022-05-0605:43plexusAren't most of these already on by default?#2022-05-0605:53codeasoneI built up the configure options from a baseline of --without-all, wanting to be explicit about everything beyond the core. Maybe they're all on by default, I just didn't want any dead weight 😆#2022-05-0606:38practicalli-johnbuild dependencies were generated with sudo apt build-deps emacs , so that was much easier than before. I am not using Emacs 29 as there is an issue with unicode-fonts not getting cached (pcache issue with Emacs 29), although 28 is very fast too#2022-05-0606:41practicalli-johnIt seems optional features will be enabled if Emacs configuration finds the relevant library installed on the Operating System. The --without-all is very useful for controlling exactly what goes into an Emacs build and helps keep it lean. Thank you.#2022-05-0517:24DiegoGetting curious about doom emacs. Can anyone recommend any resources for setting up a clojure environment?#2022-05-0517:41ericdalloWe have #doom-emacs Probably the official getting started is the best documentation: https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#2022-05-0517:41ericdalloI know @U066U8JQJ is working on a complete guide for Clojure as well#2022-05-0517:42wilkerluciohahah, not a complete guide, just my impressions, but its taking more time than expected to get this one out#2022-05-0518:54DiegoThanks I’ll check that out @UKFSJSM38#2022-05-0600:19Volodymyr Vizovskyyhas anybody ever set up zprint with https://github.com/lassik/emacs-format-all-the-code? It says that in theory it should autodetect the filetype, but on my setup it's stubbornly trying to use cljfmt#2022-05-0710:23Benjaminjo isn't there an easy way to collect all regex matches? I do while re-search-forward cons into some res list#2022-05-0801:10agJust don't forget to wrap it in save-match-data https://emacs.stackexchange.com/questions/7148/get-all-regexp-matches-in-buffer-as-a-list#2022-05-1012:08practicalli-johnElisp help please. Is there a recommended way to use an environment variable when setting the location of my auth-sources? It seems auth-sources wants a quoted list of values, which means pulling out the environment variable and adding the filename isnt going to be evaluated. So the following doesnt quite work...
(setq auth-sources '((concat (getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
                     "~/.authinfo.gpg"))
I guess I could just use the relative locations in the list
(setq auth-sources '("~/.config/authinfo.gpg" "~/.authinfo.gpg"))
But wonder if there is a nicer approach
#2022-05-1012:11magnarsTry:
(setq auth-sources `((concat ,(getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
                     "~/.authinfo.gpg"))
#2022-05-1012:12magnarswhich is the fancy way to quote/unquote something#2022-05-1012:12magnarseven simpler:
(setq auth-sources (list
                    (concat (getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
                    "~/.authinfo.gpg"))
#2022-05-1012:14practicalli-johnah, so , is unquoting and therefore the concat expression evaluates to a string, nice. I like the list approach, more obvious to me. Thank you.#2022-05-1014:50dakraSince Emacs 26 I think, instead of (getenv "XDG_CONFIG_HOME") you can require 'xdg package and call (xdg-config-home). It's basically just getenv plus a fallback to ~/.config, so probably doesn't matter much.#2022-05-1012:25vemvI recently followed this tip from HN https://blog.nilbus.com/take-the-pain-out-of-git-conflict-resolution-use-diff3/ which is how I always wanted merge conflicts to be rendered. The cool part being, Emacs already understands this diff3 format OOTB. The new part is rendered in yellow: http://www.skybert.net/graphics/2017/2017-01-04-emacs-3-way-diff-git-merge.png highly recommended emacs#2022-05-1013:38pavlosmelissinosThat does look nice. Fwiw, I've always used ediff in emacs from a magit status buffer and it's similar to what you're showing but it also has each version in a separate buffer. I use n and p to go to the previous/next conflict and choose a (local), b (remote) or c (ancestor). Haven't used smerge though so not sure if I'm missing out on something...#2022-05-1019:21practicalli-john@U45T93RA6 so if I set
git config --global merge.conflictstyle diff3
then Emacs will show the common ancestor automatically when I have a merge conflict in magit? Or is there something else needed?
#2022-05-1020:27vemvI don't know for magit specifically, but yes, I had to do nothing in Emacs :)#2022-05-1107:25practicalli-johnSo is the screenshot an example of ediff? Or something in the Emacs version control?#2022-05-1323:48practicalli-johndiff3 format shows in Magit status once merge.conflictstyle diff3 is set in the git config, nice#2022-05-1116:09otfromanyone here (esp evil-mode users) have an issue where the buffer list updates itself (like an autorevert) and you lose your position in the buffer (cursor goes to the top) and you lose any deletes or copies you might have marked?#2022-05-1116:32BenjaminJust installed corgi last night and noticed that same thing. Fresh emacs stable on mac via homebrew.#2022-05-1116:40otfromI'm on Linux with a random recent ish fit head checkout#2022-05-1116:40otfromAnd using corgi#2022-05-1116:10otfromI'm finding it tricky to debug#2022-05-1607:07Drew VerleeI'm following the helpful guide here for installing emacs28.1. I get this error at the end
./configure --with-native-compilation --with-harfbuzz

...

checking for libXaw... configure: error: No X toolkit could be found.
If you are sure you want Emacs compiled without an X toolkit, pass
  --with-x-toolkit=no
to configure.  Otherwise, install the development libraries for the toolkit
that you want to use (e.g. Gtk+) and re-run configure.
Which appears when i run make to, and i persume is what's blocking the install. I assume i want the toolkits, menus, popups, etc.... I think i have gtk installed so i'm confused why it's not being used, or why no it's not mentioned in the install script(s) i have seen if it needs to be specified. That or i don't have a proper "toolkit" installed and i would love some help figuring out how to do that.
#2022-05-1607:19practicalli-johnIf on Ubuntu/Debian, the packages required for building Emacs can be installed using
sudo apt build-deps Emacs
Or search for the library names mentioned by ./configure using apt-cache
apt-cache search --names-only libraryname
#2022-05-1607:22Drew Verleethanks. Looks like i have to resolve this issue with my source list
#2022-05-1607:28Drew Verleei was able to do that by doing exactly what it said. Though i likely just opened some doors that typically i want shut im guessing.#2022-05-1607:34practicalli-johnThis is my guide that seems to have worked on a couple of different versions of Ubuntu https://github.com/practicalli/blog/issues/129#2022-05-1607:35Drew Verleethanks john. That is what i'm using! I forgot to put the link in. (it's been quite a day for me#2022-05-1607:36practicalli-johnIf you launch Software & Updates on ubuntu desktop, then just check the Source Code entry in Ubuntu Software#2022-05-1607:36Drew Verleeyep thats what i did.#2022-05-1607:38practicalli-johnHmm, perhaps check /etc/apt/sources.list to see if the deb-src entries have been commented out (or possibly deleted)#2022-05-1607:38practicalli-johnsources.list should have#2022-05-1607:39Drew Verleei was able to run sudo apt build-dep emacs without the errors. I just ran make and it completed, but emacs isn't on the path...#2022-05-1607:39Drew Verlee./src/emacs -Q loads works...#2022-05-1607:40practicalli-johnmake install will install emacs globally the -Q is just a quick way of testing without using the config#2022-05-1607:40Drew Verleeah i see#2022-05-1607:40Drew Verleei thought the rest of the instructions were a different way of installing#2022-05-1607:44practicalli-johnThere is a lot of stuff at the end for tweaking installs, but it seems its not really necessary unless there are certain features you know you want to exclude. Once you have got to make install then you should be done#2022-05-1607:50Drew Verleeemacs is loading but it doesn't look great (the font is all off) and i'm getting a lot of errors. Here is a sampling:
Error (use-package): clojure-essential-ref-nov/:catch: Symbol's value as variable is void: cider-mode-map Disable showing Disable logging
Warning (comp): smartparens.el:1460:1: Warning: custom-declare-variable `sp-highlight-wrap-tag-overlay' docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:2726:42: Warning: value returned from (< (sp--get-overlay-length nil) (sp--get-overlay-length nil)) is unused Disable showing Disable logging
Warning (comp): smartparens.el:2726:42: Warning: value returned from (< (sp--get-overlay-length nil) (sp--get-overlay-length nil)) is unused Disable showing Disable logging
Warning (comp): smartparens.el:2726:42: Warning: value returned from (< (sp--get-overlay-length nil) (sp--get-overlay-length nil)) is unused Disable showing Disable logging
Warning (comp): smartparens.el:2907:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:2913:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:5534:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:7200:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:8229:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): smartparens.el:8728:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): evil-cleverparens-util.el:271:21: Warning: looking-back called with 1 argument, but requires 2-3 Disable showing Disable logging
Warning (comp): smartparens.el:9411:8: Warning: docstring wider than 80 characters Disable showing Disable logging
Warning (comp): evil-cleverparens-util.el:291:15: Warning: 'in-string-p' is an obsolete function (as of 25.1); use (nth 3 (syntax-ppss)) instead. Disable showing Disable logging
W
#2022-05-1607:56practicalli-johnThere will be lots of warnings when you first run emacs. Its downloading all new packages and also natively compiling them. Once all the emacs packages have downloaded, then restart emacs. If there are still pages of warnings, then its something to look at.#2022-05-1607:58practicalli-johnSo long as you are not getting messages about certificates, then I suspect everything is okay#2022-05-1607:59Drew Verleei'm trying to figure out if it's ok right now. it looks like fonts and pictures are loading propery#2022-05-1607:59Drew Verlee#2022-05-1608:04practicalli-johnIn Emacs, run
SPC SPC all-the-icons-install-fonts
to fix the modeline fonts
#2022-05-1608:06practicalli-johnIf that is all the warnings you have left, then I think thats fine.#2022-05-1608:11practicalli-johnIf you havent updated spacemacs in a while, i.e. pulled a new version of .emacs.d , then that may be useful, especially if there are lingering warnings#2022-05-1608:11Drew Verleeother things seem ok...
SPC SPC all-the-icons-install-fonts
ran correctly but nothing changed.
#2022-05-1608:11practicalli-johnI assume a restart of emacs is required#2022-05-1608:12Drew Verlee> (Spacemacs) Warning: Cannot find any of the specified fonts (Fira Code)! Font settings may not be correct. #2022-05-1608:12Drew Verleei did restart#2022-05-1608:13practicalli-john
sudo apt install fonts-firacode
#2022-05-1608:13practicalli-johnor edit .spacemacs/init.el and change to your preferred (and installed 🙂 ) font#2022-05-1608:14Drew Verleei'm really happy with firacode i'm just confused because it is installed#2022-05-1608:14Drew Verleefonts-firacode is already the newest version (2+dfsg1-1).#2022-05-1608:15Drew Verleei didnt move emacs from local/bin ... i'm not sure why that would matter#2022-05-1608:15practicalli-johnmaybe there is more than one emacs binary on the execution path...
which emacs
#2022-05-1608:16Drew Verlee/cdn-cgi/l/email-protection  ~  which emacs /usr/local/bin/emacs#2022-05-1608:16Drew Verlee/cdn-cgi/l/email-protection  ~  emacs --version GNU Emacs 28.1#2022-05-1608:17Drew Verleeso that seems right#2022-05-1608:17practicalli-john~I would recommend keeping emacs in the install location.~ ~If you need to install it somewhere else, then go back to the emacs source directory and uninstall it. Then use the --prefix to install to a different location.~ ~As the instructions state, its not just a single binary install...~#2022-05-1608:17practicalli-johnAh, sorry, I read that wrong...#2022-05-1608:17practicalli-johnI though you said you did move it...#2022-05-1608:18Drew Verleei recall the instructions talking about moving it, like maybe it was a good idea. I didn't. i was just fishing for something that could be off. trying to figure out why it can't fira code atm.#2022-05-1608:19Drew Verleemaybe i didnt' include harfbuzz?#2022-05-1608:20Drew Verleei did 11780* ./configure --with-native-compilation --with-harfbuzz#2022-05-1608:20practicalli-johnharfbuzz should be on by default, if the libraries are installed on the operating system#2022-05-1608:21practicalli-johnThe fira code fonts should be in
/usr/share/fonts-firacode
#2022-05-1608:21Drew Verlee{:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "6a0e180f1d1c0f18060f0f2a0e180f1d1c0f18060f0f"}, :content ("[email protected]")} woff woff2#2022-05-1608:22Drew Verleeim going to restart my computer. didn't help lol.#2022-05-1608:28practicalli-johnHmm, perhaps libotf0 and libotf-dev are not installed, but that seems unlikely.#2022-05-1608:29Drew Verleeit says they were already at the newest version#2022-05-1608:39practicalli-johnIs emacs actually using the firacode font and just giving a warning, or is it using a different font? Did you still have the unicode layer uncommented in .spacemacs / .spacemacs/init.el ? Suggest trying with a different font and see if it also gives a similar warning for that font.#2022-05-1608:41Drew Verleeit's not using the font. Commenting out the spacemacs-default-font var and it falls back to ubunut font (or something) which gives the same error.#2022-05-1608:41Drew Verleeunicode lyaer uncommented?#2022-05-1608:42Drew Verleethis?
;; Support font ligatures (fancy symbols) in all modes
     ;; 'prog-mode for only programming languages
     ;; including text-mode may cause issues with org-mode and magit
     (unicode-fonts :variables
                   unicode-fonts-enable-ligatures t
                   unicode-fonts-ligature-modes '(prog-mode))
#2022-05-1608:42practicalli-johnI recall that you uncommented the unicode layer in the spacemacs config as it was building the fonts each time when using emacs29 However, It seems that there is something missing with the emacs build... I think#2022-05-1608:44practicalli-johnyou could try sudo fc-cache to rebuild the font cache, but I think the computer reboot should have taken care of that#2022-05-1608:46practicalli-johnIn the emacs source code directory, could you run
./configure --with-native-compilation > confiuration-output.txt
and paste the contents of http://configuration-output.it in a gist or some other text sharing thing
#2022-05-1608:48Drew Verleesure. the warnings don't look encouraging. I don't recall that when i ran it before
{:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "b0d4c2d5c7c6d5c2dcd5d5f0d4c2d5c7c6d5c2dcd5d5"}, :content ("[email protected]")}
#2022-05-1608:49Drew Verlee#2022-05-1608:50Drew Verleehmm i though that would be easy to download.#2022-05-1608:51practicalli-johnI assume you need to set these environment variables before running configure
export CC=/usr/bin/gcc-10
export CXX=/usr/bin/gcc-10
#2022-05-1608:51Drew Verleei believe i did. but maybe then i switched terminals or something lame.#2022-05-1608:51practicalli-johnYes, I did that a few times 🙂#2022-05-1608:52Drew Verleeshould i make uninstall? then do it again?#2022-05-1608:52Drew Verleeoh your saying for this command#2022-05-1608:55Drew Verleehttps://gist.github.com/drewverlee/b9b57cb6ad97b29e2743575f41a41e3f#2022-05-1608:56Drew Verleeyou were saying i needed to run that export before doing ./configure --with-native-compilation > confiuration-output.txt right?#2022-05-1608:56Drew Verleeor do you think thats the issue with the install.#2022-05-1608:57practicalli-johnthe config drives the build. looking at config output is quicker than building 🙂#2022-05-1608:57practicalli-johnThis is the output from my config with the CC and CXX env vars set before running config#2022-05-1608:57practicalli-johnhttps://gist.github.com/practicalli-john/bb5a40902c48d30651317418c056f903#2022-05-1608:58practicalli-johnmainly want to check line 537 to line 584#2022-05-1609:00Drew VerleeWhat toolkit should Emacs use? LUCID Is that right? I guess i might expect this to read gtk-3#2022-05-1609:02Drew Verleeyea. your using GTK3#2022-05-1609:02Drew Verleewtf#2022-05-1609:03Drew Verleei mean, i have no idea what the difference is, but i googled how to install gtk3 for like 20 minutes and i thought i had finally done it.#2022-05-1609:04practicalli-johnI think we have the root cause identified. There are some interesting libraries installed :)#2022-05-1609:04Drew Verleeare you seeing something beyond lucid?#2022-05-1609:05practicalli-johnDid you share the updated configuration file?#2022-05-1609:06Drew Verleeit's the gist above#2022-05-1609:06practicalli-johnLine 2 is not a good start configure: WARNING: cairo requested but not found.#2022-05-1609:07practicalli-johnAre you using Ubuntu or an ubuntu based distribution? Or something else. It doesnt seem GTK is installed, which is quite unusual, unless you are using KDE perhaps... or something other than the Gnome desktop#2022-05-1609:09Drew VerleeTo my knowledge i'm just using Ubuntu. I installed it from a thumb drive like 4 years ago or so /cdn-cgi/l/email-protection  ~/emacs  ➦ 5a223c7f2e  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focal#2022-05-1609:10practicalli-johnDo you have any emacs packages installed? I seem to recall an emacs-lucid package that may have install some libraries that its picking up...#2022-05-1609:11practicalli-johnIt may be that we just need to specify GTK as the toolkit to use, so it doesnt default to other interesing things#2022-05-1609:14practicalli-johnTry running config again. Set the env vars and include the configure option (updated as a 1-line command)
export CC=/usr/bin/gcc-10  && export CXX=/usr/bin/gcc-10 && ./autogen.sh && ./configure --with-native-compilation --with-x-toolkit=gtk3
#2022-05-1609:15Drew Verleeat the end checking for gtk+-3.0 >= 3.10 glib-2.0 >= 2.37.5... no configure: error: No package 'gtk+-3.0' found#2022-05-1609:20practicalli-johnI dont think the Ubuntu desktop (gnome desktop) is installed? Or its not being used#2022-05-1609:21practicalli-johnapt-cache show ubuntu-desktop and check to see if it has an Installed-Size entry#2022-05-1609:22practicalli-johnOr logout of the desktop and click the settings cog next to the account login name and see what desktops you can login to... and what the currently selected one is#2022-05-1609:24Drew Verleegist: https://gist.github.com/drewverlee/e43be98dcebf44e61a4695c67b47bd29#2022-05-1609:31Drew Verleei should just do a fresh install of ubuntu#2022-05-1609:31practicalli-johnAh, sorry, this is a better check
apt -qq list ubuntu-desktop
#2022-05-1609:31Drew Verlee
{:tag :a, :attrs {:href "/cdn-cgi/l/email-protection", :class "__cf_email__", :data-cfemail "07637562707162756b626247637562707162756b6262"}, :content ("[email protected]")}
#2022-05-1609:32practicalli-johnThats weird. If you dont have anything you need on the computer, then a fresh install may be simpler that trying to find out where things have gone astray#2022-05-1609:32Drew Verleewhat's weird? for educational purposes.#2022-05-1609:33practicalli-johnweird that ubuntu desktop is installed, but the emacs build script cant find gtk3 or cairo libraries..#2022-05-1609:33Drew Verleegotcha#2022-05-1609:35practicalli-johnIf libgtk3 is installed but the emacs build script cannot find it, I dont know what the cause of that would be...
apt -qq list libgtk-3-0
#2022-05-1609:36Drew Verleewith
sudo ./autogen.sh

sudo ./configure --with-native-compilation --with-x-toolkit=gtk
I seem to get them included: https://gist.github.com/drewverlee/cc71de172b3751a1dd9788eb87bdc484
#2022-05-1609:41practicalli-johnDid you run the export statements as separate commands ? Maybe that is why its not finding native compiliation
export CC=/usr/bin/gcc-10    
...
export CXX=/usr/bin/gcc-10
#2022-05-1609:41practicalli-johnI assume that libgccjit was installed
sudo apt install libgccjit0 libgccjit-10-dev
#2022-05-1609:45Drew Verleei just pasted it in as a code block. i'm guessing that was the issue. I just wanted that to work and they need a separator in that case.#2022-05-1609:48Drew Verleethanks a ton. ill pick this up tomorrow 🙂#2022-05-1609:49practicalli-johnThis seems to work 🙂
export CC=/usr/bin/gcc-10  && export CXX=/usr/bin/gcc-10 && ./autogen.sh && ./configure --with-native-compilation --with-x-toolkit=gtk3
#2022-05-1609:50practicalli-johnNice debugging session, I've learned a lot more about building emacs. Thanks.#2022-05-1609:52Drew Verleeyea 😢 . same error No package 'gtk+-3.0' found. I have no idea. it doesn't seem to be a common issue.#2022-05-1610:48practicalli-johnTry installing the build-essentials meta package, this should bring in a load of libraries to help build Emacs
sudo apt install build-essential
#2022-05-1704:40Drew VerleeI ended up just going with a ubuntu software package install, which is working out just fine for now. I smattering of things about building from source which wasn't on my todo list but i feel somewhat better for having tried. I know it shouldn't have been a hassle, but with great power...#2022-05-1613:13BenjaminIs any of you using cider with completion-in-region ? I tried to figure out why I couldn't complete keywords. Now I have a temp hack:
;; FIXME: why..
;; completion in region somehow ends up calling cider with blank prefix (a second time, the first time is good) 
;; still in the dark why
(defun cider-complete-at-point ()
  "Complete the symbol at point."
  (when-let* ((bounds (bounds-of-thing-at-point 'symbol)))
    (when (and (cider-connected-p)
               (not (or (cider-in-string-p) (cider-in-comment-p))))
      (list (car bounds) (cdr bounds)
            (completion-table-dynamic
             (let ((res))
               (lambda (prefix)
                 (or res
                     (setf res
                           (cider-complete prefix))))))
            :annotation-function #'cider-annotate-symbol
            :company-kind #'cider-company-symbol-kind
            :company-doc-buffer #'cider-create-doc-buffer
            :company-location #'cider-company-location
            :company-docsig #'cider-company-docsig))))
I don't need to recompute the cider completions after the first
#2022-05-1722:00joshmillerDoes anyone have any tips for excluding files from LSP’s file watchers in a project? For example, I don’t need the node_modules folder to be watched in a Clojurescript project, and it’s big enough that it causes warnings about performance when it starts up.#2022-05-1722:00joshmillerI’ve tried following the instructions here: https://emacs-lsp.github.io/lsp-mode/page/file-watchers/#2022-05-1722:00joshmillerSpecifically, with
(with-eval-after-load 'lsp-mode
  (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\node_modules\\'"))
#2022-05-1722:01joshmillerThat doesn’t seem to have worked. And ideally, I would add these to .dir-locals.el on a per-project basis.#2022-05-1722:41joshmillerSolved: Better google-fu led me to https://clojurians-log.clojureverse.org/lsp/2021-04-12#2022-05-1722:43joshmillerMy .dir-locals.el now looks like ((nil . ((lsp-file-watch-ignored-directories . ("/node_modules$")))))#2022-05-1722:50ericdalloAlmost sure lsp-mode already have node_modules excluded#2022-05-1722:53joshmillerIt’s possible. There are a bunch of folders in that project that I excluded but left out of the example for brevity, so I might have ended up duplicating node_modules.#2022-05-1808:17Chris ClarkHey Emacs friends! When I run M-x cider-javadoc on a symbol, it opens up a URL to Java 11 docs. E.g.: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/ServerSocket.html I'm using Java 18 locally, and I'm hoping to make cider-javadoc use URLs for Java 18. E.g.: https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/net/ServerSocket.html I'm having trouble figuring out how, though. Anybody know?#2022-05-1808:51jkxyzIt looks like it defaults to Java 11 here: https://github.com/clojure-emacs/orchard/blob/master/src/orchard/java.clj#L384-L385#2022-05-1808:55jkxyzI imagine you need to open a PR to add the Java 18 URL to that map#2022-05-1809:05vemvNo, fixing the fallback (L385) is just a workaround. L384 should be working to begin with. Currently it doesn't, next CIDER release will#2022-05-1809:06jkxyzYes I see there's a map of version numbers to URLs which is what needs updating#2022-05-1809:08vemvL385 most likely should be removed, I'll look into it as I work on related CIDER features asap#2022-05-1810:59Chris ClarkAwesome, thanks so much for the help! Adding an item for 18 in the map of javadoc-base-urls does indeed make it work. I'll make a PR for that.#2022-05-1811:22vemvPlease don't (as I've already expressed my opinion on the topic), however a comment in https://github.com/clojure-emacs/orchard/issues/160 is welcome Thank you both for bringing the item to attention though!#2022-05-2310:02Benjamindo you use magit and submodules? How do I update all ?#2022-05-2312:41practicalli-johnEither Select all sub-modules and call magit-submodule-update Or use the universal argument (`C-u`) before calling magit-submodule-update to apply to all modules (same applies toany other sub-module commands)#2022-05-2315:41BenjaminAh thanks relief#2022-05-2314:08otfromat the risk of starting a flame war. Should I go with evil or lots of hydra stuff if I'm going to be doing a lot of work in a terminal with someone who will be learning emacs as well (I'll be creating their first config)#2022-05-2314:09otfromI do have to admit that I like hitting C- and M- less often#2022-05-2314:50aptI’m not sure if I get the question. In principle, evil is for editing text, hydra is for having prefixes for a set of keys.#2022-05-2314:51otfromboth allow for chaining of commands together and make emacs more mode like (tho the hydra modes seem much more ephemeral)#2022-05-2314:51otfromand both allow you to do a serious amount of key rebinding#2022-05-2315:31ennI think a new emacs user will have an easier time if they learn how to get around in vanilla Emacs first.#2022-05-2315:44César OleaAs an emacs user hydra makes the most sense to me. I've tried evil mode before but I could never stick with it long term. I like the flexibility of using hydras in the few places where I think it can make a difference to my workflow. But as @U060QM7AA mentions, for a new emacs user I think it's best for them if they learn vanilla emacs, if anything so they are able to search for answers when they get stuck.#2022-05-2316:18otfromthere is that. We'll be pairing a lot and it will be remote which is why I was looking at evil as a solution. I've had issues with keybindings having fights with the terminal or desktop environment in frustrating ways.#2022-05-2316:19otfromevil has been pretty frustrating for me, but then I've been an emacs user for over 25 years.#2022-05-2316:20César OleaI'm on the same boat as you are. Not as impressive as 25 years, more like 15 but nevertheless long enough that the "emacs way" has been burned into my subconscious.#2022-05-2316:21otfromwell, just get old and you can rack up those years too 😉#2022-05-2316:21César OleaI'm doing my best!#2022-05-2316:42fedregThere's also god-mode... I've been an evil user for years and trying to switch over to vanilla bindings. god-mode has worked great for me... easy on the hands and I learn the vanilla bindings#2022-05-2316:42practicalli-johnWhile I like the hydra concept, I've rarely used it in practice. Spacemacs has transient states, the same principle as hydra, although I rarely use them for consecutive commands (maybe for organising windows in a frame) I find the mnemonic menu in Spacemacs and Evil cover 99% of my actions I would highly recommend getting comfortable speaking the vim language with your fingers, it's made me noticeably more productive#2022-05-2316:44otfromthat is the thing that is keeping me coming back to it. I'm finding I'm still having to do too many things in holy mode (like editing the minibuffer) or that I'm missing something important in a mode I use a lot#2022-05-2316:45otfromI'm also struggling with a weird bug where after a while of using emacs I get the cursor jumping from the minibuffer to the top left buffer, which is pretty maddening. Restarting emacs seems to fix it, but I'm not quite sure what I do to start it#2022-05-2316:45otfromI do find entering ()[]{}"" a bit annoying as I've not got a good keybinding for stepping over them other than closing the paren#2022-05-2316:46otfromand surely that is what C-f is for#2022-05-2316:46otfrombut I think that is just me being a noob#2022-05-2316:46otfromI'm finding your stuff on evil really helpful @U05254DQM#2022-05-2316:48practicalli-john@U0525KG62 happy to do an Evil pairing session video call if it helps. I don't seem to have any of those issues.#2022-05-2316:49practicalli-johnI mainly use [ and ] to jump around sexp's (and magit)#2022-05-2316:58practicalli-johnI do use C-y to paste in the mini-buffer and C-c C-e to edit the results of a helm search, but I think that's all#2022-05-2316:59otfromwhat keys do you use to move around in the minibuffer to edit things?#2022-05-2316:59otfromI don't need to worry about helm#2022-05-2316:59otfroma massive list of all the keybindings for loads of modes would help. I think most of those are in evil-collection#2022-05-2317:00otfromre: the jumping bug. I've not triggered it again yet#2022-05-2317:03ennI also occasionally run into situations where the minibuffer is still open but my cursor ends up in another buffer. Usually I can do C-x o to cycle through all my open windows until I get to the minibuffer, and then I can either finish was I was doing or close it with C-g.#2022-05-2317:04otfromI've never had that problem until I started using evil#2022-05-2317:04practicalli-johnI use command-log-mode to see what commands I am calling, https://github.com/lewang/command-log-mode#2022-05-2317:05otfromor if I did it was b/c I clicked on something#2022-05-2317:05otfrom@U05254DQM I've been using command-log-mode to keep an eye on things#2022-05-2317:05otfromand to see what things our bound to#2022-05-2317:11practicalli-johnTo navigate the mini-buffer, i.e selecting a file path, I either use arrow keys or C-h, or backspace (or C-j C-k) to navigate an a list of selections#2022-05-2317:12otfromI'm usually editing my jack-in command after doing C-u , j j to jack-in#2022-05-2317:12otfromso I'll not feel too bad about the arrow keys or using C-y#2022-05-2317:15practicalli-johnI havent found the mini-buffer to be that Evil... I usually add custom jack-in commands to the .dir-locals.el file, although if there are several different command for each project that may be a bit annoying to edit that file and revert a buffer to load the change each time.#2022-05-2317:16otfromI do think you've hit on part of the core that confuses me a bit. Evil offers a lot of extra on top of holy-mode, but you still need to be holy in particular places.#2022-05-2317:16otfromso I suppose I don't know where to draw the lines. What should be holy, what should be evil#2022-05-2317:16otfrom(do people still do the holy/evil puns?)#2022-05-2317:21practicalli-johnI use Evil everywhere its implemented in Spacemacs, which is almost everywhere (mini-buffer seems to be a special case where multi-modal editing isnt supported, although I havent really investigated). I tried a hybrid approach initially, but it just slowed the adoption of Evil and was worse than using just holy or just evil.#2022-05-2317:24otfromok, so evil everywhere except in the holy of holies that is the minibuffer#2022-05-2317:26practicalli-johnUnless I can find a way to go full Evil in the mini-buffer 🙂#2022-05-2317:26otfrom:the_horns:#2022-05-2317:26otfromI suppose you'll have to be holy in anything new#2022-05-2317:26otfromunless things start coming with evil bindings#2022-05-2317:27otfromor you just SPC SPC everything which feels like suffering for ones evil while you are alive, which just feels wrong#2022-05-2317:27otfrom(I'm going to carry on with the extended pun)#2022-05-2317:27otfromhaving an #evil channel for spacemacs/doom/corgi would be nice to trade ideas, but I'm happy to hang out in 3 or 4 channels as long as it doesn't annoy anyone#2022-05-2317:33practicalli-johnI am not missing evil key bindings for anything new. Spacemacs provides evil keybindings for pretty much everything, except mini-buffer and navigating the Emacs customize menu. I assume Doom does as well, but havent checked. I only really use the mini-buffer for interacting with the completion framework (helm-ivy-etc...). I rarely edit in customize, instead adding customisations to the init.el instead.#2022-05-2317:37practicalli-johnThere was a couple of new functions in Cider I was going to add keybindings to Spacemacs for (once I remember what those commands were - off to check the Cider changelog...)#2022-05-2317:54practicalli-johnHmm, according to this commit it seems you can have multi-modal Evil in the mini-buffer.. https://github.com/emacs-evil/evil/pull/1059/files#2022-05-2406:03hkjelsThere’s quite a bit of rambling to unpack here, so I’m not going to 🥸. Did you reach a conclusion? I’ll post my two cents anyways and you can treat them as you wish. • Evil if vim-bindings is in your muscle-memory (You can use evil in the mini-buffer as well) • God-mode if you are already familiar with Emacs bindings • Meow if you want total control • Transient over hydra Personally, I switched from Vim to Emacs about six/seven years ago and went with evil and have stuck with it. I also used to have a bunch of hydras, but I’ve either killed them or replaced them with which-key and transients by now.#2022-05-2406:44otfromThanks that's helpful#2022-05-2407:24practicalli-johnI've added (setq evil-want-minibuffer t) to my init.el to see how I get on with Evil in the minibuffer (its like a whole new world 🙂 )#2022-05-2407:30otfromWhoa#2022-05-2408:05hkjelsI don’t see it mentioned here, but if you decide to go with evil, you should also add evil-collection or else you’ll have a awkward mix of emacs-bindings and vim-bindings all over the place#2022-05-2408:25practicalli-johnSpacemacs includes quite a few evil packages and I definately recommend evil-cleverparens for Clojure and other lisp syntaxes, as it respects your parens
evil-anzu
        evil-args
        evil-collection
        evil-cleverparens
        evil-ediff
        evil-escape
        evil-exchange
        evil-goggles
        evil-iedit-state
        evil-indent-plus
        evil-lion
        evil-lisp-state
        evil-nerd-commenter
        evil-matchit
        evil-numbers
        evil-surround
        evil-textobj-line
        evil-tutor
        (evil-unimpaired :location (recipe :fetcher local))
        evil-visual-mark-mode
        evil-visualstar
#2022-05-2415:43otfromat what point on my evil journey do I stop doing jjjjjjjjjjjjjjjjjjjjjj and kkkkkkkkkkkkkkkk?#2022-05-2416:15practicalli-johnwhen you start doing 21j or 21k 😆 turning on relative numbers helps jump to a line that is x number of lines away.#2022-05-2416:17otfromyeah, I've got that turned on already. It can be a bit fun with folding in some modes.#2022-05-2416:18otfrommostly I was wondering when I'd stop forgetting to hit ESC before hitting normal mode keys#2022-05-2416:22practicalli-johnvisual-line-numbers should work better when using truncated lines (wrapped text), it should only show line numbers for distinct lines evil-escape is a nice package that allows an Esc key binding short-cut on the center row of the keyboard, e.g. fd , although it does take a little practice as they have to be presses in very quick succession#2022-05-2416:24practicalli-johnOr just buy a Keyboardio model01 keyboard (or the https://shop.keyboard.io/) with the Esc key near the left index key (I can probably do you a good deal on a second hand one, as I have 3 of them)#2022-05-2416:27otfrom3?#2022-05-2416:29practicalli-johnI like the http://keyboard.io keyboards, they are vim-tastic. I have 3 model01 keyboards, 2 atreus keyboards (for all the travelling - when I start doing that again) and have a couple of Model 100's coming when they have been manufactured later this year.#2022-05-2416:31practicalli-johnI could sell off the model01s and replace them with the model100s#2022-05-2407:14otfromlater I shall be asking important questions about bikeshed colours#2022-05-2420:27ennI recently upgraded Emacs and now I’ve been getting stray control characters inserted into my buffers in terminal (`-nw`) mode, I think based on mouse events. Sometimes (as in this example) the cursor jumps to the beginning of the buffer before the characters are inserted, sometimes not. Has anyone else run into this? I use xterm-mouse-mode and iterm2 on MacOS.#2022-05-2420:27ennI have this config snippet which I’ve used for years to get the scroll wheel working
(global-set-key [mouse-4] '(lambda ()
                            (interactive)
                            (scroll-down 1)))
(global-set-key [mouse-5] '(lambda ()
                            (interactive)
                            (scroll-up 1)))
#2022-05-2421:37Cora (she/her)scrolling the mouse sends M-[#2022-05-2421:37Cora (she/her)to the terminal#2022-05-2421:38Cora (she/her)usually I look to doom emacs for how they handle things like this https://github.com/doomemacs/doomemacs/blob/3b789752a30419535b328c605957b6b43a9d47fa/modules/os/tty/config.el#2022-05-2421:41ennyeah, seems pretty similar to what I have#2022-05-2421:41Cora (she/her)hmmm yeah#2022-05-2421:43ennto clarify, all of my mouse interactions still work (clicking to move the cursor, dragging to select, and scrolling with the mouse wheel). It’s just that sometimes I also get these random inserted characters. It’s possible that the mouse is a red herring and that these chars are coming from somewhere else.#2022-05-2421:43Cora (she/her)well I guess all I see are your bindings so if you say so then it probably is#2022-05-2421:45Cora (she/her)35 is the foreground magenta color code #2022-05-2421:45Cora (she/her)and 25 would be blinking?#2022-05-2421:46Cora (she/her)well no it's the reset code for blinking#2022-05-2421:46ennoh, interesting!#2022-05-2421:47Cora (she/her)unless it's true color in which case it could be part of an rgb#2022-05-2421:47ennI wonder if there’s a bug in my color theme. I might try another to see if I have the same problem there. Thank you, that is a really helpful thread for me to pull on.#2022-05-2421:47Cora (she/her)i'm looking at this https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797#2022-05-2421:47Cora (she/her)I hope it helps!#2022-05-2421:49Cora (she/her)I wonder if it's cursor change escape sequences. do you use evil mode?#2022-05-2421:51ennno, I don't#2022-05-2421:51Cora (she/her)ok, disregard!#2022-05-2422:00Cora (she/her)spacemacs doesn't have much either fwiw#2022-05-2422:00Cora (she/her)https://github.com/syl20bnr/spacemacs/blob/9e30cf9b3989797072de8b83f39f2fd08fe80c79/layers/%2Bspacemacs/spacemacs-defaults/config.el#L87#2022-05-3015:00Benjaminjo how do I override a function locally? Like in clojure with binding I can advice it and check the presence of some local variable#2022-05-3015:04Benjaminfor my acute use case I figured out how to not need such a workaround#2022-05-3016:04vemvlet / let* can just do that (like clojure binding) since emacs traditionally has always had dynamic scope For the last 10 years the direction has changed, so it's worth checking out the rules for which scope applies when#2022-05-3017:20Benjaminyea for variables but for functions? Ah does cl-flet work? (nvm-flet makes a special symbol of the input)#2022-05-3018:16vemvah no idea, I only vaguely recall about this stuff#2022-05-3018:16vemvnormally I override the defun altogether (however I admit it's a bit :face_with_cowboy_hat:ish)#2022-05-3018:17vemvperhaps you can advice it with around and perform your logic conditionally e.g. (setq-local foo 'yeah) and then (if foo ,,,) in your advice#2022-05-3018:18Benjaminyea#2022-05-3018:18BenjaminI think that would be the way#2022-05-3018:19Benjaminone day we'll have an emacs written in clojure
#2022-05-3023:50ag> how do I override a function locally? it depends on what you're trying to do. I often have to refer to this SO post, because I can't memorize these three things https://stackoverflow.com/questions/39550578/in-emacs-what-is-the-difference-between-cl-flet-and-cl-letf#2022-05-3108:09Benjaminah cl-letf actually does override the symbol function place, nice#2022-05-3121:20otfromAnyone using clojure-lsp and eglot?#2022-05-3121:25ericdalloI know @U976F1AR2 uses it#2022-05-3121:26aptI do, yes#2022-05-3121:37aptIt works well, except for navigating to external deps code, which does not work at all. Issue mapped here: https://github.com/joaotavora/eglot/issues/661 This does not bother me much because I can use clojure.repl/source or consult the source directly, since it’s mostly a lib from my company anyways#2022-06-0107:33Carlo@U976F1AR2 what would you say are the advantages of using eglot over clojure-lsp for clojure?#2022-06-0113:32aptI don’t see any advantage specifically for Clojure. I like eglot because it feels very emacsy. When I used lsp-mode, I had to disable some stuff in order to make it more visually pleasant, and I found it to be more noisy (for example, it warned about not finding flycheck or company, which I don’t use anyway). eglot just works as I want w/o configuration.#2022-06-0113:32aptBut both are great.#2022-06-0113:33ericdallolsp-mode improved noise reduction a lot on the past year, but I agree with you#2022-06-0113:36aptOh, it has been a few months since I last tested lsp-mode, so yeah, things might have changed.#2022-06-0217:26Drew VerleeIf i wanted to be able to visually hide some clojure data what would be the best way to do that? E. G kind of like folding but only a specified set of clojure data.#2022-06-0220:10practicalli-johni do move data to their own name spaces for this reason when they are more than a few lines. I also think it makes far more sense in the long run. I can very easily see the data by evaluating the name of the def binding around that data in the namespace with the functions that work on the data.#2022-06-0220:10practicalli-johnThere is an example in the Practicalli lannding page https://github.com/practicalli/practicalli.github.io/blob/live/src/practicalli/data.cljs#2022-06-0220:13practicalli-johnSpacemacs has very simple to use folding tools and a few different folding options.
;; Code folding method. Possible values are `evil', `origami' and `vimish'.
   ;; (default 'evil)
   dotspacemacs-folding-method 'vimish
The vimish method allows folding of visual selections
#2022-06-0221:23Drew VerleeThanks I'll take a look#2022-06-0307:44practicalli-johnI appreciate this isn't probably isn't the approach asked for, but hopefully it's of some use#2022-06-0217:27Drew VerleeI'm thinking i could use clojure metadata to just mark them and then have something look for it. Maybe cider has something like clojure postwalk?#2022-06-0217:28vemv> hide some clojure data where?#2022-06-0217:29Drew VerleeAre you asking where i want to hide it?#2022-06-0217:30vemvyeah like in the repl? editor buffer?#2022-06-0217:30Drew VerleeEditor buffer. In cases where you're editing clojure files.#2022-06-0217:31vemvwhat does the data look like? are you editing big maps? Those are relatively uncommon in .clj files#2022-06-0217:31Drew VerleeYep. Big distracting (at times) maps.#2022-06-0217:32vemvhave you tried out https://docs.cider.mx/cider/debugging/inspector.html ?#2022-06-0217:34Drew VerleeI'm not having trouble inspecting them, i just don't always need them around for what I'm currently doing in the surrounding code changes. So it would be nice to toggle them in and out as they were useful.#2022-06-0217:36Drew VerleeThere are other solutions to this, references for one, but i would rather not move them out of context just because they're visually noisy.#2022-06-0217:37vemvaha so as you say you could add metadata, e.g. (def ^:fold chunky-data {,,,}) And then you'd make (def ^:fold part of a Hideshow mode regex My personal example https://github.com/zenmacs/.emacs.d/blob/cbe6088f8e8cd892b81c10cf9e2400f02b1942f7/lib/non-submodules/vemv.clojure-interaction.el#L60-L66#2022-06-0217:38Drew VerleeTy. Ill take a deeper look when I'm back at my computer#2022-08-3023:03felipebarros@U0DJ4T5U1 sorry to necrobump this. What I do is to have the built-in hs-minor-mode on and bind hs-toggle-hiding to an easy keybinding (I use C-c h). This way I can not only hide pesky huge maps but also branches in if statements that I have already dealt with. Just move right before it and toggle it. Pretty useful.#2022-08-3023:26Drew VerleeThanks @U6MEUHZBK I'll have to think about this on the weekend.#2022-09-0603:07Drew Verlee@U6MEUHZBK got around to looking at this again. Yeah hiding via hs-toggle-hiding is useful. i have been using "evil-toggle-hide" which seems to be the same thing. My idea was to add a more permanent kind of hiding, one that lasted between sessions. Not sure what form it would take it exactly.#2022-06-0307:43jumarI uses magit (with Spacemacs) and I'd like to open the status buffer in the same window I'm currently in. So when I say magit-status , it currently opens the status buffer in a different window. Can I change this behavior?#2022-06-0308:09practicalli-johnNot sure. Perhaps the universal argument, SPC u just before the command to open magit status? I.e. SPC u SPC g s Personally I set Magit to open "full screen" (a single window in the frame) as a git variable layer, when I q quit, the previous window arrangement is restored.#2022-06-0308:11jumarThe universal argument prompts me for selecting the git repo to be used. I didn't quite like opening magit in full screen so I disabled that a long time ago.#2022-06-0308:16mpenetnot sure magit can do that out of the box, people use shackle to do this in a generic way#2022-06-0308:17jumarThanks for the tip!#2022-06-0308:18mpenetactually there's magit-display-buffer-function#2022-06-0308:18mpenetif you check the source you can use alternatives#2022-06-0308:19mpenet(defcustom magit-display-buffer-function #'magit-display-buffer-traditional#2022-06-0308:19mpenetthere are others like s magit-display-buffer-same-window-except-diff-v1, magit-display-buffer-fullframe-status-v1, magit-display-buffer-fullframe-status-topleft-v1, magit-display-buffer-fullcolumn-most-v1 etc#2022-06-0308:20practicalli-johnThere is some info here about Magit and buffers https://magit.vc/manual/magit/Switching-Buffers.html#2022-06-0313:27daemianmackhow can i tweak helm’s string matching against candidates? TLDR: i’d like to weight candidates higher when my input is a (i know there may be a bunch of packages implicated here; my understanding of this part of emacs is shamefully poor.) here’s an example of what i’m trying to do…#2022-06-0313:28daemianmacki’m executing helm-projectile-find-file while in the clojure-lsp source. i type “db” because i’m trying to locate the clojure-lsp.db namespace. here’s what i see… “src/clojure_lsp/db.clj” is the second match, but i’d like it to be the first match, because “db” appears contiguously in the filename.#2022-06-1602:29Drew VerleeMaybe quotes around it (I'm guessing)? I feel like the functionality you want is the default on spacemacs..#2022-06-1814:47daemianmacksorry, missed this thread getting updated. looks like this does what i want… (setq helm-fuzzy-default-score-fn 'helm-fuzzy-helm-style-score)#2022-06-0721:57olafHow can I fix this behavior in parinfer? Am I missing some keybindings?#2022-06-1406:12Benjaminhttps://karthinks.com/software/avy-can-do-anything/#2022-06-1420:45dev-hartmannhey folks, I'm trying to merge two keymaps#2022-06-1420:45dev-hartmannI want to have a general one with lsp actions#2022-06-1420:46dev-hartmannand based on mode, eg cider add keys to same prefix#2022-06-1420:47dev-hartmannso super-c as a prefix for lsp and whatever mode specific keymap is defined#2022-06-1420:47dev-hartmannany idea how to do that?#2022-06-1420:48dev-hartmannI'd love to do it with transient somehow, but don't know if i can merge that#2022-06-1519:29Drew Verleehow do you get emacs and cider to respect project specific java versions?#2022-06-1914:06Ben SlessI usually use jenv#2022-06-2002:24Drew Verlee@UK0810AQ2 can you give me an example? I set my local jenv to 1.8 but cider jack in still gives me 1.11#2022-06-2002:24Drew VerleeDoes jenv just add .java version file?#2022-06-2003:54Ben SlessIn the project you need to run jenv local VERSION and it'll create a file pinning it locally#2022-06-2013:39Drew Verlee@UK0810AQ2 jenv local version is run from the project root directory and cider-jack-in from emacs still picks up a different version. Are you getting different behavior?#2022-06-2013:45Ben SlessYup#2022-06-2013:45Ben SlessWhat is the java command your emacs figures out?#2022-06-2013:45Ben SlessMaybe it's not using the jenv shim#2022-06-1519:36Cora (she/her)you could use https://github.com/purcell/envrc and set the right env vars in a .envrc#2022-06-1602:25Drew VerleeThis looks promising. Ty ty 😃#2022-06-1923:47Drew Verlee@U02N27RK69K this seems to work well enough for env vars and .evrc. ty very much.#2022-06-1923:49Cora (she/her)I'm so glad!#2022-06-2007:02HermannIf you want to take this one step up, you could combine it with nix to wrap all dependencies project-wise#2022-06-2217:05Benjamindoes anybody know how to silence native comp compile warnings? Or keep them but prevent the warning buffer from popping for them#2022-06-2217:09Benjaminwarning-suppress-log-types#2022-06-2217:11Benjaminnative-comp-async-report-warnings-errors docstring says it what I want#2022-06-2418:26Benjamin
(defun mm/cider-jack-in-with-an-alias-from-deps ()
  (interactive)
  (if-let* ((root (project-root (project-current t)))
	    (_ (file-exists-p (expand-file-name "deps.edn" root))))
      (let* ((default-directory root)
	     (my-alias
	      (completing-read
	       "Cider jack in with alias: "
	       (read-from-string
		(shell-command-to-string
		 (format "bb -e '%s'" (princ '(->> (slurp "\"deps.edn\"") read-string :aliases keys (map name))))))))
	     (cider-clojure-cli-aliases
	      (concat
	       cider-clojure-cli-aliases ":" my-alias)))
	(call-interactively #'cider-jack-in-clj))
    (user-error "no deps.edn file in project")))
I can't be the only one who wanted this
#2022-06-2419:02mpenetThat could be improved to also take into account the other aliases available (user level for instance).#2022-06-2419:02mpenetBut that's quite nice already#2022-06-2419:03dpsuttondidn’t the clojure cli add a new option to list all aliases?#2022-06-2419:05Alex Miller (Clojure team)clj -X:deps aliases but it's not very data oriented (if needed, would be open to an edn output option too)#2022-06-2419:07dpsuttonI remembered I had used it but didn’t find it in clj --help so I got a bit confused
Programs provided by :deps alias:
 -X:deps mvn-install       Install a maven jar to the local repository cache
 -X:deps git-resolve-tags  Resolve git coord tags to shas and update deps.edn
 -X:deps find-versions     Find available versions of a library
 -X:deps prep              Prepare all unprepped libs in the dep tree
#2022-06-2419:22Alex Miller (Clojure team)yeah, some of the docs are still lagging the newer stuff#2022-06-2419:03mpenetI personally just set cider-edit-jack-in-command to true#2022-06-2419:04mpenetYes it was added this week, good point#2022-06-2419:04dpsuttonalso, does this elisp code allow selecting multiple?#2022-06-2419:05dpsutton(just use a prefix when jacking-in will let you edit the command as well). Or stuffing all of the stuff cider wants into a profile (easily copy from the startup command in the top of the repl) and then just use terminal to start your process clj -M:dev:stuff:cider/nrepl and off you go#2022-06-2419:06mpenetIt can be done. Stuff like transient menus come to mind#2022-06-2419:06mpenetEx magit#2022-06-2419:06mpenetAlso dir-locals can be used#2022-06-2419:07mpenetBut in my experience cider-edit-jack-in-command is the least intrusive#2022-06-2419:07mpenetIt's just an extra RET when you don't edit the aliases and otherwise you're free to add whatever#2022-06-2419:32practicalli-john.dir-locals.el works fine for my workflow. I don't understand / relate to a use case for this. Are people frequently changing their aliases that it needs some picker? Is it because lots of different projects are being used and they all use different alias names ? Does this approach have to rely on external tools that may not be installed?#2022-06-2509:45Benjaminfor me the use case is when I have build or test aliases and I want to repl. If I have a dev alias it is covered with .dir-locals#2022-06-2510:09practicalli-johnIs there a reason the test and build aliases cannot be included in the .dir-locals.el configuration and loaded into the REPL on startup? Do they add significant resource overhead? I typically include the dev and test aliases in .dir-locals.el so I can run the cider-test runner (although I often use kaocha in watch mode in a separate terminal as well) I usually build from the command line (assuming I need to manually build at all - build is mostly done by continuous integration server or docker if its a local complex (AWS) environment) Maybe I am missing something...#2022-06-2514:19Benjaminyou are right putting all dev aliases in dir-locals would fix it#2022-06-2514:32practicalli-johnI was curious to know if there were common cases I wasn't aware of. I am aware Calva for VS Code has an alias picker, perhaps because the VS Code doesn't have an equivalent of a .dir-locals.el. Maybe a picker is useful for occasional user level aliases, although I have too many aliases for a checkbox style picker, unless it's coupled with a completion selector - although again it's probably easier to edit the .dir-locals.el#2022-06-2606:16BenjaminI always use completing-read or completing-read-multiple.#2022-06-2419:41mpenetThe 2nd one. Usually I use that when working on projects that have different naming conventions for their "dev" profile.#2022-06-2419:42mpenetWhich is quite rare indeed#2022-06-2517:58zaneAnyone know if it’s possible to disable the clojure-mode feature that indents comments with a single leading ; to a specific column?#2022-06-2523:32practicalli-johnYes, it is possible to switch off the single ; indenting. It's in my Spacemacs configuration, user-config I believe. It's a Cider variable. I'll dig it out when back at the computer tomorrow#2022-06-2523:32zaneThanks!#2022-06-2607:41yuhan`
(setq-local comment-column 0)
#2022-06-2607:41yuhan(https://github.com/clojure-emacs/clojure-mode/issues/516 for some context#2022-06-2608:24zaneThanks!#2022-06-2715:44lukaszI have a big, big git repo with multiple Clojure projects. Is there a way to make projectile and clojure-lsp aware of the individual (sub) projects? Right now both use the root of the git repository as project root and that messes many things up. I found some documentation about how projectile discovers projects but it's not obvious how to configure it. My google-fu is failing me, and what I'm finding is not really helpful 😢#2022-06-2715:51roltyou can put a .projectile file at the root of your subproject. For lsp it worked out of the box for me, my sub projects all have a project.clj file#2022-06-2715:52lukaszI'd rather not store any special files in the repo, other people on my team use different editors - I thought project auto discovery can be configured somehow#2022-06-2715:55rolti think the git repo takes priority, but maybe it's configurable. Also you can just add the .projectile file to your global gitignore#2022-06-2715:56rolthttps://docs.projectile.mx/projectile/projects.html#customizing-project-detection#2022-06-2715:58lukaszYeah, that could work. I've seen that that docs page and suggested changes didn't seem to work, but it might have been me doing something wrong - I'll give it another shot :thumbsup:#2022-06-2716:01rolteven if you swaitch projectile-root-bottom-up and projectile-root-top-down ? what's your "project specific file" ?#2022-06-2716:04ericdalloyou can use lsp-workspace-folders-remove and lsp to remove and add a project#2022-06-2716:05ericdallofixing projectile is not enough if you have lsp-mode thinking your project root is still the mono-repo root, so you need to do this ☝️#2022-06-2716:06lukasz90% of it is project.clj rest would be either package.json or Gemfile - all of them are part of projectile's default setup. And yeah, the order is (projectile-root-bottom-up projectile-root-local ...top-down....) I'll try the .projectile file approach#2022-06-2716:07lukasz@UKFSJSM38 ah, I didn't realize that lsp doesn't rely on projectile, then again - wouldn't it scan for project.clj in the same fashion as projectile?#2022-06-2716:11ericdallolsp-mode always guess the project root and prompt with a suggestion, but you can manually choose a different folder#2022-06-2716:12lukaszMust be something about my config because I only see a warning about 4000+ files being indexed :-)#2022-06-2716:13ericdallothat's lsp file watchers warning which can be customized as well#2022-06-2716:13ericdallolsp-workspace-folders-remove and lsp should help with configuring properly#2022-06-2716:13lukaszThanks, I'll give it a go :thumbsup:#2022-06-2716:25roltyou may have misread the doc: in your case you'd want projectile-root-local projectile-root-top-down projectile-root-bottom-up projectile-root-top-down-recurring but this may not play well with some other projects, so i'd use .dir-locals or .projectile anyway#2022-06-2717:47lukaszoh, I'll try that later :thumbsup: thx#2022-07-0320:18lukasz@U02F0C62TC1 ok, that did it for me, at least wrt projectile itself. Thanks!#2022-08-1817:09Chris ClarkI also have this problem in monorepos. I wrote up my solution, using way too many words, here: https://www.cfclrk.com/articles/projectile_root.html. I’d be interested in better ways to do this.#2022-06-2816:25Vinicius Vieira TozziI am using LSP in emacs to code Clojure and it works perfect, but when I open a ClojureScript project it does not work and I get the following error: File mode specification error: (json-object-format , 34) Any ideas on why is this happening? Thanks!#2022-06-2816:28ericdallothis is a error on emacs side, try toggle-debug-on-error and repro the error again to get a stacktrace#2022-06-2816:35Vinicius Vieira TozziI did it, but I can’t really interpret what’s happening:
Debugger entered--Lisp error: (json-object-format "," 34)
  signal(json-object-format ("," 34))
  json-read-object()
  json-read()
  json-read-file("/Users/tozzi/Projects/recipe-webapp-poc/package.json")
  lsp-volar--vue-project-p("/Users/tozzi/Projects/recipe-webapp-poc")
  lsp-volar--activate-p("/Users/tozzi/Projects/recipe-webapp-poc/src/recipe..." clojurescript-mode)
  lsp--supports-buffer\?(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode -0x10f8e60a0a5f712c>) :test\? #f(compiled-function () #<bytecode 0x1eaab965c7e2a0f>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x4a5986d5> :request-handlers #<hash-table equal 0/65 0x4a5f4ec7> :response-handlers #<hash-table eql 0/65 0x43a302bd> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x539acdbf> :action-handlers #<hash-table equal 0/65 0x539acddf> :major-modes nil :activation-fn lsp-volar--activate-p :priority 0 :server-id volar-api :multi-root nil :initialization-options #f(compiled-function () #<bytecode -0x10bc6736bf26aaab>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn #f(compiled-function (workspace) #<bytecode 0x89004ca9ed8999a>) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x4a5f4691> :download-server-fn #f(compiled-function (client callback error-callback update\?) #<bytecode 0x1730d1a6c7284d23>) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  apply(lsp--supports-buffer\? #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode -0x10f8e60a0a5f712c>) :test\? #f(compiled-function () #<bytecode 0x1eaab965c7e2a0f>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x4a5986d5> :request-handlers #<hash-table equal 0/65 0x4a5f4ec7> :response-handlers #<hash-table eql 0/65 0x43a302bd> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x539acdbf> :action-handlers #<hash-table equal 0/65 0x539acddf> :major-modes nil :activation-fn lsp-volar--activate-p :priority 0 :server-id volar-api :multi-root nil :initialization-options #f(compiled-function () #<bytecode -0x10bc6736bf26aaab>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn #f(compiled-function (workspace) #<bytecode 0x89004ca9ed8999a>) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x4a5f4691> :download-server-fn #f(compiled-function (client callback error-callback update\?) #<bytecode 0x1730d1a6c7284d23>) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  #f(compiled-function (&rest args) #<bytecode 0x1a4af9ff4e837cef>)(#s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn) #<bytecode -0x10f8e60a0a5f712c>) :test\? #f(compiled-function () #<bytecode 0x1eaab965c7e2a0f>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x4a5986d5> :request-handlers #<hash-table equal 0/65 0x4a5f4ec7> :response-handlers #<hash-table eql 0/65 0x43a302bd> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x539acdbf> :action-handlers #<hash-table equal 0/65 0x539acddf> :major-modes nil :activation-fn lsp-volar--activate-p :priority 0 :server-id volar-api :multi-root nil :initialization-options #f(compiled-function () #<bytecode -0x10bc6736bf26aaab>) :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn nil :before-file-open-fn nil :initialized-fn #f(compiled-function (workspace) #<bytecode 0x89004ca9ed8999a>) :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x4a5f4691> :download-server-fn #f(compiled-function (client callback error-callback update\?) #<bytecode 0x1730d1a6c7284d23>) :download-in-progress? nil :buffers nil :synchronize-sections nil))
  -filter(#f(compiled-function (&rest args) #<bytecode 0x1a4af9ff4e837cef>) (... ... ... ... ... ... ... ... ... ... ... ... ... ... ...))
  lsp--filter-clients(#f(compiled-function (&rest args) #<bytecode 0x1a4af9ff4e837cef>))
  lsp(nil)
  funcall-interactively(lsp nil)
  call-interactively(lsp record nil)
  command-execute(lsp record)
  execute-extended-command(nil "lsp" "lsp")
  funcall-interactively(execute-extended-command nil "lsp" "lsp")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
#2022-06-2816:38ericdallosounds like it's using lsp-volar instead of clojure :thinking_face:#2022-06-2816:40Vinicius Vieira Tozzihmm I don’t even know what’s this 😅 but if it helps, this is my config:
(use-package lsp-mode
  :init
  ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
  (setq lsp-keymap-prefix "C-c l")
  :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
         (clojure-mode . lsp)
         (clojurescript-mode . lsp)
	 (clojurec-mode . lsp)
	 (rust-mode . lsp)
	 (c-mode . lsp)
	 (go-mode . lsp)
         ;; if you want which-key integration
         (lsp-mode . lsp-enable-which-key-integration))
  :commands lsp)

(use-package lsp-ui :commands lsp-ui-mode)

;;Syntax checking
(use-package flycheck
  :ensure t
  :init (global-flycheck-mode))

;;For debugging
(use-package dap-mode)
#2022-06-2816:42Vinicius Vieira Tozziah I see, volar is for Vue.js, interesting that I can’t find any function trough M-x lsp-volar…#2022-06-2816:44Vinicius Vieira TozziI also tried creating a new shadow-cljs project and that seems to work fine, the LSP connects and it works just fine so I guess it is really something with my project#2022-06-2816:52ericdallohum, it seems like your lsp-mode is missing some elisp to load so#2022-06-2816:52ericdallotry recompile it#2022-06-2816:57Vinicius Vieira Tozzidumb question, but how do I recompile lsp-mode? or do you mean really recompile emacs?#2022-06-2816:58ericdalloare you using doom or spaceemacs os something like that or just vanila emacs?#2022-06-2816:58ericdalloif vanilla, are you using straight.el or something like that or just installing packages with package-install ?#2022-06-2817:00Vinicius Vieira TozziI am using straight.el#2022-06-2817:00Vinicius Vieira Tozziin vanilla emacs#2022-06-2817:02ericdalloso straight usually persits the compiled elisp somewhere in your .emacs.d folder#2022-06-2817:02ericdalloI think you can remove it#2022-06-2817:02ericdalloon doom-emacs, straight persists it here ~/.emacs.d/.local/straight/repos/lsp-mode#2022-06-2817:09Vinicius Vieira Tozziso just to be sure I deleted the correct files, I just deleted the whole .emacs.d folder and cloned from my repository again and after rebuilding everything it works just fine#2022-06-2817:10Vinicius Vieira Tozziperfect, thank you for the help!#2022-06-2817:11ericdalloCool!#2022-06-2818:07dpsuttoni forget the exact args and syntax but i do something to this effect: find -name *.elc | xargs rm . You can just remove the compiled files (elc) and then restart emacs#2022-06-2819:31Vinicius Vieira Tozziah ok, I thought there was some specific command, but this is good to know, thanks#2022-06-2817:54jjttjjI have org-babel working with inf-clojure. Is there a way to get paredit/clojure-mode working inside the the clojure code blocks? Is that supposed to work by default?#2022-06-2818:05aptI think you can use C-c ' for opening the code block in another buffer with the proper major mode#2022-06-2818:12jjttjjwoah cool, thanks!#2022-06-2819:02otfromI'd love to see your config for that#2022-06-2902:15jjttjjI just started messing with it today and jumbled this together from google results until it worked, not totally sure it will work if repeated
(require 'ob-clojure)
(setq org-babel-clojure-backend 'inf-clojure)

;;; might be a bad default?
(setq org-confirm-babel-evaluate nil)

(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (shell . t)
   (clojure . t)))
Then, in an org file:
#+begin_src clojure
  (println "hi")
  (+ 1 2 3)
#+end_src
And c-c to eval the result (in the current inf-clojure repl)
#2022-06-2908:02otfromThx!#2022-06-2920:30Drew VerleeDoes anyone know what to make of these messages/warnings?
Forge database needs to be updated.  Backup first? (y or n) y
Dumping Forge database to ~/.emacs.d/.cache/forge-database-v7-20220629-1529.sql...
helm-M-x-execute-command: Failed to dump ~/.emacs.d/.cache/forge-database.sqlite
#2022-06-3005:35Benjamincould go to the forge package and search for which command asks you to backup. Then check what it tries to do that does not work#2022-07-0113:34practicalli-johnI'd be tempted to not backup (and even delete) the forge database and start from scratch. It should only be information pulled from GitHub/GitLab, which can be retrieved again.#2022-07-0222:33Drew VerleeDo you know how to delete it? I saw mention of a file on one github issues, but i didn't have it.#2022-07-0309:31practicalli-johnThe error message says where it should be. If it's not there, search your filespace for a forge-database file. If not found, remove the magit forge package and restart Emacs.#2022-07-0311:28Benjaminalternatively there is a good chance you find it with apropos-user-option -> "forge" I bet there is a variable for the db path or alternatively searching for "filename" in the the forge package file 😅#2022-07-0311:31Benjaminhttps://github.com/magit/forge/blob/master/lisp/forge-db.el#L78 ah lol I found it by going to the repo#2022-07-0311:33Benjamin
(dired-jump t forge-database-file)
#2022-06-3005:36Benjaminany idea why in info mode those quoted characters render wrongly?#2022-06-3005:37Benjaminok checked with describe-char and I think the issue is the face has a familiy attribute Monospace Serif maybe I don't have such a face installed#2022-06-3005:40Benjamincan confirm it is fixed by setting the face family of fixed-pitch to "Monospace"#2022-06-3015:05aptHi folks. In clojure-mode, when I run sexp-at-point before parenthesis, it works. However, when I run it before a map, as in |{:foo :bar}, where | is the point, it returns nil. Why is that? How can I reliably get the next sexp?#2022-07-0108:16magnarsYou could try
(let ((beg (point))
      (end (save-excursion 
            (clojure-forward-logical-sexp)
            (point))))
 (buffer-substring beg end))
#2022-07-0113:41aptNice, thanks. I thought that each major mode defined its own sexp-at-point, but I suppose it’s not the case.#2022-06-3023:23Drew VerleeI feel like lsp and cider are fighting over showing me the function signature and they are both losing. Is anyone else getting behavior where it flips back and forth between what looks like one or the other?#2022-06-3023:24ericdalloCheck the conflict section https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#hover#2022-06-3023:30Drew Verlee@UKFSJSM38 thanks! ill give that a try.#2022-07-0201:22BenjaminAnyone here using corgi emacs with vertico/consult/embark and clojure-lsp?#2022-07-0216:37teodorluThe authors of Corgi and Clojure-LSP post here frequently. I've gotten great help with Vertico/Consult/Embart on the Doom Emacs discord. You might also be able to get help at the #doom-emacs channel. I suggest just asking - asking is allowed 🙂 Rationale - though I think the tone is a bit harsh: https://dontasktoask.com/#2022-07-0221:31otfrom@mitesh is working on some stuff with corgi#2022-07-0511:00oxalorg (Mitesh)Thanks @otfrom for the tag, I'm maintaining a literate org configuration with Corgi here in https://github.com/oxalorg/dotfiles/blob/master/emacs.d/init.org I also have vertico and consult working with Corgi but it needs this PR to work: https://github.com/corgi-emacs/corgi-packages/pull/10 Also working on a video explaining this file and going through some more basics of corgi. :dancer:#2022-07-0511:03oxalorg (Mitesh)cc: @U013TCGL92T#2022-07-0601:02BenjaminThanks @U013MQC5YKD! An init file is exactly what I was planning to ask about (and in the future, will do upfront; thanks @U3X7174KS for the dont-ask-to-ask link!) I'm hoping to at some point have a complete dev setup with guix/corgi/clojure etc., but time is precious so every bit I don't have to figure out myself is much appreciated. 😄#2022-07-0607:59otfromguix and use-package/corgi seem like a bit of a conflict to me. I've never really liked my OS managing my emacs packages for me.#2022-07-0617:13BenjaminHmm, I haven't gotten that far yet; I was assuming I could still use use-package and just leave out emacs packages from guix, but I have no idea if that's possible or not.#2022-07-0617:40otfromYou can. I think it is more of a design conflict than an implementation one#2022-07-0611:25oskarkvDoes anyone know if there is a way to get macros defined with macrolet to get indented like macros (or with a specific special indent style)? I want the indentation below, not (apply whatever args) lined up with x. (I'm using CIDER, if that matters.) Note, I want whatever I define with macrolet to always get indented like a macro (meaning second line indented 2 spaces, regardless of what's on the first line), whatever its name.
(macrolet [(wrapper [a b c]
             do-something)]
  (defn some-function [args]
    (wrapper x y
      (apply whatever args))))
#2022-07-0614:33Cora (she/her)you can play with define-clojure-indent to set the indentation for different things#2022-07-0614:33Cora (she/her)
(define-clojure-indent
    (defroutes :defn)
    (GET 2)
    (POST 2)
    (PUT 2)
    (DELETE 2)
    (HEAD 2)
    (ANY 2)
    (OPTIONS 2)
    (PATCH 2)
    (context 2)
    ;; (ns 1) ;; default ns indentation
    (ns '(1 0)) ;; intellij cursive's indentation of ns
    )
#2022-07-0614:40Cora (she/her)and here are the defaults https://github.com/clojure-emacs/clojure-mode/blob/b6f41d74904daa9312648f3a7bea7a72fd8e140b/clojure-mode.el#L1651-L1726#2022-07-0619:20oskarkvI know about define-clojure-indent, but I was hoping that I could get clojure-mode or CIDER to indent whatever I define with macrolet to get indented as macros, i.e. with the second and following lines indented 2 spaces no matter what's on the first line (with the macro name). With define-clojure-indent, as far as I know, I can only define the indentation for specified names, right?#2022-07-0620:06Cora (she/her)yeah, it seems like that's the case, that you need to define it yourself#2022-07-0620:09Cora (she/her)https://docs.cider.mx/cider/config/indentation.html#2022-07-0620:11Cora (she/her)clojure-lsp has some formatting stuff but I don't know if it's hooked in as deeply as cider and clojure-mode#2022-07-0620:17Cora (she/her)it looks like there's a way to indent using lsp https://emacs-lsp.github.io/lsp-mode/page/settings/mode/#lsp-enable-indentation#2022-07-0620:17Cora (she/her)but I'm not sure how to teach it about macros and what makes macros#2022-07-0620:21Cora (she/her)I know clojure-lsp uses clj-kondo under the hood, I wonder if you could use lsp-mode's indentation and then use clj-kondo's hooks to extend it to support your macro https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md#2022-07-0620:28Cora (she/her)looks like it'll use the clj-kondo hooks in the project and so if you write a hook for it you can hook in lsp indentation and you'll be good#2022-07-0615:51kingcodeIs anyone here familiar with Chemacs2?#2022-07-0618:28Cora (she/her)not familiar but it looks super interesting#2022-07-0621:30kingcodeI jave always been afraid to tinker and learn emacs in depth because of the awkardness of switching contents of .emacs.d, so this looks perfect, but I’m having trouble making it work with Emacs 27.2, but it’s fine with Emacs 29. Will try it out with 28.#2022-07-0623:20kingcodeAlthough, Emacs 29 does provide a startup option, —init-directory which essentially does the same thing. But it may be a while before a release 29, and so 28 may be the best option in unless I can figure out why I am having the problem.#2022-07-0623:46Cora (she/her)isn't emacs 28 when they first released early-init.el?#2022-07-0623:47Cora (she/her)iirc chemacs2 relies on that#2022-07-0700:39kingcodeI opened an issue and got a reply from @U07FP7QJ0 that it should work for emacs 27+. Yes indeed, emacs 27 does handle early-init.el. For now it works fine with emacs 28.1, which is a stable release. Will test it some more and install it.#2022-07-0700:55Cora (she/her)cool!#2022-07-0700:56Cora (she/her)28 is really nice#2022-07-0700:57kingcodeAwrigh’! Looking forward to emacs the 28.1 way :)#2022-07-0701:16Cora (she/her)you can compile things to native code in 28.1#2022-07-0701:16Cora (she/her)doom emacs does it for you automatically, it'a amazing#2022-07-0701:17kingcodeI have heard good things about doom. I prefer to keep it light to learn more easily though. Cheers.#2022-07-0905:33BenjaminChemacs works great recommend#2022-07-0616:51Konrad ClaessonDoes anyone know how to increase the JVM heap used by cider?#2022-07-0616:53dpsuttonCIDER does not dictate the jvm heap. It just starts up your project. Configure it as you normally would. If using the clojure command line tools you will need to put the :jvm-args in an alias and then ensure that CIDER also uses that alias (the one caveat to “CIDER doesn’t dictate”)#2022-07-0616:56Alex Miller (Clojure team)if using clj, you can instead do -J-Xmx512m or whatever#2022-07-0616:57Alex Miller (Clojure team)probably easier than making and using an alias#2022-07-0616:58dpsuttonah good point. Let me check if CIDER has a seam for that kind of thing#2022-07-0617:00dpsuttoni think you can setq or use dir-locals with cider-clojure-cli-global-options set to “-J-Xmx512m” as @alexmiller has pointed out here#2022-07-0617:01dpsuttonyeah there’s an example in the docs
(setq cider-clojure-cli-global-options "-J-XX:-OmitStackTraceInFastThrow")
#2022-07-0617:43Konrad ClaessonAdding
:aliases {:dev {:jvm-opts ["-Xmx32g"]}}
to deps.edn did the trick
#2022-07-0822:53Charles ComstockAdjust a feature to cljr-refactor, and I'm kind of struggling with the ecukes/espuds testing workflow. Specifically, I'm testing an interaction that triggers a completing-read, but the other tests that do that appear to use espud "active chain" to play back a keyboard macro. Unfortunately since the test is only checking the final buffer contents, it's not really clear if it's stuck in the minibuffer or something else midway through the macro playback. Does anyone have any hints or tricks for debugging that kind of test with ecukes/espuds?#2022-07-0900:56vemvStarting from this commit https://github.com/clojure-emacs/clj-refactor.el/commit/363b95c5d2855abc93ac011e9adc778cf7a773e5 we're giving preference to unit tests - more integration-y tests were painful to maintain. So as long as you can extract various logic to pure defuns, and have those defuns tested, your PR will be fine :)#2022-07-0900:56vemvI'll review it tomorrow or so#2022-07-0900:59Charles ComstockOk, cool, I can add some of those. It definitely changed existing behavior though, so I guess pre the code review the main question is does the change make sense? Worried it helps a lot for my use cases, but guessing by the couple failing integration tests there are a couple use cases I may have missed. Anyway, it's more of a feature spike at the moment, happy to tune all the other requirements if it's a suitable approach.#2022-07-0901:18vemvI took a very quick look so I still haven't grasped what it's about in my local copy I use ido-completing-read so I don't like the default behavior either :) but, I try to never inflict breaking changes, be it from UX or API point of view. So changes would have to go through defcustoms#2022-07-0901:19Charles ComstockYea I mean if we want the defcustom route, I can just make an alternate version of cljr-slash for folks to bind.#2022-07-0905:35BenjaminHave you ever seen a config where somebody made the minibuffer pop in center of the screen? Perhabs by creating a temp screen#2022-07-0906:39mpenetYes. It's done with posframe or other packages like that#2022-07-0906:40mpenetIf you use vertico there are a few options to do this#2022-07-0906:40mpenetIt's on their readme#2022-07-0907:38BenjaminI see cool#2022-07-0911:33Ben SlessQuestion for nix users, how would you run a process from nix env in a project in an already running emacs? Let's say my nix env defines the java version, how would you wire these things together?#2022-07-0912:18nbardiukI use direnv, it can set up nix shell when I cd into a directory. For emacs there is https://github.com/wbolster/emacs-direnv it should be able to load direnv setup into emacs, I haven't used it, maybe it could work for you.#2022-07-1017:02Karol WójcikHmm, I'm using corfu and for elisp the TAB expands a candidate and closes the popup. In LSP mode however the TAB doesn't close the candidates popup. Does anyone know how to ensure the same behavior for LSP as it's for Elisp mode?#2022-07-1109:51Karol WójcikRelated issue in LSP-mode repo: https://github.com/minad/corfu/issues/202#issuecomment-1180155000#2022-07-1023:09jasonjcknI’ve gotten tree-sitter-clojure working , but as far as I can tell it’s not being used to perform highlights even with tree-sitter-hl-mode enabled, for example if I do (set-face-foreground ’tree-sitter-hl-face:string …) there’s no effect in clojure-mode, and yet with other language I see the effect. Any suggestions, I wonder if other users have actually tested this.#2022-07-1213:47teodorluLearned some Emacs Lisp today! Possibly useful for non-expert Emacs users. Personally I'm finding it really motivating to solve small "friction points" in Emacs when some part of a task feels tedious. 1 - read-string reads a string. First arg is the prompt.
(let ((name (read-string "Please enter your name: ")))
  (message (s-concat "Hello, " name "!")))
completing-read lets you write or select from a list of options. First arg is the prompt, second arg is the list of options to select from.
(let ((dish (completing-read "What is your favourite dish? "
                             '(:pizza :pasta :red-hot-chili-peppers))))
  (cond ((equal dish ":pizza") (message "I also like pizza!"))
        ((equal dish ":pasta") (message "Pasta is good."))
        (:else (message (s-concat dish "? Doesn't sound familiar")))))
2 - Emacs lisp
| let    | scope      | example                                  |
|--------+------------+------------------------------------------|
| `let`  | in         | `(let  ((x 1)            ) (message x))` |
| `let*` | in or down | `(let* ((x 1) (y (* x 10)) (message y))` |
(based on working notes at https://play.teod.eu/emacs/#2022-07-12 for learning emacs. working notes contain a bit more context / motivation.)
#2022-07-1214:45BenjaminDoes anybody have opinions on logseq, obsidian or org-roam. Or does anybody have a setup of using one of those via emacs?#2022-07-1214:46Benjamintrying logseq. I like some things about expecially the prospect of writing datalog queries. But honestly it's just a little bit clunky and I feel silly as emacs user to interact with that.#2022-07-1214:57otfromI've been pretty happy with org-roam so far, but I don't use massive amounts of the features beyond dailies and capturing#2022-07-1215:08Karol WójcikI’m using org-roam on desktop and LogSeq on mobile. LogSeq works much better for me than Obsidian and I hope additional features improving the org roam compatibility will land soon.#2022-07-1216:24pavlosmelissinosI mostly use org-roam for dailies and some notes here and there but I've been planning for a while to have a zettelkasten-like workflow. I believe it delivers, haven't had any issues in general except for one feature: it doesn't carry over unfinished items to the next day (like org-agenda does) > Or does anybody have a setup of using one of those via emacs? Do you mean like a technical guide (like will an init.el do?) or are you looking for workflow ideas?#2022-07-1216:35pavlosmelissinosAnyway, here's https://github.com/PavlosMelissinos/dotfiles/blob/e2c8b4f3f4db3fa254100044b5292a859fe32797/.config/emacs/init.el#L659-L688. As for a workflow, I'm still on the lookout but I recommend https://takesmartnotes.com/ if you're looking for a new perspective. It's very dense writing and has a refreshing take on note-taking.#2022-07-1217:11teodorluI've gotten a lot of value out of Org-mode, Roam Reasearch, and a bit of Org-Roam. The core concept of organization -- no hierarchy, strong entities, strong linking and a bias to start with "daily notes"/"temporal indexing" -- has probably changed how I take notes forever. > Does anybody have opinions on logseq, obsidian or org-roam We can probably talk about this for multiple evenings, so I'll try to narrow. Roam (very similar to logseq) Good: I find Roam to be excellent for idea capture, and general note taking. Zero threshold to start writing, easy to compose ideas. Good to build entities for ideas, good to see which entities / ideas connect to which. Bad: Little control over how content looks for sharing with others. The heavily hierarchical structure I typically use is hard to read. Bad: Less effective than Emacs for straight text editing. Bad: Harder to extend than Org-mode files. Good: just paste images / embed media, and it works. Org-mode / org-roam Excellent for extensibility. I'm building https://github.com/teodorlu/play.teod.eu on top of Org-mode, pandoc and some babashka scripts. I love the flexibility. But I don't even try doing anything with it from mobile. Right now, I'm not techically using org-roam to link those org-mode files together, but I think it should be possible. Conclusion (subjective) I'm really happy with Roam (logseq) on mobile and for nontechnical note taking. But for files I want to publish, I'm not replacing Emacs Org-mode/Org-roam any time soon. I don't see this as an either/or question -- I like both Roam and Org for what they give me. And I also find the exercise of moving ideas from deep nesting (Roam) to a "flatter narrative" (Org).#2022-07-1217:14soulflyerI went with the zetteldeft instead. Simpler and works well with org files...#2022-07-1217:21teodorlu@U0E3H1J5Q I'd never heard zetteldeft before now. Really curious about why you're liking it better than Org-roam 🙂#2022-07-1217:25soulflyerMostly it evolved that way. I went from Notational velocity to Deft to Zetteldeft. Tinkered with org-roam along the way, but I just liked the way zetteldeft worked. Not having a db, just a collection of .org files is a bonus I think.#2022-07-1217:27agI've never heard about Zettelkasten (method) before. Nor I knew about Obsidian or Logseq or any other alternatives. At some point, I decided to check out Org-Roam manual. It starts with that book, "How to take smart notes". I decided to read the book and use Org-Roam for note taking. Like Richard Feynman once said: "Notes aren't a record of my thinking process. They are my thinking process". I used vanilla Org extensively and the decision to make that leap of faith wasn't easy to make. I backed up all existing .org files of mine and jumped into Org-roam. And now I love it. I stopped worrying about organizing my notes; before Org-Roam that was the itch I had to scratch from time to time. Turns out - no hierarchical systematization, be that several levels of outlining, date-trees, single-file, multi-file, active & inactive time-stamps, tags, properties, or extensive use of Org-Agenda really help you find the relevant information. Turns out, whenever I create a single unit of knowledge - a note, a zettel, a document, etc., I just have to ask myself a single question: "in what context do I want to re-discover this piece later?". And it doesn't matter where this note is stored - in a separate file or as a subheading. I can now find relevant stuff very quickly. It happens to me all the time, during a meeting, someone starts remembering a fact: "I think John mentioned two months ago something about this vulnerability...", I'd switch to Emacs and quickly find everything that John was talking about. Unless I decided not to write it down. And I say: "if I can't find it in my notes, this shit has never happened..."#2022-07-1217:39teodorlu> a note, a zettel, a document @U0G75ARHC - Would you care to define the difference between a note, a zettel and a document? (I feel like we've had similar experiences with flat note taking systems 😄)#2022-07-1217:46teodorluDo they map to fleeting notes, permanent notes and project notes as defined in How to Take Smart notes? (below)#2022-07-1217:50ag@U3X7174KS For me right now, there's no semantic difference. I just needed a quick method to link things to each other. Since I'm using Evil (currently Doom), I even mapped [[ in insert mode to org-roam-node-insert and [ SPC to insert a normal square bracket (pair of brackets to be precise). While typing stuff up, I'd occasionally press [[ and link it to something else. There's an endless debate about how to use tags, and filetags. I instead decided to ignore tags completely. For me, everything is a link - is it some kind of status of the thing e.g., TODO? - Link it to the "category note 'TODO'"; is it a place, or has an association with a person - link it. Yes, I have .org files like "people" and "colleagues". Is it a quote from a book? I have http://books.org.#2022-07-1217:52agWhenever I no longer wish to see the connection, I'd just add ROAM_EXCLUDE: t property#2022-07-1217:54teodorluThat makes sense. Thanks for explaining!#2022-07-1218:18mpenetorg-roam here. Having the ability to use org babel and make notes source blocks eval'able and depend on clj/java libs is awesome, especially for work related stuff#2022-07-1218:47agI have just a couple of things missing in Org-Roam that would be a bit difficult to implement on my own. One of them is the way to find notes related to multiple other notes. e.g., If I want to see notes related to "Lisp", I'd just open the backlinks buffer. But If I, for example, want to filter notes at the intersection of "Lisp", "Type Theory" and "Formal logic", Org-Roam doesn't currently have a good way of doing something like that. Another missing thing is the mobile access. Existing Org apps (at least on Android) don't have a good UI oriented for searching through great number of .org files. Most of them are oriented for vanilla Org-mode workflow, where things are organized around smaller number of files.#2022-07-1219:16Andrea@U0G75ARHC actually I thought to implement that intersection thing, but I settled on using projectile ag (the silver searcher), which allows you to search strings in files. It works quite smoothly: you would search Lisp and Type Theory and it would show you the files. (Sure the filenames are not the best to read, but good enough)#2022-07-1219:22agWell, yes. That's what I've been using. I have around a thousand notes right now. I wonder what happens when this number grows to let's say five thousand?#2022-07-1221:02Andreastill works fine 😉 I mean these fancy grep programs are pretty fast nowadays#2022-07-1218:15otfromThis is the kind of off topic day I live for#2022-07-1218:36teodorluI think there's a strong correlation between Emacs users and people who think by writing. Not quite sure why.#2022-07-1218:53agI guess that most Emacs users aren't beginner programmers. Beginner programmers tend to focus on writing code. With experience, later they learn - to be a successful programmer one has to learn not a single (or multiple) programming languages, but has to become fluent and expressive in a single language - English. I have not seen this amount of regard for the written language in any other system, editor or IDE. Look how many thesaurus and spell-checking packages we have on MELPA alone.#2022-07-1913:13teodorluCame over a nice article that supports your point about the effectiveness of writing. https://staysaasy.com/management/2022/07/10/Writing-Management.html#2022-07-1915:11agFunny, but even I, a non-native English speaker know that the proper title would be: "Good managers write well"...#2022-07-1915:15agI guess the author deliberately chose to construct it that way, to make it a bit more clickbaity...#2022-07-1916:15teodorluThe same struck my norwegian head 😄 At the same time, I kind of like it. Sounds kind of brutalist. Like a rock. "Throw rocks. Write it good."#2022-07-1917:16ag"Kill a beaver. Save a tree"#2022-07-1918:12Cora (she/her)definitely click-baity title#2022-07-1918:14Cora (she/her)but in a good way 😊#2022-07-2202:53Drew VerleeI usually know I'm in trouble when i sense the person I'm talking to feels they have found the one true way to communicate. E.g Using Jira, only reply in threads, the Oxford comma, xyz note taking app, every sentence should start with "given x then y", etc...#2022-07-2209:40teodorluI get the same bad feeling talking to developers who have found the one true way. I mean, don't they care about what they achieve with the code / text they write?#2022-07-2212:14Cora (she/her)ok, but, the oxford comma.... #2022-07-1219:00agToday I use flyspell, lsp-grammarly, google-translate, sdcv-mode, mw-thesaurus, define-it, langtool, writeegood-mode and some other packages and quite a few handwritten functions to manage all my writing in Emacs. And I'm not even mentioning things like separadit (for editing comments in indirect buffers) I don't remember ever trying to set up even a portion of these capabilities in any of the numerous editors I've used before.#2022-07-1913:13teodorluCame over a nice article that supports your point about the effectiveness of writing. https://staysaasy.com/management/2022/07/10/Writing-Management.html#2022-07-1301:58Drew VerleeThings i like ~ how much functionality is jammed into emacs! things i don't like ~ hitting some keys by accident and having emacs take up 100% of my cpu trying to do i have no idea what.#2022-07-1311:13teodorluI feel you! 😊😄😂#2022-07-1312:51lreadYeah me too! How'd we get here fingers? And how do we get outta here?#2022-07-1304:12ag> hitting some keys by accident and having emacs take up 100% of my cpu pkill -SIGUSR2 Emacs#2022-07-1311:12teodorluDoes this just abort the execution of the current Emacs Lisp command?#2022-07-1816:45agit just forces Emacs to enter the debugger. See Info for debug-on-event https://www.gnu.org/software/emacs/manual/html_node/elisp/Error-Debugging.html#index-debug_002don_002devent#2022-07-1304:14agI've been dreaming for someone (smarter than me) to port something like core.async to emacs-lisp.#2022-07-1305:47Benjaminhttps://github.com/jwiegley/emacs-async @ag i guess you knew about this. I think the big draw back is you have to import code you want to use in the async process. So it isnt at all like core async. Consult for example uses it in searches#2022-07-1317:55agOh I didn't know Consult uses emacs-async. I wanna dig through the source code when I get a chance. I'm curious.#2022-07-1314:06teodorluHey! Quick question. With #babashka it's easy to transform some EDN:
$ echo '{:title "Good morning"}' | bb '(assoc *input* :title "Good afternoon")'
{:title "Good afternoon"}
I want to write an Emacs Lisp function that mutates the current buffer containing some EDN, and change it to some other EDN. Something like this:
;; Current buffer contains:
;;
;;    {:title "Good morning"}

(defun edn-good-afternoon ()
  (interactive)
  (shell-command-transform-buffer "bb" "(assoc *input* :title \"Good afternoon\")"))

;; run M-x edn-good-afternoon

;; Current buffer now contains:
;;
;;    {:title "Good afternoon"}
Is there a function I can use that roughly the same as the imaginary shell-command-transform-buffer? --- If I were to try right now, I would: 1. Read the content of the current buffer 2. Construct the same echo {,,,} | bb ... command above 3. Write that result back to the same buffer. I'm suspecting there's a better way. Pointers much welcome!
#2022-07-1314:19teodorlucall-process might work https://www.gnu.org/software/emacs/manual/html_node/elisp/Synchronous-Processes.html#2022-07-1314:30teodorlucloser:
(shell-command-on-region (point-min) (point-max) "echo lol" (current-buffer))
#2022-07-1314:32teodorluduckie 🐧🎉
(defun teod-play-xx ()
  "Play."
  (interactive)
  (shell-command-on-region (point-min) (point-max) "bb '(assoc *input* :title \"Good afternoon\")'" (current-buffer)))
#2022-07-1315:37teodorluI did a bit of more work. Problems with the solution above: 1. Can't edit structure inside text string easily 2. A bit of noise around point-min, point-max and current-buffer. So I created t-bb (macro) that takes an Emacs lisp form and turns it into a babashka shell invocation, and a simplified "run stuff on buffer. Here's the example above -- revised:
(defun teod-play-xx ()
  "Play."
  (interactive)
  (t-shell-command-buffer
   (t-bb (assoc *input*
                :title "Good afternoon"))))
Pasting the source of t-bb and t-shell-comamnd-buffer as well:
(defun t-str (&rest xs)
  "Join XS into string."
  (apply #'s-concat
         (mapcar (lambda (s)
                   (format "%s" s))
                 xs)))

(defun t-bb-fun (form)
  "Convert quoted FORM to Babashka shell invocation."
  (t-str "bb " "'" form "'"))

;; Example:
;;
;;   (t-bb-fun '(assoc *input* :message "Hello!"))

(defmacro t-bb (form)
  "Convert FORM to babashka shell invocation."
  (list 't-bb-fun (list 'quote form)))

;; Example:
;;
;;   (t-bb (assoc *input* :message "Hello!"))

(defun t-shell-command-buffer (command)
  "Run COMMAND on current buffer."
  (shell-command-on-region (point-min) (point-max)
                           command
                           (current-buffer)))
#2022-07-1315:38teodorlut-bb-shell-command might be a better name than the plain t-bb.#2022-07-1317:43BenjaminI recently crafted something with princ as the thing to pass into bb -e. I wrote t-bb in terms of it
(shell-command-to-string (format "bb -e '%s'" (princ '(+ 1 2 3))))

(defmacro t-bb (form)
  `(format "bb -e '%s'" (princ ',form)))

(shell-command-to-string (t-bb (+ 1 2 3)))

(defun eval-bb (form)
  (car
   (read-from-string
    (shell-command-to-string (format "bb -e '%s'" (princ form))))))

(+ (eval-bb '(+ 1 2 3)) 10)
16
I'm currently thinking that the last function is just good enough
#2022-07-1317:45Benjaminfor reference t-str can be written in terms of mapconcat
(defun t-str (&rest xs)
  "Join XS into string."
  (mapconcat (lambda (s) (format "%s" s)) xs ""))
#2022-07-1318:46teodorluhttps://clojurians.slack.com/archives/C099W16KZ/p1657734204817869?thread_ts=1657721213.601949&amp;cid=C099W16KZ Nice! That's bb directly in Emacs Lisp 😄 I guess it would crash if you tried to return a map or something though?#2022-07-1318:50BenjaminYea its naive and expects elisp readable output. You could either drop the read string part or return a string from bb if you want a string. Eg for insert#2022-07-1508:21Benjaminusing vertico, consult and embark. Do you have a way to narrow down in completing-read-multiple and then just say "everything I just narrowed down"#2022-07-1508:22Benjamin
(completing-read-multiple "fo: " '("foo" "bar" "fofo"))
I like to just type fo and then get "foo" and "fofo"
#2022-07-1508:32Benjaminsort of a legendary flow for me would be to export with embark, then mark what I want in the export buffer and then be able to continue the completing-read-multiple call.#2022-07-1508:58mpenetyou can somewhat do that#2022-07-1508:59mpenetyou can embark-export, then use consult-line on the export buffer and export again etc etc#2022-07-1508:59mpenetwell it's not marking#2022-07-1508:59mpenetand what I am suggesting works better with narrowing actually, so not sure it makes sense#2022-07-1509:00mpenetheh in short ignore me 🙂#2022-07-1509:03BenjaminI realized for my use case, multi occur; I already have the legendary flow by doing consult-buffer -> export with embark and using ibuffer occur on the export buff.#2022-07-1509:32djmIf I try consult-buffer + embark-export, and then run ibuffuer-do-occur, I get “Assertion failed: (derived-mode-p ’ibuffer-mode)“. Am I doing something different to you?#2022-07-1509:35Benjaminyou probably export with a mix of completion "kinds" and don't get an ibuffer buffer. By default in consult you can do b space to only get buffer completions, then embark export will make an ibuffer export buffffer#2022-07-1509:38djmYes, that was it. multi-occur-in-matching-buffers seems like a quicker way of doing roughly the same thing though#2022-07-1510:05otfromthese are sounding like good modern emacs configs. Do you have them shared anywhere?#2022-07-1510:05otfromI'm trying to make the move to vertico/consult/embark in my latest config#2022-07-1510:06mpenetMine is at https://github.com/mpenet/emax#2022-07-1510:06otfromthx!#2022-07-1510:06otfromand with an install script ❤️#2022-07-1510:08mpenetThe install script is for emacs itself#2022-07-1514:03Benjaminhttps://github.com/benjamin-asdf/dotfiles/tree/master/mememacs/.emacs-mememacs.d no install script
#2022-07-1514:06djmhttps://github.com/benjamin-asdf/dotfiles/blob/master/mememacs/.emacs-mememacs.d/lisp/init-project.el#L38= consult commands never seemed to work properly with project.el for me, although it’s been a while since I tried#2022-07-1514:07Benjaminit works nicely, maybe they fixed something. Also I use consult-project-extra it's great#2022-07-1514:08djmconsult-ripgrep seems to work now 🤷#2022-07-1514:08mpenetworks for me as well, I just had to set a consult-project-root-function, but I am not even sure that's still necessary#2022-07-1514:10djmMy project root function combines project.el and perspective, so e.g. if I’m looking at a scratch buffer, it still knows what the project is#2022-07-1514:17djmInteresting - consult-ripgrep and consult-project-extra-find work fine when switching projects, but consult-buffer doesn’t get the project root, and so doesn’t show project buffers/files.#2022-07-1514:24Benjaminconsult-buffer is for me for all buffers, consult-project-extra-find is for buffers and files in current project#2022-07-1514:25djmIf you run consult-buffer, and then type “p “, what happens?#2022-07-1514:25Benjaminempty#2022-07-1514:25Benjamindidn't know that was a feature 😛#2022-07-1514:26djmOh, I thought it would narrow to project buffers and files: https://github.com/minad/consult#virtual-buffers=#2022-07-1514:27djmWorks on my machine 😁#2022-07-1514:27Benjaminconsult--default-project-function does the right thing though#2022-07-1514:28djmAre you in a project? Do “f ” and “b ” work?#2022-07-1514:28Benjaminyes they work#2022-07-1514:29djmGiven all of the stuff consult-buffer does around this, I’ve never been sure what consult-project-extra provides that consult-buffer doesn’t, although I do have it installed.#2022-07-1514:29djmBut now that I know it works nicely with project switching, I finally have a use for it 😁#2022-07-1514:29Benjaminhehe#2022-07-1514:29djmI spent ages in the past trying to get consult-buffer working with project.el, so this is a nice win!#2022-07-1514:30Benjaminyea you might be right that consult buffer has the power already (with "p ")#2022-07-1514:31djmI setup consult-buffer to be automatically narrowed to project (+ perspective) files and buffers#2022-07-1514:31djmSimilar to https://github.com/minad/consult/wiki#start-command-with-initial-narrowing=#2022-07-1514:34djmMaybe my version is does more though, as it combines perspective buffers and project files. Now I understand why consult-project-extra exists - it’s solving the same problem in a different way.#2022-07-1514:57solfIs there something like cider-inspector for emacs-lisp?#2022-07-1515:00solfAh, just found out https://github.com/mmontone/emacs-inspector#2022-07-1710:52BenjaminDo you know how to achieve separating display and data with completing-read ? (I use consult and vertico). I like to pass in stumpwm window data, the display should be the window title but the return of the completing-read call should be the full data. Irrc with helm you could pass for instance a cons cell with (DISPLAY . DATA) or similar#2022-07-1711:04Benjaminlol easy#2022-07-1711:33teodorluLooks like my phone can't handle your video format =/#2022-07-1712:49Benjamindamn. Maybe I can fix it#2022-07-1712:58teodorluWorks perfectly fine on my PC, though. So perhaps Slack's fault, not yours 🙂#2022-07-1712:58teodorluWindow selector from within Emacs is a neat idea :thinking_face:#2022-07-1713:00teodorluwas the motivation for your question getting the "2306..." stuff out from completing-read? Is that your WM window ID?#2022-07-1713:01Benjaminyes#2022-07-1713:02Benjaminwell I first wanted to only display the title without the idd#2022-07-1713:02Benjaminor I'm still interested in how to achieve that#2022-07-1713:02Benjaminprobably with advance completion metadata - maybe#2022-07-1713:29aptYou can manually build an alist with the display->data info. Then, use the display part for feeding completing-read, and the whole alist again for getting the corresponding data for the chosen input.#2022-07-1720:31ag@U02CV2P4J6S are you talking about completion annotations? you can use completion-extra-properties to show additional data for completions.#2022-07-1720:34agit may feel not very straightforward (even after reading the docs) https://www.gnu.org/software/emacs/manual/html_node/elisp/Completion-Variables.html you can see for example how the annotations get set in babashka/neil. https://github.com/babashka/neil/blob/main/neil.el#L109#2022-07-1809:00otfromI'm trying to make a library that configures a number of things around vertico. I'm using use-package in the library and then calling it in using use-package and straight. It doesn't seem like anything under the :config keys in the package code is being called though. Any idea what I might be doing wrong?#2022-07-1809:02otfromI've created an init function here: https://github.com/MastodonC/kixi-emacs/blob/master/kixi-emacs.el#L582-L584 that does some of the work in the config bits and that seems to work if I put call it from the :config section of my init.el. Do I have to do that for all the :config sections here?#2022-07-1815:52ag> It doesn't seem like anything is being called afaik by default, everything is lazy-loaded. i.e., :defer t. You may need to tweak :after or :commands key.#2022-07-1816:10otfromthx#2022-07-1816:36agI wonder if there's a good way of diagnosing straight.el loading order.#2022-07-1816:42otfromfundamentally, I think my problem is I'm trying to create a package, but idk#2022-07-1816:42otfromI'm learning more about use-package and straight than I really wanted to 😉#2022-07-1809:00otfromhttps://github.com/MastodonC/kixi-emacs#2022-07-2009:39otfromsweet, got vterm working in my emacs from git#2022-07-2015:17otfromanyone here have a good emacs setup that shows off a lot of evil and general?#2022-07-2015:28otfromlooks like I should create a definer per mode? https://gitlab.com/magus/mes/-/blob/main/mes-org.el#2022-07-2015:30otfromI'm struggling a bit with overriding keymaps, maps just for modes, and maps for minor modes. I think I'm almost there with something working, but I feel I'm cargo culting across a few configs#2022-07-2016:20Hans Conradrecently started my own config..and ran into issues.. so I'll be curious to look at yours.. I can share mine later..but def nothing to write home about as it is still WIP 🙂#2022-07-2016:21otfrommine is a bit of a mess compared to some of the other ones I've done: https://github.com/otfrom/bld-kixi-emacs#2022-07-2016:22otfromthe shared evil defaults are in here: https://github.com/MastodonC/kixi-emacs#2022-07-2016:22otfromI'm pretty happy that I have vterm running, and the overall config is good for running in a terminal. corfu completion and docs even work in the terminal, which I'm pretty happy about#2022-07-2016:30Hans Conradrecently got vterm running as well..i twas the last piece missing for me to switch away from using tmux and emacs terminal client...#2022-07-2016:31otfromI'm using emacs in a terminal in tmate so that I can pair program. I worry a bit about running emacs inside vterm to pair, but I've not tried it yet#2022-07-2017:01Hans Conradoh I see...I'm using vterm inside of emacs..so my terminal apps behave correctly (things like pgcli ..didn't behave well in the regular term)#2022-07-2017:02Hans Conradtmate sounds interesting..haven't used it..need to look into that#2022-07-2017:04otfromyeah, I'm using vterm for running things like htop#2022-07-2017:30kpavMy config uses evil and general pretty heavily https://github.com/kwpav/emacs-config#2022-07-2019:26Cora (she/her)other than doom emacs??#2022-07-2021:10otfromDoom felt too big to get my head around, but I might look for some inspiration there#2022-07-2021:11otfrom@U01GQNJFP6U your config looks similar to the kind of thing I'm aiming for#2022-07-2021:16kpavAwesome! Yeah I tried out spacemacs and doom a bit, but wanted something...simpler I guess. My config is definitely inspired by both of those though. I recently discovered https://github.com/SystemCrafters/crafted-emacs as well which seems to be going for a similarly simple approach#2022-07-2021:18kpavI've been (very) slowly working on https://github.com/kwpav/basemacs , which is what I'm using for my own config as well#2022-07-2021:20otfromI've been reading/watching that as well. I'm trying to create a small enough package or group of packages that can be brought into my config or my team mate's config so we can pair on clojure in a terminal running tmate, but I want to be able to put my own stuff in my own config (RSS, mastodon, org-roam, etc)#2022-07-2021:21otfromDoom/prelude/spacemacs just have too much to get my head around if I want to do something different#2022-07-2021:21kpavah yeah thats an interesting use case for sure#2022-07-2021:23kpavI used a python package in the past that basically did that, combined and configured a bunch of packages to create a nice environment for python stuff#2022-07-2022:28ag> Doom/prelude/spacemacs just have too much to get my head around if I want to do something different Try Doom without any "official" modules. Then you can build your own modules. Doom's core actually not that big or super complicated. But it has a good foundation for you to build your own thing. I use Doom official modules very sparingly, and whenever I add any to my config, I would always check what packages the module brings. And would remove anything I don't need. In that sense, Doom is better than Spacemacs. Spacemacs sometimes has very tight integration between its parts; and removing one thing doesn't guarantee the flawless behavior of other packages.#2022-07-2022:31Cora (she/her)that's an interesting use of it and I can very much see how it could be done#2022-07-2022:35agWhat's called Modules in Doom, in Spacemacs they call them Layers. They are structured differently, essentially they are just collections of packages. I stopped using Spacemacs because the maintainers kept changing things in the core layers, "breaking the API". And that was quite a bit annoying. Also, as I said, Spacemacs very often has tighter integration between layers and packages, sometimes just removing a single hook may have unexpected consequences. Doom doesn't do shit like that. It doesn't try to overwhelm you with features. Spacemacs puts "too many pizzas in the oven". It feels nice at first, but then it becomes very annoying to have to keep removing stuff you didn't ask for.#2022-07-2022:36Cora (she/her)and also debugging what went wrong in spacemacs was always a nightmare for me#2022-07-2022:38Cora (she/her)also really dislike spacemacs config setup but maybe they've improved that since I used it last. greatly prefer doom's and not using customize#2022-07-2022:38agIt's important to note that just like with Doom right now, I tried to use only core of Spacemacs. I used the base, and built my own, custom layers on top. But still - it was much more than I wanted.#2022-07-2022:40ag> debugging ... in spacemacs was always a nightmare for me I agree. Figuring out when something breaks in Doom is a lot simpler process.#2022-07-2022:47agalso, Doom adds very nice macros like map! add-hooks! defadvice!, cmd!, etc. Sometimes, I feel those macros should be added to core Emacs. That's how cool they are#2022-07-2023:27Cora (she/her)the map! with mode-maps and especially evil is just so so so so nice#2022-07-2023:36Cora (she/her)I'm not familiar with cmd! though looks it up#2022-07-2023:40Cora (she/her)oooooh heck yeah#2022-07-2023:40Cora (she/her)lots of great macros in here https://github.com/doomemacs/doomemacs/blob/master/core/core-lib.el#2022-07-2023:41Cora (she/her)oh and after! is nice#2022-07-2112:19otfromhmm.. how do I add a file to org-id-locations-file. Just edit the file directly? https://emacs.stackexchange.com/questions/62287/org-id-find-unable-to-find-existing-id#2022-07-2112:29olyAnyone have any suggestion on this question ? https://www.reddit.com/r/Clojurescript/comments/w1183q/emacs_running_buildedn_at_jackin/#2022-07-2121:34ericdallo😂 https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00565.html#2022-07-2211:03otfromI think I got my general.el keybinding issue sorted out, but I've done it by not using , c as the prefix but instead , ; which is feeling a bit... spooky gas to me#2022-07-2213:21pppaulanyone having issues with indenting in clojure-mode after last release?#2022-07-2213:24pppaulmaybe just some weird state i got into, but somehow my indenting completely broke (auto indenting stopped working, highlight region and indent stopped working). resetting clojure-mode on the buffer got things working again, but i've never run into something like this in ~10 years of using clojure on emacs#2022-07-2222:19Drew VerleeIs there a way to search the git log/changelog of clojure libs from a project without traveling to a web browser? if i visit the code in my app it takes me to the m2 cache which as far as i know isn't git/github aware.#2022-07-2222:30agThat's an interesting thought. I guess it's probably possible to write a package that would query maven/clojars and fetch repo location, to allow operations like git-grep/blame/etc.#2022-07-2223:07Drew VerleeYea. I'm going to look around. If it doesn't exist, maybe i can do something.#2022-07-2306:23mpenetThere's git timemachine#2022-07-2306:24mpenetBut you would need to go to the gitlibs dir#2022-07-2609:31jumarThis is an interesting idea but I think a rather rare use case. Why/when do you want to do that? Occasionally, I have a similar need but then it's quite easy to simply find it on github and display the history through their UI.#2022-07-2617:31agThat's basically the essence of the task - figuring out the host URL of the git forge for the lib. And the rest is very simple - you just need to concoct the git-blame-URL. For GitHub/GitLab it would be like .../blob/blame.... There's a package: https://github.com/sshaw/git-link. Here's a tiny extension to it I use:
(defun git-link-blame ()
  (interactive)
  (cl-flet ((git-link--new* (x) (replace-regexp-in-string "/blob/" "/blame/" x)))
    (advice-add 'git-link--new :override #'git-link--new*)
    (let ((link (call-interactively 'git-link)))
      (advice-remove 'git-link--new #'git-link--new*)
      (git-link--new link))))
You run it in a file - it will produce the git-blame link. It even works for selected region.
#2022-07-2617:34ag> Why/when do you want to do that? What do you mean "why"? Emacsen rarely ask that question. "Because I want that shit. That is why..."#2022-07-2617:35jumarBut Clojurians often ask that question- that's why I ask why#2022-07-2617:39agHehehe. Yah, totally. I constantly have to deal with my inner Emacsen and Clojurist fighting. One wants to write some emacslisp all the time (because I want that shit...). The other one wants to stay pragmatic and avoid writing code as much it is possible (you aren't gonna need it).#2022-07-2618:47Drew VerleeIn this case I had updated from clojure 1.8 to 1.9 which caused to dependencies to throw exceptions. From my editor i can quickly go to the location of the Exception but I having something assist me to search for the existing solution to this problem would be useful. I mean, in a better world, there would be no breaking changes, but i don't live in that world. Is it really rare? I feel like every time i'm on wants to keep there libs up to date but is afraid of breaking changes?#2022-07-2618:50Drew Verleein this case, the small step that would nice to have automated is just going from the dep to it's github repo even. that way i could search in context for the changelog.#2022-07-2414:03teodorluis this the best way to check if I'm in a certain mode?
(when (eq major-mode 'clojure-mode)
  (message "in clojure-mode"))
I looked for things like clojure-mode-p, but coudn't find anything more compact.
#2022-07-2414:34Karol WójcikThis is idiomatic way of checking if you in some mode ;)#2022-07-2414:09dakraI think checking the major-mode variable is ok. But depending on the use-case derived-mode-p is often better. E.e. (derived-mode-p 'clojure-mode) would work also in cljs and cljc files while your (eq major-mode 'clojure-mode) is only non-nil for clj files.#2022-07-2414:40teodorluThanks!#2022-07-2515:53AkizHi, is there any recommended way to link integrant config keywords with xref-find-definitions?#2022-07-2515:56otfromI'm not sure I'd say "recommended" but I'd probably start with deadgrep#2022-07-2518:05AkizI am using rgrep currently, never tried deadgrep#2022-07-2518:06AkizBut i would like to use lsp #2022-07-2521:37aptI think lsp would have to implement that, just like it does for re-frame. Consider asking this question in #lsp#2022-07-2605:35AkizI did not know that thisi is already possible for re-frame. I will take s look, thanks for tip.#2022-07-2613:14borkdudeYes, this is because clj-kondo has built-in support for re-frame. But finding references for namespaced keywords works in general#2022-07-2613:13borkdudeIs it possible to disable paren matching within strings?#2022-07-2712:27jkxyzWith smartparens you can do
(sp-local-pair sp-lisp-modes "(" ")" :unless '(sp-in-string-p))
#2022-07-2712:30jkxyzAlthough that seems to break strictness when it's not in a string. I'm not sure how to modify the existing pair config#2022-07-2715:06jkxyz
(defun jk/smartparens-clojure-mode-init ()
  (sp-update-local-pairs '(:open "("
                           :close ")"
                           :actions (wrap insert autoskip navigate)
                           :unless (sp-in-string-p sp-point-before-same-p))))

(add-hook 'clojure-mode-hook 'jk/smartparens-clojure-mode-init)
#2022-07-2715:07borkdudeThanks, I'll try :)#2022-07-2715:10borkdudeDamn, it works, thanks a bunch!#2022-07-2715:12jkxyzNo problem! It always bothered me too. Makes writing doc strings annoying. If I want editor help with the syntax I just put it into a separate file and slurp it#2022-07-2715:14borkdudeIndeed or first write outside of the string and then wrap it#2022-07-2718:28borkdude@UE72GJS7J This seems to not behave correct in this case:
(fw/watch "." (fn [event]
                             (when
                                 
                                 (#{:write :write|chmod} (:type event))
                               (println "hello!"))))
I was trying to wrap parens around _ (#{:write ... at the underscore, but it didn't balance there anymore
#2022-08-0112:41jkxyzHmm I'm not sure what you mean. If I have |#{:foo} and I do sp-wrap-round it gives me (#{:foo}) as it should. I'm also using evil-cleverparens and it works correctly there#2022-08-0113:22borkdudeThat exact example above didn't work for me#2022-08-0116:56jkxyzWeird! Even if you directly do M-x sp-wrap-round? #2022-07-2613:55pppaulfor what mode? clojure-mode, paredit? by matching do you mean highlighting?#2022-07-2619:57vemvI'm trying Emacs on an M2 mac for my first time ever. I'm trying the simplest thing for now, namely emacsformacosx universal. It works fine, also not noticeably slow. But the control key doesn't work - M-x describe-key and then <control> <any letter> will pretend I pressed nothing at all. Does that sound familiar?#2022-07-2619:57vemvmac-command-modifier is set to control - same setup I've used for a long time#2022-07-2619:58dpsuttonverify in System Preferences > Keyboard > Modifier keys that nothing funky is going on?#2022-07-2619:59dpsuttonit is possible to map Control to the value no action#2022-07-2620:01vemvalmost, thanks for the pointer :) I had to disable these guys :man-facepalming:#2022-07-2620:01dpsuttonah yeah. i keep those off. i think slurp keybindings conflict by default maybe?#2022-07-2620:01dpsuttonoh yeah that’s exactly it. those mission control left and right movements#2022-07-2620:15jmayaalvi’ve been using emacsformacosx fine in m1 for about 3 months. should be fine in m2. Didn’t have to tweak anything else besides the mission control shortcuts.#2022-07-2809:06BenjaminConsider this org src block
#+begin_src clojure
(with-out-str (pp/print-table [{:foo 10} {:foo  11}]))
#+end_src

#+RESULTS:
: \n| :foo |\n|------|\n|   10 |\n|   11 |\n
any ideas how to insert the string as text, instead of string?
#2022-07-2809:23Benjaminafter checking ob-clojure.el I determined that
#+begin_src clojure :results  pp
(pp/print-table [{:foo 10} {:foo  11}])
#+end_src
automatically does what I want. It takes out from the nrepl result instead of value. I was considering to add pp-table next to pp because I am abusing the pp a bit and still need the print-table call in the code, but whatever.
#2022-07-2809:27teodorluMind pasting in the output you got? I've been occasionally frustrated when org tries to interpret everything as a table myself.#2022-07-2809:58Benjamin
#+begin_src clojure :results  pp
(pp/print-table [{:foo 10} {:foo  11}])
#+end_src

#+RESULTS:
: 
: | :foo |
: |------|
: |   10 |
: |   11 |
: 
: 
#2022-07-2809:58BenjaminI'm not sure what's up with : Also there is 1 extra blank line because it says "pp nil" once because of the hack#2022-07-2811:02Benjamin
#+begin_src clojure :results  pp table
(pp/print-table [{:foo 10} {:foo  11}])
#+end_src

#+RESULTS:
| :foo |
|------|
|   10 |
|   11 |
now it is a true org table
#2022-07-2811:14teodorluOhhh, nice! Gonna steal that one 😊😁#2022-07-2811:15teodorluDo your clojure blocks run against a persistent process (REPL)? I'm curious if it would be possible to execute stuff like that with babashka.#2022-07-2812:45Benjaminproof of concept:
#+begin_src elisp
(defun org-babel-execute:bb (s params)
  "Execute `S` with babashka."
  (shell-command-to-string (format "bb -e '%s'" s)))

(add-to-list 'org-src-lang-modes '("bb" . clojure))
#+end_src

#+begin_src bb
  (+ 1 2 3)
#+end_src

#+RESULTS:
: 6
#2022-07-2812:46Benjaminextending ob-clojure is maybe the right way though#2022-07-2815:25teodorluOh, cool! 😎#2022-07-2817:28pesterhazyHey, question not related to Clojure I've been using expand-region (best way to select stuff, period), but since upgrading to 28.1, when I run
M-x er/expand-region
#2022-07-2817:28pesterhazyI get this error
Wrong type argument: stringp, (require . diff)
#2022-07-2817:30pesterhazyAny ideas what could be wrong, or how I could debug this? BTW try out expand-region, it lets you start with a word and then move up to form, enclosing form, function etc, all interactively https://github.com/magnars/expand-region.el#2022-07-2817:31pesterhazy(PS, maybe this is to do with some other package I have installed?)#2022-07-2817:38pesterhazyHuh, after re-installing the package, now I get a different message:
Wrong type argument: stringp, (require . package)
#2022-07-2817:45aptYou can toggle-debug-on-error and check what’s the problematic line#2022-07-2818:00pesterhazylet me see...#2022-07-2818:00pesterhazy
Debugger entered--Lisp error: (wrong-type-argument stringp (require . package))
  string-match("\\(\\`\\|/\\)text-mode\\(\\.so\\|\\.dylib\\|\\.elc\\|\\.el\\)?\\..." (require . package))
  load-history-filename-element("\\(\\`\\|/\\)text-mode\\(\\.so\\|\\.dylib\\|\\.elc\\|\\.el\\)?\\...")
  eval-after-load("text-mode" #f(compiled-function () #<bytecode 0x1fc49373f5612>))
  byte-code("\300\301\302\"\210\300\303\304\"\210\300\305\306\"\210\300\307\310\"\210\300\311\312\"\210\300\313\314\"\210\300\315\316\"\210\300\317\320\"\210\300\321\322\"\210\300\323\324\"\210..." [eval-after-load clojure-mode #f(compiled-function () #<bytecode 0x1fc4934087f72>) css-mode #f(compiled-function () #<bytecode 0x1fc4934084cd2>) erlang-mode #f(compiled-function () #<bytecode 0x1fc49333ef98e>) feature-mode #f(compiled-function () #<bytecode 0x1fc4933291926>) sgml-mode #f(compiled-function () #<bytecode 0x1fc4933291872>) rhtml-mode #f(compiled-function () #<bytecode 0x1fc4933291872>) nxhtml-mode #f(compiled-function () #<bytecode 0x1fc4933291872>) web-mode #f(compiled-function () #<bytecode 0x1fc4933290c0a>) js #f(compiled-function () #<bytecode 0x1fc4933290dd6>) js2-mode #f(compiled-function () #<bytecode 0x1fc4933290dd6>) #f(compiled-function () #<bytecode 0x1fc4933290ba2>) js3-mode #f(compiled-function () #<bytecode 0x1fc4933290dd6>) latex #f(compiled-function () #<bytecode 0x1fc4933290b6e>) nxml-mode #f(compiled-function () #<bytecode 0x1fc4933290a3a>) octave-mod #f(compiled-function () #<bytecode 0x1fc49332909d2>) octave #f(compiled-function () #<bytecode 0x1fc49332909d2>) python #f(compiled-function () #<bytecode -0xbcec82b8f601688>) python-mode #f(compiled-function () #<bytecode 0x1fc49332938b6>) ruby-mode #f(compiled-function () #<bytecode 0x1fc4934084a6a>) org #f(compiled-function () #<bytecode 0x1fc4933290102>) cc-mode #f(compiled-function () #<bytecode 0x1fc4934087cde>) "text-mode" #f(compiled-function () #<bytecode 0x1fc49373f5612>) cperl-mode #f(compiled-function () #<bytecode 0x1fc493408786e>) sml-mode #f(compiled-function () #<bytecode 0x1fc49373f56de>) enh-ruby-mode #f(compiled-function () #<bytecode 0x1fc49333eca12>) ...] 3)
  autoload-do-load((autoload "expand-region" "Increase selected region by semantic units.\n\nWith ..." t nil) er/expand-region)
  command-execute(er/expand-region)
#2022-07-2818:02aptIt seems that require expected a string (as usual), but it got other thing. Maybe try to bisect your config. For example, try using emacs -q and loading only expand-region.#2022-07-2818:03pesterhazyThe way I read it the problem is with string-match, not require#2022-07-2818:03aptAh, yeah, maybe. It’s a bit hard to read 😅#2022-07-2818:04pesterhazybisecting the init.el is a good idea#2022-07-2818:07pesterhazyhm, I don't even know how to require the package#2022-07-2818:08pesterhazyah I figured it out#2022-07-2818:08pesterhazy
M-x package-initialize
#2022-07-2818:09pesterhazyand sure enough it works with only expand-region loaded#2022-07-2818:09pesterhazyso now I have to really bisect the init.el I guess?#2022-07-2818:39aptI’d recommend that, yeap#2022-07-2818:42pesterhazyok so this is strange with emacs -q it works without -q but with an init.el that only contains (package-initialize) I get the error message#2022-07-2818:50pesterhazybetter yet: emacs -q: works emacs with empty init.el: doesn't work#2022-07-2818:51pesterhazyshouldn't those two be identical?#2022-07-2818:52aptyeah. strange. not sure what’s going on. maybe wipe out your elpa folder and reinstall all packages (you can backup the current emacs.d first, just in case)#2022-07-2821:24pesterhazyOk so after much digging I found that the offending line is this https://github.com/magnars/expand-region.el/blob/master/expand-region.el#L188#2022-07-2821:25pesterhazyall other calls to eval-after-load take a symbol, but this one takes "text-mode" as a string#2022-07-2821:28pesterhazyfrom what I can tell, that odd call (introduced in this pr https://github.com/magnars/expand-region.el/pull/213) seems to break with Emacs 28#2022-07-2821:40pesterhazyCreated a PR to fix the problem upstream https://github.com/magnars/expand-region.el/pull/275#2022-07-2821:40pesterhazyThanks for the help @U976F1AR2#2022-07-2821:56aptcool, I’m glad you found the issue#2022-07-2821:57aptI confess I found it surprising that more users didn’t report it (I suppose), though – AFAIK expand-region is widely used :thinking_face:#2022-07-2822:07pesterhazyWell, expand-region doesn't accept bug reports anymore, so people don't have a venue where they can report issues#2022-07-2822:07pesterhazy(But I may also be wrong about this, as I know very little about elisp)#2022-07-2912:43apt> Well, expand-region doesn’t accept bug reports anymore, so people don’t have a venue where they can report issues Oh, got it.#2022-07-2912:43aptMakes sense, yeah#2022-07-2817:40pesterhazyHow do I get a backtrace for an error like this?#2022-07-2818:03aptI think it was supposed to be there, isn’t it?#2022-07-2818:03pesterhazyyup you answered in the other thread#2022-07-3010:08otfromtrying to find an org-mode (seach is failing me) that allows you to create diagrams of things like your house and then the rooms in the house and then the things in the rooms as a way of tracking real world things. Can anyone remember what this is called?#2022-07-3010:17otfromfound it! org-real https://gitlab.com/tygrdev/org-real#2022-07-3018:19jkxyzWhat a cool package! Are you finding it useful? #2022-07-3020:55otfromI'm not yet as I haven't figured out how to make it link to other things yet. Looks interesting, but I'd like to use it to organise some things around the house I don't have manuals for any more#2022-07-3105:20Drew VerleeIs there any chance that someone wants to pair on trying to add some cider functionality? I think it would be cool if there a way to select a key from a hashmap. e.g Let's say your cursor is * in this expression:
(-> {:user "..." :account-id "..." :age "..."} * ...)
after hitting some set of keys it would eval the last result (a hashmap) and then give you a list of those keys you could tap through to select one.
[:user :account-id :age] 
Just think, no longer would you have to type call the clojure.core/keys fn, then print the keywords, then select one and put it as next position as a function. 🙂 . This comes up all the time for me, and while there are an arbitrary number of things you might want to do with a hashamp, this one seems common enough to warrant a special function imo. I mentioned this idea like a couple months back and it still feels useful to me after all that time so i'm willing to commit. The downside to this pairing arrangement, is that i know next to nothing about programming emacs. But i'm willing to learn with someone if anyone else is a newbie and wants to start with me. Or if someone is like really excited to teach, this seems like a good example. I'm sure we can come to some mutually agreeable arrangement.
#2022-07-3107:57CarloI'm travelling right now, if you don't do this in a week DM me and we can arrange something ☺️#2022-07-3114:32Drew Verlee@UA7E6DU04 I'll do that, thanks!#2022-07-3118:59Drew VerleeI submitted a cider feature request, hopefully this is the right place to start. https://github.com/clojure-emacs/cider/issues/3231#2022-08-0101:31Drew VerleeThis is what i have so far:
(defun cider-eval-sexp-up-to-point-with-clojure-keys (&optional  output-to-current-buffer)
  "Evaluate the current sexp form up to point.
If invoked with OUTPUT-TO-CURRENT-BUFFER, print the result in the current
buffer.  It constructs an expression to eval in the following manner:

- It finds the code between the point and the start of the sexp expression;
- It balances this bit of code by closing the expression;
- It evaluates the resulting code using `cider-interactive-eval'."
  (interactive "P")
  (let* ((beg-of-sexp (save-excursion (up-list) (backward-list) (point)))
         (beg-delimiter (save-excursion (up-list) (backward-list) (char-after)))
         (beg-set?  (save-excursion (up-list) (backward-list) (char-before)))
         (code (buffer-substring-no-properties beg-of-sexp (point)))
         (code (if (= beg-set? ?#) (concat (list beg-set?) code) code))
         (keys-code (concat code "keys"))
         (keys-code (concat keys-code (list (cider--matching-delimiter beg-delimiter))))
         (code (concat code (list (cider--matching-delimiter beg-delimiter))))
         )
    (cider-interactive-eval keys-code
                            (let* ((result (cider-eval-print-handler))) <--- cider-eval-print-handlder isn't correct
                              (print result)
                             ;; (completing-read "Choose:" result)
                              )
                            (list beg-of-sexp (point))
                            (cider--nrepl-pr-request-map))

    ;; (cider-interactive-eval code
    ;;                         (when output-to-current-buffer
    ;;                           (cider-eval-print-handler))
    ;;                         (list beg-of-sexp (point))
    ;;                         (cider--nrepl-pr-request-map))

    ))
#2022-08-0209:36Benjamin
(defun cider-insert-select-key-dwim ()
  "Insert a key selection from the sexp before point."
  (interactive)
  (let* ((form (cider-last-sexp))
	 (ks (cider-nrepl-sync-request:eval
	      (format "(keys %s)" form)))
	 (ks (car
	      (read-from-string
	       (nrepl-dict-get ks "value"))))
	 (ks
	  (completing-read-multiple "Key: " ks)))
    (insert
     (pcase ks
       (`(,k) k)
       (_ (format
	   "(select-keys [%s])"
	   (mapconcat
	    #'identity
	    (mapcar (lambda (k) (with-output-to-string (princ k))) myks)
	    " ")))))))
#2022-08-0209:38Benjamin#2022-08-0209:39BenjaminI am thinking the next elaboration of this auto inserts (map :key) , if the thing before point is a seq#2022-08-0402:15Drew VerleeThanks, I'll try to devote time to this on the weekend.#2022-08-0111:49Benjaminjo in org ins't there a way to inline elisp, also inside source blocks? My goal is to achieve something like this:
#+begin_src elisp
  (defvar my-file-name "resources/foo.sql")
#+end_src

#+begin_src sql :tangle <my-file-name>
  select
#+end_src

#+begin_src clojure
  (jdbc/execute.... <my-file-name>)
#+end_src
so something like an ad hoc substitution definition or something. Where I say subst with this string and further up I define the string
#2022-08-0117:15agWhat's your question? I read twice, still can't decipher it. Are you trying to share results of evaluation of one source block with another?#2022-08-0117:17Benjaminthat would be interesting, too ye.#2022-08-0117:18aghttps://kitchingroup.cheme.cmu.edu/blog/2019/02/12/Using-results-from-one-code-block-in-another-org-mode#2022-08-0117:18Benjamininitially I thought there must be a way to basically refer from any text in org to another block, like expanding the text. Or to basically expand elisp into text would also be interesting#2022-08-0117:26agIIRC, you can't refer to another source block verbatim. But I think I successfully fed an example block to a source block once. Using the same technique described by Kitchin.#2022-08-0121:59Drew Verleei thought this was the main emacs thread, ignore those messages 🙂#2022-08-0313:24otfromdo other people get mis-matches in C-h m when they use evil?#2022-08-0313:38tomddo you mean for the keybindings it lists? do you use which-key? if so, do you notice the same mis-matches there?#2022-08-0314:15otfromwhich-key works. C-h m seems to be where I get some mis-matches#2022-08-0314:16otfromwhich-key doesn't tell you want the single key bindings are (or at least not that I've been able to find yet, if it does that would be cool)#2022-08-0314:28tomdwhich-key-show-major-mode or which-key-show-top-level are worth a look#2022-08-0314:30otfromcool. I didn't know those#2022-08-0314:35tomdfyi C-h m probably doesn't have mis-matches per se. it just says what the binding is for a given keymap. you may not get that binding because another keymap (especially the evil ones) may override it. if you fancy reading about it, noctuid covers the basics in their evil guide: https://github.com/noctuid/evil-guide#keymap-precedence and specifically this link: https://github.com/syl20bnr/spacemacs/wiki/Keymaps-guide#2022-08-0315:08otfromok, that makes sense and explains a lot#2022-08-0313:24otfromI'll dig out some examples as I'm not sure if transient is an issue as well#2022-08-0318:05pppauli'm running a default version of prelude, and i can't seem to get paredit enabled on my clojure docs (it is on my lisp docs, though) prelude-lisp.el
;; a great lisp coding hook
(defun prelude-lisp-coding-defaults ()
  (enable-paredit-mode)
  (rainbow-delimiters-mode +1))

(setq prelude-lisp-coding-hook 'prelude-lisp-coding-defaults)
prelude-clojure.el
(with-eval-after-load 'clojure-mode
  (defun prelude-clojure-mode-defaults ()
    (subword-mode +1)
    (run-hooks 'prelude-lisp-coding-hook))

  (setq prelude-clojure-mode-hook 'prelude-clojure-mode-defaults)

  (add-hook 'clojure-mode-hook (lambda ()
                                 (run-hooks 'prelude-clojure-mode-hook))))
i have run the recompile-init function, and there are no errors with the respective files
#2022-08-0318:13dpsuttoni normally use add-hook rather than (setq hook …) not sure if that’s a possibility?#2022-08-0318:24pppauladd-hook is being used, it's just doing a little more work#2022-08-0318:28pppaulis there a way for me to step through these hooks?#2022-08-0318:32pppauli'm now going down the emacs debugging rabbit hole#2022-08-0319:27pppaulby default prelude doesn't require 'prelude-clojure which is probably why my clojure buffers are all weird#2022-08-0410:55Benjamin
■  Error (use-package): evil/:catch: Symbol's value as variable is void: 
 ■  Error (use-package): evil-surround/:catch: Symbol's value as variable is void: 
 ■  Error (use-package): evil-commentary/:catch: Symbol's value as variable is void: 
 ■  Error (use-package): evil-mc/:catch: Symbol's value as variable is void: 
that is \213 
it thinks there is a variable called \213 does not happen with emacs 28 but with the one from master
#2022-08-0412:01Benjaminprobably an actual issue with laoddefs and better for the emacs mail list#2022-08-0516:32otfromis there a modern relies mostly on core emacs folding mode that people like/tolerate/love?#2022-08-0517:32aptThe built-in hs-minor-mode is fine. What features are you missing?#2022-08-0521:33otfromThx. I'll give that a go. I've never been big on folding but my pair is#2022-08-0608:39BenjaminI use lispy.el and it has this whole integration with "outline" I never really tried to use it. I think with it you can make headers and sections (and fold)#2022-08-0608:40Benjaminoutline.el is builtin#2022-08-0611:55otfromhs-minor-mode seems to do what I want and is evil. z keys give me what I'm after. Thanks!#2022-08-0520:21ghadidumb question: what's the command/keystroke to indent a big multiline string at e.g. 80/120 col width?#2022-08-0520:23dpsuttonfor me there’s C-q runs paredit reindent-defun which works for that for me.#2022-08-0520:24dpsuttonor m-x fill-paragraph#2022-08-0520:24ghadihmm I don't have that command#2022-08-0520:51ghadioh, I do have fill-para#2022-08-0520:51ghadithanks @U11BV7MTK#2022-08-0520:52ghadiit only applies to the paragraph that a cursor is in, not a defun#2022-08-0520:52dpsutton
(defun paredit-reindent-defun (&optional argument)
  "Reindent the definition that the point is on.
If the point is in a string or a comment, fill the paragraph instead,
  and with a prefix argument, justify as well."
  (interactive "P")
  (if (or (paredit-in-string-p)
          (paredit-in-comment-p))
      (lisp-fill-paragraph argument)
    (paredit-preserving-column
      (save-excursion
        (end-of-defun)
        (beginning-of-defun)
        (indent-sexp)))))
try (lisp-fill-paragraph)?
#2022-08-0520:53dpsuttonlisp-fill-paragraph will reindent comments and docstrings for me#2022-08-0818:55Young-il ChooOr, if you just want to indent a set of lines, specify a region, and then indent-rigidly (C-x tab) then use left or right arrow to indent or unindent.#2022-08-0604:59Drew VerleeIs everyone getting tab completion on all there projects big and small? I assumed my suffering was cljs based, but i'm on a large clojure project now and i can't get edn/* to tab complete anything. files saved, ns loaded. this same thing works fine on a smaller toy project.#2022-08-0605:14Drew Verleeintelliji does give tab completion in the same exact setting.#2022-08-0605:15Drew Verleeedn/* TAB -> edn/read-string edn/read#2022-08-0606:20agUsing clojure-lsp?#2022-08-0606:39Drew VerleeI have it installed yes.#2022-08-0607:17Drew VerleeI'll pay money if someone can help me fix this. I'm beyond frustrated by it.#2022-08-0617:25pesterhazyMight be that clojure-lsp takes a long time to analyze your project #2022-08-0617:29Drew Verleecould be, how would i test that idea? I mean, it never offers the functions no matter how long i wait. This works in emacs on smaller projects though. And it works in calva which i believe uses lsp to get the completion. That's why i'm asking if people are constantly getting this behavior, because i just might want to follow suit rather then try and fix this. Because i'm using stable widely adopted tools and if it's not working i assume it's a very hard problem to solve.#2022-08-0617:30pesterhazyNot gonna lie, I also have problems with lsp in a large project #2022-08-0617:30pesterhazyOne thing to try would be to just run the clojure-lsp binary in a terminal in the project root #2022-08-0620:55Drew VerleeIf lsp was the bottle neck wouldn't it also not work in vs code then? isn't that what powering the completion there?#2022-08-0620:56Drew Verleeyeah, i'm getting code completion options in vs code without a repl.#2022-08-0621:18Drew Verleeok, so i get completion (so far) when i narrow the lsp workspace more. Before /.lsp /backend/ /frontend/ Now its /backend/.lsp i really want lsp to span the whole directory. I feel like i have gone through this pain before and the lsp docs will probably have the answer here...#2022-08-0621:20Drew Verleeprobably relevant https://clojure-lsp.io/troubleshooting/#folders-not-being-analyzedlinted#2022-08-0621:25Drew VerleeAdditionaly, i might be wrong in my thinking here. I think i was hoping LSP would help me rename keywords across platforms (e.g fe and be) but 1. i can do that with text search replace just as easily. 2. For all other cases it's actually the wrong thing. e.g if i rename the fn foo on the fe i clearly don't necessarily want it renamed on the be. That being said, i'm sure there is a way to share lsp configuration.#2022-08-0621:44Drew VerleeI guess the issue is that text search replace won't help with aliased keywords, but that's a fairly small subset of things...#2022-08-0623:54aptYou can also try eglot, for confirming if the issue is in the client or in the server (or neither of them)#2022-08-0708:07pesterhazyMy problems are related to a monorepo as well #2022-08-0609:22rafalwHello, for clean es6 development, which mode is the best, javascript-mode, js2-mode, js3-mode, ... ?#2022-08-0617:23pesterhazyI'd like to know as well #2022-08-0707:03David VujicNot sure if it is the best, but I use a combination of js2-mode, web-mode, json-mode and tide. https://github.com/DavidVujic/my-emacs-config#2022-08-0920:00pppauli didn't even know there was a js3 mode...#2022-08-1220:09Drew VerleeIs this the right way to set cider-refres-before-fn? in a .dir-locals.el file?
((nil . (
         (cider-refresh-before-fn . "reloaded.repl/suspend")
         (cider-refresh-after-fn . "reloaded.repl/resume")
         )))
#2022-08-1220:10Drew Verleeerr it's not#2022-08-1220:10Drew Verleei'm missing the -ns#2022-08-1220:12Drew Verleethese files would benfit from 1. linting 2. autocomplete 3. anykind of easy way to check if there working lol#2022-08-1301:19jasonjcknany way to get >defn to highlight like defn? #2022-08-1303:42Jeongsoo LeeThis seems to be the solution: http://blog.jenkster.com/2013/01/clojure-syntax-highlighting-in-emacs.html#2022-08-1308:46BenjaminAlso you can configure clj kondo to analyze it like defn#2022-08-1318:36pppaulyou can add highlights to any symbol in clojure mode, i actually has an issue for clojure-mode related to this, though cider should really be doing this for you.#2022-08-1318:38jasonjckni'm using lsp for highlighting not cider , i'll try the clojure mode way now let you know #2022-08-1318:38pppaulhttps://github.com/clojure-emacs/clojure-mode/issues/622#2022-08-1318:39pppauli haven't used lsp, i assume it's not cider, are you using cider-jack-in ?#2022-08-1318:39jasonjckni am, but i disabled cider highlights #2022-08-1318:39pppaulanyway, the issue i posted was something cider wasn't fixing, so it seems ok to add special font-locking in clojure mode when other modes fail#2022-08-1318:40jasonjckndoes cider have a highlight face for macros or how would you use cider to highlight >defn#2022-08-1318:41pppaulcider does do some fontlocking. you can see it when you open a clj file and it changes font locking after jack-in or file-load C-c C-l#2022-08-1318:42pppaulhighlight doesn't sound like font-locking, though... i'm not sure what that is.... i'm not an expert with cider, i fix stuff when i run into problems, but i generally don't want to know much about cider#2022-08-1318:51jasonjckninterestingly any macro named with prefix ‘def’ is given function definition font locking by default #2022-08-1318:53pppaulthat's a bit of an idiom. i have a lot of defmacros 🙂#2022-08-1308:38BenjaminLooking for complement in the standard lib or dash , doesn't exist?#2022-08-1308:41BenjaminI'ts 1 line with lexical binding t
(defun complement (f)
  "Returns the function that has the
opposite truthyness of `f`."
  (lambda (&rest r) (not (apply f r))))
#2022-08-1408:54teodorluis there a paredit action that can move an sexp "left"/"right"? Example:
;; from

(defn link? [el]
  (= (get el "t")
     #_cursor "Link"))

;; to

(defn link? [el]
  (= "Link"
     (get el "t")))
#2022-08-1408:57teodorluoption: transpose-sexps:
(defn link? [el]
  (= "Link"
     ;; M-x transpose-sexps
     (get el "t")))
#2022-08-1408:58teodorluCalva has "drax sexp backward/forward". This is exactly what I'm looking for! https://calva.io/paredit/#2022-08-1409:00teodorluCan't find anything like "drag sexp" in http://danmidwood.com/content/2014/11/21/animated-paredit.html either.#2022-08-1409:03teodorluCouldn't find anything in the https://raw.githubusercontent.com/joelittlejohn/paredit-cheatsheet/master/paredit.pdf either.#2022-08-1412:17cwhtbI think drag forward would be transpose-sexprs and drag backward would be transpose-sexprs with a negative prefix. (i.e. drag-forward=C-M-t, drag-backward C-- C-M-t)#2022-08-1416:49teodorluGood point - thanks!#2022-08-1515:58richiardiandrea👍 I use transpose all the times for these use cases!#2022-08-1419:16Drew VerleeGoing to try and work on this https://github.com/clojure-emacs/cider/issues/3231#issuecomment-1200686301 again in an hour or two if anyone wants to pair (maybe on discord?). I keep getting distracted by my complete lack of understanding of any beyond a superficial understanding of emacs and elisp 😆#2022-08-1500:49Drew Verleehow would i go about adding project specific hooks like this? (add-hook 'cider-connected-hook #'inspire-on-connect) bc one inspiring message isn't enough to get me going anymore. I want to use the dir-localse.el, but i'm not sure it supports this, i still have to read the dir-locals https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html everytime and it's still not clear all what you can do inthere. maybe something like (eval . (add-hook?) ... yes! that seems to work. The dot is for dotted pair notation, i'm not sure of it's role here though...#2022-08-1500:50ag
(clojure-mode . ((eval . (progn (add-hook ,,, etc. 
#2022-08-1500:51agprogn is there for that I assume you'd have more than just add-hook expression in there#2022-08-1500:53Drew Verleethanks! my current way of learning how to do this stuff is poking through the cider docs and asking questions here. If you know of any more structured approaches that aren't eating the whole elephant that would be great.#2022-08-1500:58agyeah, the same way I usually learn these things. mind that overloading .dir-locals.el may not be cheered by collaborators (assuming it's not a personal project). You can use .dir-locals-2.el and add it to .gitignore. That way .dir-locals.el still can be pushed into the repo, and your personal settings would be separated.#2022-08-1501:01Drew Verleei have the dir-local gitignored currently... but thats good to know. it would make sense to expose it if it can house project specific stuff...#2022-08-1501:02agAnother issue you will stumble on pretty soon is forcing Emacs to "renew" updated dir-locals. Since they are per project, executing (hack-dir-local-variables) is not enough. You're gonna have to kill and reopen every single open buffer in the project. Otherwise, you may end up calling cider-jack-in from the root-dir and have different results than if you call it from some buffer. Buffers will have different buffer-local variables.#2022-08-1501:04Drew Verleein spacemacs it's enough to do SPC o R aka revert-buffers. And this is why i support praticalli, because i'm not sure i would ever have figured that one out without asking him 🙂#2022-08-1501:06agThat's not exactly the thing, but if it works - it works. See this reddit comment https://www.reddit.com/r/emacs/comments/w9p2oo/resetting_dirlocalsel/ii5w1u1/?context=3#2022-08-1501:07Drew VerleeI see, i didn't read your prevoius message carefully enough.#2022-08-1519:28Brian Marco#2022-08-1519:30vemvPlease delete this message, one x-post (#cider) is enough#2022-08-1611:32vemvDo you use https://github.com/jrblevin/markdown-mode or something else? Normally I edit .md/.org files in fundamental-mode, but markdown-mode seems tempting for the ability to open links quickly#2022-08-1611:34vemvI can turn on goto-addressmode which is a more spartan solution. tried it now and it just works! duckie#2022-08-1612:08krydosI do use it. It highlights headings and code blocks, which is neat. And yeah, as you mentioned, you can quickly “render” it and open#2022-08-1817:46Chris Clark+1 for markdown-mode! It’s great.
#2022-08-1712:15vemvI'm just thinking aloud, but I'd love a small tool that transformed a production stacktrace (as spat by datadog, or what have you) into an emacs xref stack for your repo. That way you could jump back and forth the stack in an order that would analog to production's.#2022-08-1714:34aptI suppose this could reuse cider’s logic for adding links to stacktraces#2022-08-1716:11vemvYes, also :) it's kind of a different approach, both are valid#2022-08-1907:03jumarYes, yes, yes - I often want this :)#2022-08-1910:36vemvfor DD in particular I found out there's an integration already (which isn't enabled at my team) https://docs.datadoghq.com/integrations/guide/source-code-integration/?tab=github not emacsy, but will alleviate the most immediate pain at least!#2022-08-2303:42cl_janybody knows what is this icon for? I find it in doom-modline after updating it?#2022-08-2311:44krydosthat’s something controlled by doom-modeline-time-icon You can (setq doom-modeline-time-icon nil) to remove it. I don’t use doom so can’t exactly tell why is it there. Looks like it’s something related to “time segment” of the modeline#2022-08-2313:39cl_jthanks, it's indeed the time-icon.#2022-08-2314:15Drew VerleeHas anyone seen a resource on learning elisp for clojure devs?#2022-08-2314:49teodorluYou're looking for a kind of comparison, here are similarities, here are differences? I've mostly been relying on the embedded REPL and the embedded docs, I haven't seen/uses any resources specifically for clojure devs.#2022-08-2314:50teodorluPerhaps interesting to create something? A sort of Rosetta for "common clojure operations in Emacs Lisp" :thinking_face:#2022-08-2314:55Drew VerleeI would personally benefit from a guide to learning elisp for the purposes of coding emacs functions from the perspective of someone that knew clojure. This would be slightly better then a guide which made no assumptions about the reader, but maybe not very much. It would just be a nice addition to reading list i'm making.#2022-08-2316:04vemvI don't know, maybe https://github.com/p3r7/awesome-elisp hides some gem? another way would be to use make your own cheatsheet. The making of the cheatsheet itself would a great exercise. Maybe read the https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/seq.el source. It's a relatively new (on a Emacs time-scale!) lib probably influenced by clj . And of course, if you manage to make Emacs teach you how to use Emacs (which is part of its design), you'll be unstoppable :)#2022-08-2316:40Drew VerleeThanks vemv.#2022-08-2323:55anonimitorafBtw there's also https://github.com/clojure-emacs/clomacs if you want Clojure in your Emacs Lisp 😉#2022-08-2323:58Drew VerleeThere are a couple cider functions i want to build, but long term im not sure where it's going.#2022-08-2323:59Drew VerleeI'm not sure having clojure in my emacs will help, I'll have to look into it...#2022-08-2403:12Drew Verlee@UR37CBF8D that library is pretty cool. I wonder what the alternative is like? I suppose you have to do more with elisp and it's libs?#2022-08-2403:57anonimitorafYep, although there are libs out there like https://github.com/plexus/a.el (Clojure inspired), etc#2022-08-2423:51BenjaminI've found this to be quite helpful at times: https://hyperpolyglot.org/lisp#2022-08-2316:04vemvI don't know, maybe https://github.com/p3r7/awesome-elisp hides some gem? another way would be to use make your own cheatsheet. The making of the cheatsheet itself would a great exercise. Maybe read the https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/seq.el source. It's a relatively new (on a Emacs time-scale!) lib probably influenced by clj . And of course, if you manage to make Emacs teach you how to use Emacs (which is part of its design), you'll be unstoppable :)#2022-08-2316:16teodorluHi! When you'd use an immutable map in clojure, what would you use in Emacs Lisp? Is there something built in? Or do you prefer to use a library? Or do you code completely differently?#2022-08-2316:25dpsuttoncode completely differently. I think the standard associative structure is the alist (association list): https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html#2022-08-2602:50Drew VerleeWhat about instead of "toggle-word-wrap" we had "toggle-s-expression-wrap" where it moved expressions that bumped up agains the window all to the next line and applied the formatting rules.#2022-08-2619:17agYou probably wouldn't want a "destructive operation" like that. Just like vertically aligning things (M-x clojure-align) is not universally liked, wrapping expressions too narrow, I think would not be welcomed in every team. What would be nice though is to have a mode where you can make things visually more appealing (maybe using overlays); if you like vertical alignment - it will show things aligned; if window is too narrow - it will display things as you described. But all that without actually affecting the code itself.#2022-08-2619:22agWhat I love about Lisp dialects in general, is that no matter how narrow the window gets, the code wraps around but retains its readability. You can comfortably read Lisp code on your phone. That doesn't work with most other PLs. Indent-based languages are the worst for that. That's why whenever I see comments like: "Lisp is not very readable", I roll my eyes as if someone said: "Sun revolves around the Earth"#2022-08-2619:27agSince the "visually-pretty-clojure" mode doesn't exists, and my team doesn't like when I vertically align things with clojure-align, I often still use it (because the table form is much more readable), but I quickly undo things and try not to commit the code with alignments. Here's a little helper I use all the time:
(defun clojure-unalign (beg end)
  "Un-align (remove extra spaces) in vertically aligned sexp around the point."
  (interactive (if (use-region-p)
                   (list (region-beginning) (region-end))
                 (save-excursion
                   (let ((end (progn (end-of-defun)
                                     (point))))
                     (clojure-backward-logical-sexp)
                     (list (point) end)))))

  (save-excursion
    (save-restriction
      (narrow-to-region beg end)
      (goto-char (point-min))
      (while (re-search-forward "\\s-+" nil t)
        (replace-match " "))
      (let ((clojure-align-forms-automatically nil))
        (indent-region beg end)))))
#2022-08-2705:07Drew VerleeWhat i was suggesting was just changing the view and not the text itself as written to the disc.#2022-08-2705:14Drew VerleeThe real culprit is the lack of structural diffs. I need to check difftastic again. If that works then i see no reason why everyone couldn't use whatever formatting rules they want. It's a bit silly that we have to fight over viewing preference just because of git. Though of course, there are some rather hard to encode elements of code structure...#2022-08-2705:02Drew VerleeToday i learned that i should be running an Emacs server and just launching a client to connect to it. Via this video: https://youtu.be/s0ed8Da3mjE#2022-08-2705:43vemvNot sure if 'should', but I do use it. A fast-starting .emacs.d allows being liberal with how often you quit / restart it. I have the habit of doing a few restarts a day for avoiding accumulating useless (potentially problematic) state. I use the server as launched from a GUI app, mainly for scripting the GUI app. Also, occasionally, for editing files from iTerm.#2022-08-2818:23normanI've been an emacs user for 30+ years. I don't do this. I can see how under certain usage patterns it might make sense, but it definitely doesn't work for the way I use it. I tend to work on different tasks on different desktops. I keep the emacs for that task open for the life of the task, perhaps restarting every now and then if I feel I'm accumulating too much cruft or want to pick up updates.#2022-08-2818:58nivekuilaside from fast startup, also try emacsclient -nw over ssh on your phone#2022-08-2820:54Drew Verlee> I use the server as launched from a GUI app, mainly for scripting the GUI app. which GUI app? Is it a linux package?#2022-08-2820:55Drew Verlee> perhaps restarting every now and then if I feel I'm accumulating too much cruft or want to pick up updates. Yea, if it's leads to more oddity orthogonal to the task at hand, then it's not worth the 4 seconds it takes emacs to power up and get me back to where i was.#2022-08-2907:43vemv> which GUI app? Is it a linux package? it's simply emacs packaged as a macos .app which has a native os integration, etc. Contrariwise, a pure binary can only run in the terminal, so it's a less rich experience#2022-08-3011:10EdI run the server by starting emacs with emacs --daemon and have a few keybindings in my .zshrc like
bindkey -s "^x^f" $'^aemacsclient -c -nw '
because I kept trying to find a file in emacs from the shell prompt accidentally by hitting the keyboard shortcut. I use dabbrev-expand a lot (out of a long ingrained habbit) which works better if you don't close the buffers in your project so dabbrev can complete existing function names, etc ... I like the workflow of opening files in the terminal for quickly editing things or using magit with things like this:
alias magit="emacsclient -nw -c -e '(magit-status)'"
but I also like having a gui emacs with all the same buffers and repl connections open in the same process. I tend to only restart emacs when I reboot the machine.
#2022-08-3011:26Edalso ... I set export EDITOR='emacsclient -nw -c' which makes life better when using terminal programs like git or mutt 😉#2022-08-3022:22Jeongsoo LeeI also used to float around emacs daemon and connect to it on-demand, but from some moment on I just close the laptop lid and go 😂#2022-08-2900:59Drew VerleeIs anyone else getting this https://github.com/clojure-emacs/cider/issues/3241 where it isnt not respecting cider-auto-select-buffer being set to nil, by going to the buffer?#2022-08-2909:18Benjaminyes#2022-08-2909:21Benjaminactually nvm. Well it calls display-buffer for me by default that makes a window and does not select it#2022-09-0201:30Drew Verleeintresting.#2022-09-0201:30Drew Verleethanks benjamin#2022-08-3016:43Benjamindo you know how to get the point, but only counting the narrowed part of the buffer?#2022-08-3016:47Benjamin
(let ((p (point)))
  (narrow-to-defun)
  (- p (point-min)))
just - point and poin-min when it is narrowed
#2022-08-3113:26jjttjjDoes anyone know of a way or a function in emacs to treat a tagged literal as a form in the paredit ops? so backwards-sexp would work on this:
#inst "2022"|
|#inst "2022"
(I suppose I could wrap all the paredit functions in a function that just ie does the backwards-sexp then checks if the next form for a #, but is there something out there that already handles this?)
#2022-08-3114:31nikoeWhat’s the equivalent of running Live Server but with Emacs?#2022-08-3114:32nikoeFor context, I’m trying to practice building SPA’s with Doom Emacs but am not sure how to go about transitioning if I don’t know how to quickly run the html with hot reload etc#2022-08-3116:01Michaël Salihi@niko.escobal Check impatient-mode https://github.com/skeeto/impatient-mode to quickly edit some HTML/CSS, Markdown. But for building SPA, the hot-reload part should be managed by your dev tooling (eg. Shadow-CLJS/Figwheel), not the editor IMO.#2022-08-3116:06nikoeamazing! @UFBL6R4P3 thanks for sharing. I’ll def give this a try. Would you know if this works with CSS frameworks like Tailwind?#2022-08-3116:07nikoeAlso, I’m quite new to Clojure so I haven’t tried using Shadow-cljs/figwheel just yet but will do so soon!#2022-08-3116:13Michaël SalihiAbout Tailwind yes, there is multiple solution. For a simple HTML edit with Tailwind, you can quickly start using the CDN last TW version adding this tag to the head: <script src=""></script> https://tailwindcss.com/docs/installation/play-cdn#2022-08-3116:18Michaël SalihiWhen ready to go further, take a look at this starter project for a SPA with Shadow-CLJS + Tailwind: https://github.com/jacekschae/shadow-cljs-tailwindcss#2022-08-3117:12nikoe@UFBL6R4P3 thanks so much for the help. I’ll definitely give this a try!#2022-08-3118:05Michaël SalihiYou're welcome @niko.escobal#2022-09-0201:27Drew Verleesomeone just made a youtube video to, i haven't watch it, but he is a entertaning and clear with nearly all his other videos. You don't have to follow his setup exactly, but it might help. https://youtu.be/V-dBmuRsW6w#2022-09-0201:30Drew Verleethere is also this https://github.com/thheller/shadow-css#2022-09-0815:09DiegoI’ve got a performance problem with LSP whereby when I enable it, lispy actions become quite laggy. What can I do to improve the situation. I really like LSP, but I often have to turn it on and off because of this problem.#2022-09-0815:31otfromnewest version is supposed to be faster: https://clojurians.slack.com/archives/CPABC1H61/p1662592594335279#2022-09-0817:12DiegoI’ll check it out, thanks#2022-09-0820:37agAre you using --with-native-compilation?#2022-09-1218:18DiegoI think maybe not. Is there a way check?#2022-09-1218:19ericdallo@U7AMPCPU2 you may check if https://github.com/clojure-lsp/clojure-lsp/issues/1240 we found yesterday is related with you, but from your description it doesn't seem related#2022-09-1218:20ericdallo> I think maybe not. Is there a way check? lsp-doctor will tell#2022-09-1218:23DiegoI get this:
Using emacs 28+ with native compilation?: OPTIONAL
#2022-09-1218:24ericdalloso not native compiled#2022-09-1218:24ericdalloanyway, you can do a profiler on emacs to check what is slow for you Check https://emacs-lsp.github.io/lsp-mode/page/performance/ for more details#2022-09-1218:28DiegoThanks, I’ll try that#2022-09-0921:49Steven KatzI've added smart parens to emacs, but it does not seem to do anything. I think my emacs knowlage is too weak to understand what I need to do. Any help appreciated#2022-09-0922:03agit's always a good idea to run M-x describe-package and learn a bit about it. Usually, package authors put some instructions in the description or the home page#2022-09-0922:04Steven KatzYup, read that and it took me to the wiki, which was not very helpful.#2022-09-0922:06agHow is it not helpful? There's "Getting started section" that answers your question and even more#2022-09-0922:21Steven Katzmaybe we are looking at different doc...i did the things in getting started, (which btw give no context about what file to add things to) and still it does not work. Is there a trouble shooting section I am missing?#2022-09-0922:22Steven Katzhere are the instaructins i followed:
You can also install this as a package with M-x package-install smartparens. This package is available in melpa repository.

If you've installed smartparens as a package, you don't need to require it, as there is an autoload on smartparens-global-mode.
#2022-09-0921:53Steven KatzI installed it with: M-x package-install smartparens BTW it complained about not being able to find dash, so I ended up installing that afterward as well (though the doc indicated it should have installed automatically)#2022-09-0921:56lukaszHave you enabled smartparens-mode ?#2022-09-0921:57lukasz(I don't use smartparens, but usually package installation is not enough, you need to instruct emacs to load the package, activate major/minor modes etc)#2022-09-0922:03Steven Katzmy init.el file:
(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . "") t)
(package-initialize)

;; actually turn on smart parens
(smartparens-global-mode t)
(require 'smartparens-config)

; smart parentheses
(show-smartparens-mode 1)
#2022-09-0922:04lukaszweird, no errors when starting Emacs?#2022-09-0922:05Steven Katznone that I could see, i'm on a mac and starting it with an icon on the dock...is there a file to look in to see errors?#2022-09-0922:06Steven Katzwhen i open a .clj file it show as major mode clojure with no minor mode listed#2022-09-0922:08agtry M-x describe-mode#2022-09-0922:10Steven KatzI see a lot of stuff about clojure, nothing about smartpar#2022-09-0922:10Steven Katzis it possible that my init.el is not being executed?#2022-09-0922:11agCheck for the section: "Global minor modes enabled"#2022-09-0922:12ag> is it possible that my init.el is not being executed? It could be. You can either start emacs from command line with --debug-init flag, or place elisp snippet like (message "Hello") and see if it shows in *Messages* buffer#2022-09-0922:13Steven Katz
Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption
Blink-Cursor Electric-Indent File-Name-Shadow Font-Lock Global-Eldoc
Global-Font-Lock Line-Number Menu-Bar Mouse-Wheel Show-Paren Tool-Bar
Tooltip Transient-Mark
#2022-09-0922:14Steven Katzstartng from the commandline didn't print out any errors in the terminal, it just started#2022-09-0922:15Steven Katzopps forgot the flag...hold on#2022-09-0922:15agIf you're new to Emacs, have you considered trying one of the "distros"? Prelude, Doom, Spacemacs? It might be a lot simpler. Things like smartparens, version-control, completion frameworks could be daunting to configure from scratch. Doom for example, makes it very easy to add and remove things like that, without getting bogged down#2022-09-0922:16Steven Katzno diference with the flag#2022-09-0922:18Steven KatzSeem like adding support for clojure and a parens helper should not require me to adopt and entirely different distro...i had hoped to make emacs my default for all languages (well maybe not java)#2022-09-0922:21agWell, without a starter kit, I gotta be honest, it's going to be a bumpy road. You should consider a starter kit, at least in the beginning. Once you learn the basics, you can always make a decision to build your own config from scratch.#2022-09-0922:23lukaszI just use use-package no distros required#2022-09-0922:23lukaszregarding errors - check *Messages* buffer, sometimes package log stuff there#2022-09-0922:23Steven Katz@U0JEFEZH6 can you elborate on that? (use-packae)?#2022-09-0922:24aghttps://github.com/jwiegley/use-package#2022-09-0922:25Steven Katzmessages only has a single line about getting help#2022-09-0922:30agwhere have you placed your init file? https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html#:~:text=Emacs%20can%20also%20look%20in,config%2Femacs%20.#2022-09-0922:31Steven Katz~/.emacs.d/init.el#2022-09-0922:31Steven Katzalso have: ~/.emacs#2022-09-0922:32Steven Katzshould I prefer one over the other?#2022-09-0922:32agyou missed the dot in the first one#2022-09-0922:33agcheck the page I shared above#2022-09-0922:33Steven Katzthis is whats in .emacs
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages '(dash smartparens cider clojure-mode)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
#2022-09-0922:34Steven KatzSo if i read that page correctly, only one of these files will be used and my config for SP is in the wrong place#2022-09-0922:34agThat seems to be the case#2022-09-0922:38Steven KatzSuccess, moving .emacs to .emacs.sav has allowed SP to start working...Thanks!!!#2022-09-0922:42Steven KatzThis is still odd to me as my .emacs file (whgich has some config in it about clojure and sp) would seem to be needed, clearly i need to merge the two into one file, but I'm wondering if they are inconflict in some way#2022-09-0922:52agThose settings are related to https://www.gnu.org/software/emacs/manual/html_node/elisp/Applying-Customizations.html and M-x describe-variable custom-file#2022-09-0923:03ag@U040K4L8BFU IMO you should still give Prelude or Doom a try. Learning Emacs from scratch, starting with a blank page like that could be a daunting endeavor. I understand that your inner hacker may refuse to choose that path, but using a starter kit can help you learn more and much faster. I just don't want yet another person to try really hard and still give up. Emacs has way too much stuff, not only built-in features and packages but an entire world. The dull looks and seemingly uncomplicated interface of vanilla Emacs without extensions could be very deceiving.#2022-09-0923:04agLook at this "example config" just for smartparens alone: https://github.com/Fuco1/.emacs.d/blob/master/files/smartparens.el#2022-09-0923:11agAlternatively, you can use Emacs profile switcher https://github.com/plexus/chemacs2 Yes, it may sound weid, but Emacs doesn't have an easy way to run multiple configs on the same machine. With that profile switcher you can have e.g., Prelude based config and vanilla config. You can use one to learn, and another to build your own, extend and borrow ideas.#2022-09-0923:29Steven KatzThanks! I’ll start looking at different distros (and do more background reading)#2022-09-1500:37Drew VerleeWhen ever something gets printed to the repl, it would be useful if emacs notified me, and let me easily view it. Another emacs+cidier idea i had that i won't be able to implement any time soon.#2022-09-1501:57Drew VerleeAny users of Lsp and cider-enlightenment-mode getting this behavior in the picture where the "=> is in a weird place?"#2022-09-1511:22ericdalloSeems like that mode is printing after the lens, not sure would be possible to fix that, but you can try moving the lens to top instead of end of the line, but personally I like it on the end of the line too#2022-09-1710:18Benjaminmaybe cider-result-overlay-position 'at-point works for you#2022-09-1710:19Benjamin#2022-09-1714:11Drew VerleeNice, that's it. Thanks @U02CV2P4J6S#2022-09-1501:57Drew VerleeThe other behavior i get from enlightenment-mode is that sometimes the evaled expression won't go away 😞 .#2022-09-1710:15Benjaminrevert-buffer lol. cider--remove-result-overlay is supposed to run#2022-09-1501:58Drew VerleeWhich is a shame, because that mode is super useful as a first step tool to get more insight. Far faster then adding vars to everything. And it's more transparent then a debugger like flowstorm.#2022-09-1502:27Drew VerleeIf anyone wants to try to hack on some emacs and new features in ciderish stuff, i can't this weekend, but i would be down for trying the weekend after. Just message me here and ill set something up.#2022-09-1913:45ericdalloI just gave it a try on Emacs master, and my emacs runs smoothly with a line of 2M columns :) it seems that the long line fix is already on master 🙏#2022-09-1916:40Riccardowait what filetype are you opening that runs smooth with 2M lines?#2022-09-1916:41ericdalloA empty new buffer with no major mode just for testing purposes, I know the fix helps with major modes that uses syntax coloring, but I was already having performance issues with that buffer with even less columns than 2M#2022-09-1916:43ericdalloEven activating a major-mode like clojure-mode, it's pretty good#2022-09-2001:47Drew VerleeWhat is "it" in this case? @UKFSJSM38 lsp related maybe?#2022-09-2010:27sw1nn> it seems that the long line fix is already on master 🙏 it's in release 28.2#2022-09-2012:36ericdallo@U052D24CY Are you sure? I thought seeing somewhere it would be included only on 29#2022-09-2013:09sw1nnI think so, but some outstanding issues with correctness are still outstanding. https://lars.ingebrigtsen.no/2022/08/19/19x10/#2022-09-2112:18anonimitorafHoly shit, that's huge 😮#2022-10-1604:25blak3mill3rNow there's a compelling reason to rebuild from master. Thanks for this!#2022-09-1913:51mpenetsweet#2022-09-2109:23dev-hartmannHey folks, as I am preparing my emacs for my new full time clojure job (🎉🎉🎉) I'm pondering if switching from Lsp to eglot is actually something worth pursuing#2022-09-2109:23dev-hartmannI was hoping to have lease dependencies and use more emacs internal stuff and hopefully get an increase in performance#2022-09-2109:24dev-hartmannDid any of you switch or have any insight on this to share?#2022-09-2112:20ericdallo@U976F1AR2 did that a year or so ago#2022-09-2112:22dev-hartmannHow did it go? Easy? Have you been happy with eldoc reporting or are you using eldoc-box or something else entirely?#2022-09-2114:13kpavI made the switch somewhat recently, it was pretty easy. Also, I am using eldoc-box, just because I dont always like eldoc to be in the minibuffer, but im sure it would be fine without it#2022-09-2114:15kpavIm not sure if there were any increases in performance, but I like that eglot uses mostly built-in functionality#2022-09-2114:15ericdalloAnyone knows how good is eldoc-box comparing with posframe?#2022-09-2218:44AkizI enjoyed Eglot for a long time but i went back to lsp-mode because I was missing this one a lot https://github.com/joaotavora/eglot/issues/661#2022-09-2218:44AkizAnd DAP mode is a nice bonus 🙂#2022-09-2219:01ericdalloOh, good to know that @UBRV1HXPD! find definition of external dependencies including java stuff that clojure-lsp now supports seems quite important#2022-09-2219:02dev-hartmannThanks for the input folks #2022-09-2219:03dev-hartmannIs there a resource forbidding dap mode with clojure?#2022-09-2219:03dev-hartmann(Newbie to dap mode in general)#2022-09-2219:04Akiz@U0J8XN37Y So far I have used DAP only with C, unfortunately I don’t know any resources regarding Clojure.#2022-09-2219:05dev-hartmann@UBRV1HXPD nevermind, I go through the dap-mode readme 👌:skin-tone-4:#2022-09-2219:06dev-hartmannhttps://emacs-lsp.github.io/dap-mode/page/clojure/#2022-09-2219:07dev-hartmannFound that on the lsp document site 😅#2022-09-2219:08Akiz@U0J8XN37Y At first glance, it seemed to me that it only concerns Java.#2022-09-2219:10AkizCider is enough for Clojure, though, so I guess that’s okay.#2022-09-2219:13dev-hartmannLooks like one needs to configure the jvm for debug info#2022-09-2219:13dev-hartmannJust curious about debugging tools#2022-09-2219:14dev-hartmannNeed to further my knowledge with cider too#2022-09-2219:36ericdallothere is no dap-server for clojure... yet :)#2022-09-2219:36ericdalloI thought about creating a clojure-dap, didn't have the time yet#2022-09-2219:37ericdallobut cider debugging is quite nice#2022-09-2310:09dev-hartmannThanks for all the input! I‘m looking at the cider debugging documentation right now#2022-09-2310:10dev-hartmann@UKFSJSM38 my emacs-lisp fu is not very deep, but I'd love to help out and learn 🦾#2022-09-2310:10dev-hartmannIf in any case you want to start the clojure-dap 😅#2022-09-2310:13dev-hartmannJust saw that cider debugger had conditional breakpoints, which is super awesome#2022-09-2312:03ericdallo@U0J8XN37Y the good news is dap-mod eos already done, we just need the server side of dap which could be in any lang including clojure :)#2022-09-2315:29dev-hartmannThat sounds good, is there any resource you could share on how that's done? I'd love to give it a shot#2022-09-2315:30ericdalloYes, https://microsoft.github.io/debug-adapter-protocol/ should be a good start#2022-09-2315:36dev-hartmannAwesome, thx! Will have a look at that#2022-09-2119:41macrobartfastIf there any projectile users here… C-p seems to immediately show a list of files to jump to… I think I’m supposed to be able to add another key to tell projectile what to do (i.e. ‘r’ for replace) but r just narrows the list to files that have r in the name. Thoughts?#2022-09-2119:46pavlosmelissinosC-p does nothing on my emacs. What's the name of the command? projectile-switch-to-buffer?#2022-09-2119:47pavlosmelissinosI think you need projectile-replace#2022-09-2119:52macrobartfastaha… you’ve helped me with my question…#2022-09-2119:52macrobartfastso, I guess, projectile comes with built in bindings somehow…#2022-09-2119:53macrobartfasthttps://docs.projectile.mx/projectile/usage.html#2022-09-2119:53macrobartfastC-p does in fact do something projectiley in my setup… let me look at my .init.el#2022-09-2119:54pavlosmelissinosC-h c and then type C-p to see the command it runs#2022-09-2119:54macrobartfastaha… so I had added:
(define-key evil-normal-state-map (kbd "C-p") 'helm-projectile)
(define-key evil-normal-state-map (kbd "C-c a") 'helm-projectile-ag)
(define-key evil-normal-state-map (kbd "C-c s") 'helm-projectile-switch-project)
(define-key evil-normal-state-map (kbd "C-c b") 'list-buffers)
#2022-09-2119:55macrobartfastand that’s probably a projectile antipattern as the documentation above suggests that I’ve gone outside of somekind of baked in binding scheme of theirs.#2022-09-2119:56macrobartfasthttps://docs.projectile.mx/projectile/configuration.html#projectile-commander#2022-09-2119:56macrobartfastthat’s probably what I need to set up properly.#2022-09-2119:57macrobartfastso I just need to bind C-p to projectile-commander, apparently, instead of helm-projectile (but we’ll see).#2022-09-2119:58macrobartfastI’m as always confused by projectile vs helm-projectile and so on.#2022-09-2120:07pavlosmelissinosMost of these libraries aren't even needed imho. Just use the built-in packages until you're sure they don't cut it for you. One of my resolutions for 2023 will be to trim down my init.el 😉#2022-09-2120:09macrobartfastthat is actually sound advice… both for emacs and clojure.#2022-09-2120:10macrobartfastI mean, I reach for libraries when I could use built in features.#2022-09-2120:10pavlosmelissinosThis year I switched from ido to ivy+a bunch of other packages that supposedly "enhance" it. Sure, the result was fancier than what I had before, e.g. searches are on another level but on the other hand the new setup breaks more frequently and I don't even use most of what the packages offer :man-shrugging:#2022-09-2120:24macrobartfastthat is awesome, and I totally support it.#2022-09-2121:08macrobartfastspacemacs is probably something I should look at, but I’m holding out.#2022-09-2119:41macrobartfastterminal emacs here.#2022-09-2207:01witekHello, my eglot starts multiple lsp-servers. One for each major mode. When I open the first .clj file in my project, eglot starts a server:
[eglot] Connected! Server `EGLOT (clj/clojure-mode)' now managing `clojure-mode' buffers in project `clj'.
After that, when I open the first .cljc file, eglot starts another server:
[eglot] Connected! Server `EGLOT (clj/clojurec-mode)' now managing `clojurec-mode' buffers in project `clj'.
Same for .cljs files. Any ideas, how to configure eglot to use a single clojure-lsp server for all clojure modes (`clojure-mode`, clojurescript-mode, clojurec-mode,...) when files are opened in the same project?
#2022-09-2211:45ericdalloI don't know anything about eglot unfortunately, but the key is make sure eglot is sending the correct project root to clojure-lsp, lsp-mode has the workspace concept, eglot should have something similar#2022-09-2211:48witekIt does send the correct project root. Problem is that it sends the same project root to multiple clojure-lsp instances. One for each of clojure-mode, clojurec-mode and clojurescript-mod. 😞#2022-09-2211:49ericdalloOh, that's weird, never saw that with lsp-mode, so not sure why that is happening for eglot :(#2022-09-2211:50witekI suspect, egot has a mapping of major mode to lsp server command. And since we are using multiple major modes for Clojure, this happens.#2022-09-2212:24ericdallolsp-mode does the same, it has a mapping that triggers lsp after entering in a major mode, this is correct, but what lsp-mode does is check if that buffer/file is associated to a running workspace#2022-09-2212:25witekI will dive into Eglot code...#2022-09-2520:31ericdalloYou may be interested on https://clojurians.slack.com/archives/CPABC1H61/p1664137536766069#2022-09-2207:22macrobartfastHow can I see all the function names I have in a buffer at once? Or all the functions in a project? If I have a docstring in them would I be able to see those along with them (or other information about them)?#2022-09-2207:49witekYou can use consult-imenu to get a list of all functions in the current buffer and jump to them. And consult-imenu-multi for all functions for all buffers in the current project. This is just one way to do it.#2022-09-2216:13macrobartfastYay! Thank you.#2022-09-2209:29olyanyone now how you can get cider to start shadow, I can get it to work with connect but would quite like the figwheel experience where I just connect, how ever with shadow I get this "error shadow-cljs has not been started yet!"#2022-09-2216:05papachanCan we run some babashka tasks directly from M-x menu?#2022-09-2216:09borkdude@papachan I guess you can write some elisp that shells out to bb right#2022-09-2216:14papachandefinitively but first have to ask if something have been already done. Was looking at cider recently which detect a bb.edn file.#2022-09-2216:19borkdudeMaybe ask in #babashka as well#2022-09-2219:26teodorluHere's a start, if you want to give it a shot yourself:
(let ((default-directory "~/dev/borkdude/blog")
      (options (s-split "\n"
                        (s-trim
                         (shell-command-to-string "bb tasks")))))
  (completing-read "which task?" options))
The strings need some cleaning, though :)
#2022-09-2219:38papachanwow really cool !#2022-09-2219:46teodorluEmacs sure is hackable 😁#2022-09-2219:48teodorluYou might be interested in projectile-run-shell-command-in-root to list tasks relative to the current project root, rather than in a specific directory.#2022-09-2221:52papachanOh didnt know about projectile-run-shell-command-in-root#2022-09-2310:21dakraThere is also project-compile which is similar and built-in. And both commands project-/projectile-compile have autocomplete.#2022-09-2310:23borkdudewhen you're done with this, feel free to post the elisp snippet to the babashka wiki#2022-09-2216:31macrobartfastIs it possible to see a clj buffer in emacs in a ‘collapsed’ way… one line per defn or def and so on? I would be able to quickly see what’s in a buffer as well as the ordering is so.#2022-09-2216:33dpsuttonimenu is this#2022-09-2216:40macrobartfastYes! 🙂#2022-09-2216:41macrobartfastI see the list in the minibuffer in a different order… I would love to see them vertically stacked in a buffer in the order they actually appear (but maybe I’m using imenu differently).#2022-09-2216:42dpsuttonyou can use occur and look for def#2022-09-2216:59macrobartfastOh yes! That’s perfect!#2022-09-2217:00macrobartfasteven shows the first line and args. I should be able to create something that would show the second line of each form, then, if I have docstrings, I’d be even more set.#2022-09-2217:26dpsuttoni think occur can take args of how much context to show#2022-09-2217:27dpsuttoncheck out m-x describe-function [ret] occur#2022-09-2219:53teodorluHi! I want to use replace-regexp-in-region, but can't figure out how match a literal period in a regex. Help please? Specifically, I want to be able to mark a region around "desired input" below, and get "desired output":
Desired input:

Sentence one. Sentence two. Sentence three.

Desired output:

Sentence one.
Sentence two.
Sentence three.
#2022-09-2219:53teodorluI tried this, which didn't do what I wanted:
(defun teod/tryit ()
  (interactive)
  (replace-regexp-in-region "\\.\ " ".\n"))
#2022-09-2219:56teodorlureading https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Special.html now#2022-09-2220:02sw1nnM-x re-builder is useful for experimenting with regex in emacs. emacs regex syntax is slightly weird.#2022-09-2220:15teodorlure-builder is awesome! "\\. " might be what I want.#2022-09-2220:31teodorluI ended up going a different route:
(defun teod/one-line-per-sentence ()
  (interactive)
  (let* ((s (delete-and-extract-region (mark) (point)))
         (s2 (s-replace ". " ".\n" s)))
    (insert s2)))
I thought I had it working with replace-regexp-in-region, but it just behaved weirdly.
#2022-09-2310:19dakraNot relevant for your original question but you can check if the region is actually "active" instead of using (point) and (mark). I always use something like this in my functions that have to take a region:
(defun py2json (start end)
    "Read region in Python syntax and convert to json."
    (interactive
     (if (or (use-region-p) (not transient-mark-mode))
         (prog1 (list (region-beginning) (region-end))
           (deactivate-mark))
       (user-error "No region")))
    .... 
#2022-09-2511:36Benjamin
(with-temp-buffer
  (insert "Sentence one. Sentence two. Sentence three.")
  (goto-char (point-min))
  (replace-regexp-in-region "\\." "\\&\n" (point-min) (point-max))
  (buffer-string))
;; =>
"Sentence one.
 Sentence two.
 Sentence three."
#2022-09-2511:58teodorluNice, thanks!#2022-09-2511:57teodorlulearned a bit about s.el today. Really impressed with the library!
;; TIL
;;
;; s.el is awesome
;; a single (insert) is WAY faster than lots of (insert)s
;; s.el brings lots of goodies from clojure.string
;; FP doesn't hurt
;;
;; :)

(defun teod/trailing-lines-old ()
  ;; executes in about a second
  (interactive)
  (insert "#+BEGIN_VERSE")
  (cl-loop for i from 1 to 15
           do (insert "\n"))
  (insert "#+END_VERSE"))

(defun teod/trailing-lines-new ()
  ;; instant
  (interactive)
  (insert
   (s-concat "#+BEGIN_VERSE"
             "\n"
             (s-repeat 15 "\n")
             "\n"
             "#+END_VERSE")))
#2022-09-2512:02teodorlufor completeness, I used the full name teod/org-mode-insert-trailing-blank-lines.
(defun teod/org-mode-insert-trailing-blank-lines ()
  (interactive)
  (insert
   (s-concat "#+BEGIN_VERSE"
             "\n"
             (s-repeat 15 "\n")
             "\n"
             "#+END_VERSE")))
#2022-09-2512:03teodorluUsing M-x ... actively has really influenced how I name things.#2022-09-2512:04teodorluformatting nitpick, with a slight change of behavior:
(defun teod/org-mode-insert-trailing-blank-lines ()
  (interactive)
  (insert
   (s-concat "#+BEGIN_VERSE" "\n"
             (s-repeat 15 "\n")
             "#+END_VERSE" "\n")))
#2022-09-2512:04teodorluis "emacs aesthetics" a thing? :thinking_face:#2022-09-2514:42Benjamin
* emacs aesthetics

The set of intuitions pertaining to the feel and elegance of emacs
usage, tool crafting, and the experience of elisp code as a nice hack.
Similar to the aesthetics of architects or musicians, a skill that
one acquires and hones over many years, glimpsing ever more subtle
depths in the relationship of human and lisp program.
#2022-09-2515:52magnarsI'm glad you like it. 🙂 For clojure usage, https://github.com/expez/superstring is inspired by the s.el API.#2022-09-2521:16Drew Verleei'm going to try to write some emacs stuff in like 15 mins if anyone wants to join me. idk here or some random discord idk.#2022-09-2522:24Drew VerleeIn a very simple case, this https://github.com/clojure-emacs/cider/issues/3231 : > I'm (drew) suggesting a feature to make selecting a key from a Clojure hashmap slightly easier by having a shortcut in cider to call clojure.core/keys and produce a list that the user can select from > Is easy:
(->
   (ctx/parse-context '(-> {:a 1} __prefix__))
   first
   :form
   second
   keys)
  ;; => (:a)

Where ctx is  [compliment.context :as ctx]
However, in general, it would seem like i would have to eval the whole codebase to discover in general if the last thing was a hashmap and what it's keys were. Which is fine, but it's not something that i think makes sense to trigger on having autocomplete/tab whatever. That's why i was orginaly thinking it would be a very specific emacs function (like select-clojure-key-from-map) that would basically just insert the clojure.core/keys function into the expression, and then call eval, get the results, then feed those to autocomplete. Put another way, i don't see how the compliment library helps.
#2022-09-2603:35Drew VerleeBenjamin did in implementation of this a couple months back that i'm going to review (just to learn more elisp) and try to use and adapt as needed.
(defun cider-insert-select-key-dwim ()
  "Insert a key selection from the sexp before point."
  (interactive)
  (let* ((form (cider-last-sexp))
         (ks (cider-nrepl-sync-request:eval
              (format "(keys %s)" form)))
         (ks (car
              (read-from-string
               (nrepl-dict-get ks "value"))))
         (ks
          (completing-read-multiple "Key: " ks)))
    (insert
     (pcase ks
       (`(,k) k)
       (_ (format
           "(select-keys [%s])"
           (mapconcat
            #'identity
            (mapcar (lambda (k) (with-output-to-string (princ k))) myks)
            " ")))))))
#2022-09-2604:34Darrick WiebeHey, I'd like to streamline creation of new test files from Emacs for a Clojure project. There are a couple of minor annoyances I'm wondering if anyone here knows how to address. First is when I create the file, it seems to be created from a template. A template that I don't like very much and would like to change. How can I change it? I've noticed that if I'm starting from "vanilla" clojure under doom, this template appears:
(ns magic.script.graph.g02-edges-test
  (:require [magic.script.graph.g02-edges :as sut]
            [clojure.test :as t]))
Or if I've enabled +lsp then it produces only
(ns magic.script.graph.g02-edges-test)
I'd like to set it up for my project to be pretty maximal, pulling in a lot of things I might need. When I'm done initial development I can just get lsp to toss away whatever I didn't use. I find building up the namespace every time is an unnecessary distraction/barrier. Anyone know if this is solved already? The other thing that would be nice would be if I could will the whole file into existence (or jump to it if it exists) without having to produce a correct path. I know Cider already has a specific file path it wants you to use if you hope to use the test current namespace feature, but I've never been able to turn that into a jump to test. I used to have this in Ruby 10 years ago! 😉 I suspect these are both solved, but no luck googling it...
#2022-09-2604:51Drew Verleecan you clarify what you mean by > pulling in a lot of things I might need what does this mean? > turn that into a jump to test. #2022-09-2604:59ag> First is when I create the file, it seems to be created from a template. A template that I don't like very much and would like to change It's not from a template, check find-file-hook and see if you have cljr--add-ns-if-blank-clj-file in the list. If you want to make it a template, and I'm assuming you're using Doom Emacs (since you mentioned +lsp), you can add a file template. See if you have enabled :editor file-templates module.#2022-09-2605:40Darrick WiebeOh hey, didn't expect to see any answer already today :)#2022-09-2605:43Darrick WiebeTo clarify: > pulling in a lot of things I might need I mean optimally I'd like to refer in a large number of potentially useful things, which would vary per-project. > turn that into a jump to test. I mean that if Cider (or something) already knows where to look for a test, I'd like to be able to auto-create a file at that location if it's not there. In either case (file exists or not), I'd like to be able to jump back and forth between the related test namespace and implementation namespaces.#2022-09-2605:50Darrick WiebeHmm... I see the file templates are powered by yasnippet, which I find generally annoying to have enabled. I'll probably just stick to re-editing the test ns every time... 😅#2022-09-2618:20Darrick WiebeOh I found it!!
(defcustom cljr-clojure-test-declaration "[clojure.test :as t]"
  "The require form to use when clojure.test is in use in a clj file."
  :type 'string
  :safe #'stringp)
I'm guessing setting this in a project's dir-locals may be just the thing...
#2022-09-2618:24Darrick WiebeSure enough! This works fine for a start:
(setq! cljr-clojure-test-declaration "[clojure.test :refer [deftest testing is]]")
#2022-09-2618:33Darrick WiebeOk, I created a .dir-locals.el in my project and put this in and it works perfectly.
((clojure-mode
    (eval .
          (setq! cljr-clojure-test-declaration
                 "[clojure.test :refer [deftest testing is]]
                  [magic.script :refer [compile-python]]
                  [magic.script.passes :refer [compile-sample compile-sample* conform]]
                  [magic.script.util :refer [niceid]]
                  [pattern :refer [ok]]"))))
This is a real quality of life improvement! Now I just want to figure out quick jumping back and forth between my test namespace and the related implementation namespace....
#2022-09-2607:59pesterhazyEmacs, Monorepos, Eglot, Clojure-lsp and Project.el https://gist.github.com/pesterhazy/e8e445e6715f5d8bae3c62bc9db32469#2022-09-2613:51dakraNice, my old ob-clojure patch got finally merged in orgmode to support bb, nbb https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=764642f55b7a9821acbabcfa1e2d354afab99be7 You can (setq org-babel-clojure-backend 'babashka) and then your clojure source blocks will be evaluated with bb 🙂#2022-09-2618:01agGood job#2022-09-2618:04dakraThanks 🙂#2022-09-2618:08agSo, the first time I attempted to add something like that was 2 years ago. I sent a draft patch to mailing list, asking for help and guidance. Then only a few months later someone said: "Oh, I'd be interested in having something like that"... By that time I lost interest in trying to get this done. If they had Org source hosted on GitHub/GitLab, this wouldn't be an issue at all. Their reluctance to switch from email threads & patches to Pull requests model if not slowly killing Emacs & Org-mode (and a ton of other built-in packages), definitely slowing down the progress.#2022-09-2618:16dakraAgree that it's not ideal (I made that patch last year) but not sure if hosting on GitHub would change too much. There's simply too few people and nobody is getting paid for it. So instead of an email with patch my PR would be open for 9 month.#2022-09-2618:16agI see that wasn't your first contribution to the Org-mode source. But still, would you share your thoughts about the process? For me (I think) that was the first attempt to suggest a change, and it wasn't very straightforward and encouraging, so my first attempt became last.#2022-09-2618:18ag> So instead of an email with patch my PR would be open for 9 month. I disagree. It would be there in the open and someone would've picked it up and attempted to finish it. When your patch is somewhere in the mailing list, who would pick it up?#2022-09-2618:19agWho would even see it and know it exists?#2022-09-2618:22dakraI think it's just different and personally I would prefer GitHub as well. But that's obviously not possible because of GNU politics.#2022-09-2618:22dakraThere's https://updates.orgmode.org/ that tracks patches to the mailinglist#2022-09-2618:23dakraSo it's not that different in terms of discoverability. But github has everything streamlined and you know where the issues and PRs are for every project while with the mailing list you have to know where to look for each project#2022-09-2618:29agRight, this issue already has become generational. There's an entire generation of programmers who simply don't know how to, don't want to learn how to, and don't even care about the mailing list & patches model. And this divide would only increase and it seems to me they are not doing enough to change any of that. In a sense, Emacs has become proprietary software. It's not that you can't modify its source, it's just a hassle to get that done. Compare it with cambrian explosion of nice things for Vim in recent years. And it's all because they've simplified and streamlined the process for contributors. Not for the maintainers.#2022-09-2619:08dakraI agree. On the emacs-dev mailinglist they actually discuss about having a self hosted sourcehut as an alternative which I think would already be better but still not as nice and comfy as GitHub. At least you would have one nice view of issues and patches. I'm not a fan of debbugs.#2022-09-2619:37agThey've been talking about "the alternative" for years. But the truth is - maintainers don't care about changing the status quo to the point of actually making that change. Contributors who don't have time to be involved in maintaining the Org codebase simply won't contribute or would find workarounds like keeping changes in their configs or creating additional packages. That all creates a somewhat unhealthy, half-ass working/broken loop. For me (as I think for most programmers) contributing to Emacs/Org-mode is not much different from contributing to some kind of proprietary project. There's too much needless politics and bureaucracy involved. Sure, I would love to make contributions, but for god sake, simplify the damn process.#2022-09-2820:27Chris Clark@U0G75ARHC In a fit of ultra-deep-google-diving, I found that patch of yours like a year ago, and I’ve been using a (slightly modified) version of it ever since! Thanks for creating it. I even thought about bugging the mailing list about it, but…#2022-09-2820:44agSee? That once again, proves my point. And that's how proverbial "curse of Lisp" stays in circulation. There's no friggin "curse of Lisp", it's more like Lispers not wanting to prioritize for contributors instead of maintainers.#2022-09-2614:29borkdudeWow @daniel415!#2022-09-2615:39teodorluniiiice! I've been wanting a "babashka emacs playground" for a long time, but this is way better!#2022-09-2616:40vemv
((nil
  (clojure-mode
   (eval . (put-clojure-indent 'facts 0))
   (eval . (put-clojure-indent 'fact 0)))))
This didn't work. I think it used to for me (although I'm not much of a dir-locals guy) Did I make some syntax error?
#2022-09-2616:42dpsuttonyou can see ours here: https://github.com/metabase/metabase/blob/master/.dir-locals.el#2022-09-2616:52vemvI copied it from there 😬 it's the largest clj one I know of could be a vanilla instance of my emacs being cursed#2022-09-2616:54dpsuttonhope not. nothing special in there. I’m not sure what the 0 means versus us using 1. That stuff is pretty arcane#2022-09-2616:56vemvthat's described here https://docs.cider.mx/cider/indent_spec.html :) it works when evaled on ielm 😞 w/e, I'll use .emacs.d instead of dir-locals#2022-09-2616:57dpsuttondid you run (hack-local-variables) to refresh your .dir-locals.el?#2022-09-2616:57dpsuttonor restart?#2022-09-2618:03dakra@U45T93RA6 I think you should remove either the nil or clojure-mode scope, depending on if you want it evaluated in every buffer (`nil`) or only in clojure-mode. So for the eval in clojure-mode only it would be (untested):
((clojure-mode
    (eval . (put-clojure-indent 'facts 0))
    (eval . (put-clojure-indent 'fact 0))))
#2022-09-2622:27vemvboth tips were actually useful! first I removed the nil, and then I had to (hack-local-variables) in order for the changes to take effect#2022-09-2622:28vemvso ty 🙌 emacs#2022-09-2622:49vemv...I created a "save file" hook such that when I save .dir-locals.el, (with-current-buffer b (hack-local-variables)) will be performed for all other buffers.#2022-09-2705:33Drew Verleeso clojures' reduce has this function signature like so: (reduce f val coll). it would be cool if there was a way to move to each of those elements (f, val, coll) by name or by position. Like i can move around using the parens, or the symbols, but the f arg will likely be a lot of parens that i have to go through to get to the val or the coll. For that matter is there anything which will just print them sort of like this...
(reduce (let [[f val coll] '[(fn [total n] (+ total n))  0 [1 "2" 3]]]
          {:f f :val val :coll coll}))
#2022-09-2712:44dpsuttonStructural editing allows exactly that#2022-09-2713:39Drew VerleeI must be missing some commands then. I have next-paren and next-symbol. If i knew what each thing was i could use those to traverse it, like i said, but it wouldn't be a direct lookup.#2022-09-2713:40Drew VerleeNothing like, jump to coll.#2022-09-2716:40Benjaminhttps://github.com/abo-abo/lispy is my choice#2022-09-2717:40dpsuttonSorry I thought this was about movements. Not jumping to places#2022-09-2720:50Drew Verleethanks @U02CV2P4J6S i'm using what ever the lisp state is thats built into spacemacs, i think it's similar. @U11BV7MTK i'm probably not articulating the idea well. It occurs to me that if the params argument is a hashmap then you get this just by searching for the key. But a lot of functions, especially clojure core, are positional bc it makes them easier to write. cider and lsp both seem to be aware of positional arguments, so i'm guessing its possible to create a something to both display a mapping from parameter name to the actual argument passed in. I'm just collecting a bunch of things i'm going to try and build that i think would be useful for me and others as i learn emacs lisp 🙂 .#2022-09-2814:22pesterhazyDoes anyone know of a way to paste text as a comment? For example, I want to translate some Java code to Clojure. So I want to paste the java as a comment. If I just paste the Java code in, Emacs tries to reformat it. But I want it verbatim, but behind ;;#2022-09-2814:24otfromdo you have something like aggressive-indent turned on?#2022-09-2814:31pesterhazyYeah I do#2022-09-2814:32otfromthat will be doing the formatting then. I'm not sure how to do a paste w/o that kicking in, but I suppose you could toggle the minor mode and then comment it out#2022-09-2814:32otfromand then toggle it back on#2022-09-2814:33pesterhazyJust tried it, that works better, thanks!#2022-09-2814:35pesterhazyWould still be useful to have that as a package...#2022-09-2912:05Benjamin
(defun paste-as-comment ()
  (interactive)
  (let ((beg (point-marker))
	(end (save-excursion
	       (insert " ")
	       (point-marker))))
    (yank-pop)
    (comment-region beg end)))
first version 😛
#2022-09-2913:28pesterhazywhole guacamole, it works!#2022-09-2913:28pesterhazythank you so much @U02CV2P4J6S!#2022-09-2815:42JHi guys! I try to setup emacs but I don’t understand why ivy is not activated with this code:
(use-package ivy
  :bind (:map ivy-minibuffer-map
	 ("C-j" . ivy-next-line)
	 ("C-k" . ivy-previous-line))
  :config
  (ivy-mode 1))
When I remove the :bind , ivy is activated 😕
#2022-09-2816:18dakra:bind or :hook makes use-package lazy load the package. You have to add :demand t to always load.
#2022-09-2819:47JThanks @UFAP0C8KU for your explanation#2022-09-3016:16djmOr just changing :`config` to :init should do it.#2022-09-2916:48jjttjjIs there a way to make find-file with ido mode collapse empty directories, like how github will just show com/mydomain as a path if there's nothing else in com?#2022-09-2920:59Drew Verleeany evil users have a way to yank a keword. i can yank a word (it doesn't grap the : with yiw.#2022-09-2921:00Drew Verleecopy-sexp seems to work fine#2022-09-2921:01Drew Verleeok now how to i just replace a keyword with the one i just yanked.#2022-09-2921:59tomdtake a look at evil-inner-symbol and evil-a-symbol bound to io and ao respectively. I'm not entirely sure why they're included in evil (they're not in vim by default) but they're so useful in code buffers.#2022-09-3007:05tomd@U0DJ4T5U1 fyi#2022-09-3007:11Drew Verleety. ill take a look#2022-09-3018:22Drew Verlee@UE1N3HAJH how do i use these functions? the docs aren't clueing me in "inner symbol" "selects an inner symbol". Maybe im not invoking it correctly...#2022-09-3019:06tomdSo you would do yio on a keyword to copy it and viop on another keyword to replace it with the first.#2022-10-0304:52Drew Verleeill have to find a way to trim this down to like two keys, i do this all the time.#2022-09-3001:28Cora (she/her)oooh I didn't know about that, thanks @tomd #2022-09-3001:30Cora (she/her)maybe also relevant for other reasons https://evil.readthedocs.io/en/latest/faq.html#underscore-is-not-a-word-character#2022-09-3017:14Drew Verleewhen i try to find the source code for nconc in
(defun nrepl--eval-request (input &optional ns line column)
  "Prepare :eval request message for INPUT.
NS provides context for the request.
If LINE and COLUMN are non-nil and current buffer is a file buffer, \"line\",
\"column\" and \"file\" are added to the message."
  (nconc (and ns `("ns" ,ns))
         `("op" "eval"
           "code" ,(substring-no-properties input))
         (when cider-enlighten-mode
           '("enlighten" "true"))
         (let ((file (or (buffer-file-name) (buffer-name))))
           (when (and line column file)
             `("file" ,file
               "line" ,line
               "column" ,column)))))
via find-function emacs tells me that helm-M-x-execute-command: The C source file fns.c is not available how do i make it avialable, i want to try and debug an issue with cider enlighten-mode where the overlays (the evaled part thats showing) wont go away and blocks my cursor from moving up and down the file. Also if anyone has an alternative to using this mode, which i find really helpful, i would be open to hearning it.
#2022-10-0114:56iarenazaYou need to install the Emacs sources that were used to compile your Emacs version. Or at least the sources for the same Emacs major version (e.g., Emacs 27.x, 28.x, etc). In that case, there might be minor differences, but I wouldn't expect changes in something as fundamental as nconc. In any case, I traced the execution for (find-function 'nconc) and this is the call chain:
find-function -> find-function-do-it -> find-definition-noselect -> find-function-noselect -> 
find-function-search-for-symbol -> find-function-C-source
because nconc is a built-in function that is implemented in C (you can get that tidbit from its docstring). If you have a look at find-function-C-source you will see that it uses find-function-C-source-directory var to try and find the Emacs sources for its C files. find-function-C-source-directory will be nil if the original directory used to build that version of Emacs (whose value is in source-directory var) no longer exists. Which I suspect is your case. If find-function-C-source-directory is nil, Emacs will ask you for a directory where it can find the C source files. If you don't provide a valid one, it will tell you that it can't find the required C file (`fns.c` in your case). If you don't want to install the sources for Emacs, you can browse them either in the original GNU Savannah server, where Emacs is developed, or in the Github emacs-mirror repository. Here's a link to the nconc function definition using the Github mirror, for the Emacs 28 branch: https://github.com/emacs-mirror/emacs/blob/emacs-28/src/fns.c#L2767-L2798
#2022-10-0115:11iarenazaAlso, I've never used enlighten-mode myself, https://docs.cider.mx/cider/debugging/enlighten.html: > To stop displaying the locals you’ll have to disable cider-enlighten-mode and reevaluate the definitions you had instrumented previously. So it seems like they don't go away when you start interacting with the buffer again, and you need to manually remove them by disabling enlighten-mode.#2022-10-0116:06Drew Verlee@U8T05KBEW Thanks, yeah i'll have to look into installing the sources. Though at the point at which i'm reading C i'm probably going to forget what i was looking at in the first place 🙂 . For me, on doom (no personal customization to the init file) and spacemacs, with emacs 28.1 installed via a snap on ubuntu, enlighten mode doesn't always removing highlighting. So i'm trying to figure out why by debugging it. Hopefully i'll make some progress today.#2022-09-3020:45Karol WójcikDoes anyone know how to complete npm commands like on regular terminal with zsh, but in eshell or in shell?#2022-09-3022:39Drew Verleeif i run "shell" in emacs, my "shell" does to autocomplete. But i'm using spacemacs so it's possible they set something by default there.#2022-09-3022:39Drew Verleeoh npm commands...#2022-09-3022:41Drew Verleeyea npm instal* where * is the cursor also doesn't offer "install" as an option. I feel like it's probably best to use a shell for anything really shelly.#2022-10-0107:53elkenhttps://github.com/JonWaltman/pcmpl-args.el may help there but some configuration might be needed.#2022-10-0109:20Karol WójcikThanks, I found a way to make it work. Switched from shell/eshell to vterm#2022-10-0215:27Daniel Slutsky@plexus is there a recommended channel for questions about https://github.com/corgi-emacs/?#2022-10-0304:33plexusYes, the lambda island discord 😊 jk maybe it's time to make a channel for it.#2022-10-0306:18macrobartfastI somewhat randomly found and use paredit-comment-dwim to comment lines, which prepends the line with ;; … however, is there something that puts the reader macro #_ in front of a form?#2022-10-0618:29Benjaminclojure-toggle-ignore defined in clojure-mode so everybody has this. There is some more refactorings like moving a var to a let#2022-10-0510:27JHi guys! I have some trouble to configure clj-kondo and emacs with use-package (see: https://clojurians.slack.com/archives/CHY97NXE2/p1664955578510879)#2022-10-0511:27rolti'm not sure i understand the problem. clj-kondo-clj is properly configured. Do you want both clj-kondo-clj and clj-kondo-edn ? from the name i'd quess clj-kondo-edn should only run on .edn files. Is there a problem when you enable flycheck-mode ?#2022-10-0511:32JSorry for the explanation. In fact, clj-kondo error and warning are not reported in the current buffer.#2022-10-0511:42rolti'm not sure i understand, have you tried enabling flycheck-mode ? M-x flycheck-mode or M-x global-flycheck-mode#2022-10-0511:52JOk M-x flycheck-mode works! Thanks @U02F0C62TC1. But when I restart emacs with this configuration. flycheck-mode still disabled#2022-10-0511:59ericdalloYou may be interested on setting up lsp support which already has clj-kondo built-in on clojure-lsp: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/#2022-10-0511:59roltflycheck-mode will enable in it a single buffer, global-flycheck-mode will enable it for every buffer for instance to enable it after init:
(use-package flycheck
  :config (add-hook 'after-init-hook 'global-flycheck-mode))
but you could also use something like:
(use-package clojure-mode
  :config (progn ... (add-hook 'clojure-mode-hook 'flycheck-mode)))
#2022-10-0512:00rolttrue, lsp has it and a lot more ! ❤️#2022-10-0512:05JThanks @UKFSJSM38 and @U02F0C62TC1. clojure-lsp can be used with cider ?#2022-10-0512:05ericdalloYes!#2022-10-0512:06ericdalloI mention on that guide, lsp == static analysis, like IDE features while cider == runtime, repl features#2022-10-0512:06ericdalloI use it daily for years both together#2022-10-0512:07ericdallohttps://clojure-lsp.io/features/you will find all lsp features supported#2022-10-0512:16JOk got it! I will then try clojure-lsp 🙂 Thanks @UKFSJSM38 for your explications.#2022-10-0512:20ericdalloNo problem, happy coding!#2022-10-0513:36borkdude@UHZPYLPU1 Glad to see your problem is solved. If there's anything that would be helpful to add to flycheck-clj-kondo's README, feel free to submit a PR.#2022-10-0513:42J@U04V15CAJ yes, I wanted to do this 🙂 for the plain install with flycheck (without lsp). @UKFSJSM38 convinced me to try clojure-lsp#2022-10-0513:42borkdudeHe always does :)#2022-10-0513:42borkdudeFor the record, I'm also using clojure-lsp, clj-kondo is an integral part of that#2022-10-0513:46ericdallohaha sorry for that#2022-10-0513:48borkdudeno problem: clojure-lsp rocks :-)#2022-10-0513:19Benjaminbabashka tasks via shell-command in emacs: https://benjamin-asdf.github.io/faster-than-light-memes/bashing-is-better-than-extending.html#2022-10-0513:37borkdudeI get a 404#2022-10-0513:49BenjaminOh 1 sec#2022-10-0513:50BenjaminYea now it is back#2022-10-0513:53borkdudeCool! Also want to share it in #news-and-articles?#2022-10-0513:53BenjaminI wasn't sure because it is quite emacs specific#2022-10-0703:21Drew Verlee@U02CV2P4J6S that was an interesting read (i got most of the way through...) i had some things not work for me mid way and i'm not sure why.#2022-10-0808:50Benjamin@U0DJ4T5U1 if you feel like it you can post me your errors#2022-10-0703:22Drew Verleewhy does my .dir-locals.el file contain a list which immediately contains another list? this is how i have only ever seen dir-local files.
((nil . (
         (cider-clojure-cli-aliases  . "-A:dev")
         (cider-preferred-build-tool . clojure-cli)

         (cider-ns-refresh-before-fn . "reloaded.repl/suspend")
         (cider-ns-refresh-after-fn . "reloaded.repl/resume")

         )))
#2022-10-0703:23elkenIt's an alist of cons cells with (mode . list-of-vars) where nil mode just applies to every mode#2022-10-0703:24Drew Verleewhat would including another top level list do?#2022-10-0703:24Drew Verleeand thanks, that makes sense.#2022-10-0703:29elkenI imagine it'll either read it as normal still or do nothing, but I'm not 100%.#2022-10-0703:34Drew Verleegotcha.#2022-10-0703:49agit all explained in great detail in the manual. https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#2022-10-0704:01Drew Verleeit says it "should hold a list" not what happens if you put more then one in. I would argue that if something has to do something, then remove the choice. In this case, just have the file contents get wrapped in alist. e.g
(clojure . (...))
vs
((clojure . (...)))
it feels like the top level list is for another program's convenience. idk. i'm learning emacs and elisp so i'm knit picking things. those dir-local.el files have been a headache of mine for years because i haven't learned elsip. Now that i know a tid bit, i still dont understand the list in list thing there from a UX perspective.
#2022-10-0704:06Drew Verleei mean, if clojure files were like:
((ns core)) 
would also be weird to me.
#2022-10-0704:06elkenThe first example is just a single cons cell. You can have multiple modes, which is why an alist is needed#2022-10-0704:07Drew Verlee
(clojure ..)
(clojurescript ...)
#2022-10-0704:08elkenThose are individual cells yeah, they still have to be in a list#2022-10-0704:08Drew Verleewhen you parse the file you can add the list. I'm saying they made it easy for the machine, not the humans.#2022-10-0704:09elkenThey're best edited with M-x commands rather than manually add-dir-local-variable#2022-10-0704:10Drew Verleethat is news. let me try that 🙂#2022-10-0704:12Drew Verlee🕺#2022-10-0704:12Drew Verlee:mirror_ball:#2022-10-0704:12Drew Verleethanks @U043RSZ25HQ, ill be doing that from now on, autocomplete and everything. that's why i was poking at this, because it felt too hard.#2022-10-0704:13elkenNo worries! 😄#2022-10-0704:14Drew Verleei need to stop saying "you" in conversations when talking about some obscure thing like emacs function that reads the dir-locals file. It's a terrible and lazy habit.#2022-10-0704:41ag> when you parse the file you can add the list. I'm saying they made it easy for the machine, not the humans. Ya, after Clojure, Elisp may look weird and not very human-centric. Wait till you get to write some sizable elisp functions. In Clojure we have hashmap - simple and straightforward, universal structure. Elisp has alists, plists, hash tables, classes, cl-defstructs, and more.#2022-10-0704:43agIf Elisp wasn't a Lisp dialect and had syntax similar to I don't know C or even Lua, I'd probably hate it. I do tolerate it only because it's a Lisp.#2022-10-0710:54anonimitorafI've recently started using cider-inspector a lot and it's awesome I was wondering what it would take to support highlighting to make it easier to read the (long) java methods?#2022-10-0713:40ericdalloI think @U0CKBRBD2 https://github.com/clojure-emacs/orchard/blob/master/doc/inspector.org#datafiableon cider inspector, maybe he knows?#2022-10-1013:12r0manHi @UR37CBF8D, I recently added support for Datafy and Nav to the Cider inspector. I documented some of what I learned in this document [1]. The backend (cider-nrepl) sends the data to be rendered to the frontend (Cider) under the :rendered key you can see here [2]. The content of :rendered is a protocol that has been adapted from SLIME. It contains some special directives to instruct the client how to render things. At the moment we support the rendering of string literals, and the special :newline and :value directives. I know that SLIME also had an :action directive, but we don't have this in Cider. At the moment I think none of these directives do support any styling. So, to get this working I believe the protocol or one of the directives might need to be extended. For Emacs only, maybe we could add some font lock rules which does the job? [1] https://github.com/clojure-emacs/orchard/blob/master/doc/inspector.org [2] https://github.com/clojure-emacs/orchard/blob/master/doc/inspector.org#inspecting-an-object#2022-10-1013:13r0manMaybe @U051BLM8F has an idea how to best accomplish this?#2022-10-0718:50dev-hartmannHey folks, I’m trying doom eMacs atm. #2022-10-0718:51dev-hartmannI’m trying to add an on-save hook to cider-format-buffer but can’t get it working somehow. Does someone know how to do it?#2022-10-0719:03agCan you post your snippet in #C01GE5PD249?#2022-10-0719:04dev-hartmannSure, just need to fetch my computer 😅#2022-10-0719:14dev-hartmann
(after! cider
  (add-hook 'clojure-mode-hook 'cider-fromat-buffer)
  (add-hook 'clojurescript-mode-hook 'cider-fromat-buffer))
#2022-10-0719:15dev-hartmannnormally I’d set it withing the use package :config, but don’t know how to do it here#2022-10-0719:19dev-hartmannAhh… how stupid. I did copy the wrong part#2022-10-0719:19dev-hartmannIt needs to be the before-save hook :melting_face:#2022-10-0722:13lread@U0J8XN37Y there is also a #C01GE5PD249 channel!#2022-10-0808:48dev-hartmann@UE21H2HHD thx! didn’t know that#2022-10-0907:23elkenAll you've done there is run the function when the mode is started. Doom already comes with an autoformatter (that is currently undergoing a refactor) :editor format with an optional +onsave flag, I would recommend this instead. If you insist on using cider-format-buffer, you'd have to create a function to check if the major-mode is clojure-mode/`clojurescript-mode` and add it to after-save-hook to run cider-format-buffer (And yes, as others have pointed out this is better suited to #C01GE5PD249)#2022-10-1108:44dev-hartmann@U043RSZ25HQ thx for your answer#2022-10-1108:45dev-hartmannteam policy is using cljfmt, so it’s not really my call 🙂 I found the after! macro in doom and wrote an after! cider fn that adds cider-buffer-format to the save-hook#2022-10-1108:46dev-hartmannwould be awesome to have the (format +onsave) option configurable#2022-10-1108:46dev-hartmannbut tbh I think I dislike the my current after! cider solution and am going to switch to a .dir-locals approach#2022-10-1109:07elkenI see. The refactor is what I'm working on & I was going to move to cljfmt anyway. > team policy is using cljfmt, so it’s not really my call You can use set-formatter! to change which formatter is called > would be awesome to have the (format +onsave) option configurable In what way? > but tbh I think I dislike the my current after! cider solution and am going to switch to a .dir-locals approach I don't think either are particularly cleaner, but if you have ideas on improving it there's a discourse post on it here https://discourse.doomemacs.org/t/editor-format-refactor/2644#2022-10-1109:09dev-hartmann@U043RSZ25HQ wow, didn’t know set-formater! did exist. That’s actually what I meant with configure format +onsave 🙂#2022-10-1109:09dev-hartmannthx for your in depth answer!#2022-10-1109:09elkenAh I see 😄 Glad I could answer there then haha#2022-10-1109:10dev-hartmannyup, a really nice coincidence 🙂#2022-10-1109:15dev-hartmann@U043RSZ25HQ since you know way more about it than myself, would you set cljfmt as a formatter or cider-buffer-format, which seems to be a wrapper arround that#2022-10-1109:18elkenI haven't dug into what cider formatting does really, so I'd lean to the former personally. But the new module refactor will also let you use elisp functions as well as shell commands; so it could be moot. As long as it produces clojure code that satisfies work constraints; that's what matters 🙂#2022-10-1109:19dev-hartmannthat’s true 🙂 it’s just that the cider-format fn does everything I need and I haven’t used cljfmt from the cli so I need to read it’s documentation#2022-10-1109:21elkenIf the after! does what you need it to then I'd probably say stick to that. I'm endeavouring to get the refactor done as fast as I can, so hopefully when that goes up it should simplify things 😄#2022-10-1109:22dev-hartmannmakes, sense. It was just that little voice in my head trying to find ‘a nicer way’ … will leave it for no, but at least I have a deeper understanding of doom now, thanks for that!#2022-10-1109:23elkenNo worries 🙂 I think I pointed it out before but there's also #C01GE5PD249 here too 😄#2022-10-1109:23dev-hartmann👍 I joined it#2022-10-0920:33witek[Code Folding] I would like to fold (defn ...) blocks. I have tried origami, but it also folds all nested forms inside my top level defn. Any suggestions how I can setup a folding of only the top level forms?#2022-10-0920:41elkenhideshow should be able to do what you want. Check the https://www.gnu.org/software/emacs/manual/html_node/emacs/Hideshow.html and customize hs-special-modes-alist as needed. Tree-sitter should also be able to handle this, but it's spotty support wise atm, can't comment on how good Clojure's is.#2022-10-1020:08Franco Gasperinoany tips on setting emacs (terminal) to interpret ALT_L as control and ALT_R as meta w/o xmodmap and blowing up the rest of my X11 setup?#2022-10-1109:09elkenIt's up to the terminal to decide how to interpret them, not emacs. You'd have to look at the docs for whichever terminal emulator you're using. xmodmap is by far the easiest solution, but some sophisticated emulators should let you rebind there.#2022-10-1518:36Benjaminsetxkbmap Example:
# left ctrl is hyper, caps is control, menu key (next to right ctrl on  my keybord) is another super
# check the man page of `setxkbmap` and grep
# /usr/share/X11/xkb for options
setxkbmap -layout us -option ctrl:swapcaps_hyper,nodeadkeys,nbsp:level3,altwin:menu_win
#2022-10-1518:37Benjaminah I see I didn't know you want a solution for emacs only#2022-10-1303:19macrobartfastDoes anyone use anything for code folding? To just see all the first lines, say, of each code block. I found hideshow but it doesn’t seem to work, so I thought I’d check to see if there is something more popular before troubleshooting it. UPDATE: I got hideshow working but I’ll leave this here in case anyone has an alternate approach. Using vanilla Emacs in a terminal. Fun/baffling fact: the stock binding for hiding all forms in in a buffer is C-c @ C-t ! Does anyone really type that? 😳#2022-10-1303:58macrobartfastThe approved answer in this worked well for toggling hiding on all forms in a buffer, fyi: https://emacs.stackexchange.com/questions/20922/hiding-and-showing-all-blocks-with-one-binding
(defun my-hs-toggle-all ()
  "If anything isn't hidden, run `hs-hide-all', else run `hs-show-all'."
  (interactive)
  (let ((starting-ov-count (length (overlays-in (point-min) (point-max)))))
    (hs-hide-all)
    (when (equal (length (overlays-in (point-min) (point-max))) starting-ov-count)
      (hs-show-all))))
#2022-10-1306:43dmegasI actually do use C-c @ C-t to navigate a namespace 😅 ! Along with C-c @ C-a for showing all hidden forms.#2022-10-1309:15dakraI use tarsius bicycle package for a toggle hide/show function https://github.com/tarsius/bicycle#2022-10-1317:51macrobartfast@U9V9M9MFZ I’m impressed! And with the time you save not having to resolve binding collisions like me you can get a lot more done. 👍#2022-10-1516:45pppaulwhat is the customize name for the default code folding in emacs?#2022-10-1516:50pppauli just tried bicycle mode and it's not working reporting "Before first heading" in the minibuffer#2022-10-1516:51pppaulfor global fold "Found no heading"#2022-10-1516:54pppauli don't see these error messages in it's code, so i guess they are from a dep#2022-10-1604:28blak3mill3r@U0X9N9ZK5 with all the RSI you save by setting up custom keymaps for every new mode like me, you can have plenty of time for resolving binding collisions over the next 50 years of programming#2022-10-1901:15Young-il ChooFunny. I was just rebinding these to two key strokes. Some of these are bound to like emacs news or something that I hardly ever use. I find the first to be the most useful, so is bound to the double C-h. (require 'bind-key) (bind-key "C-h C-h" 'hs-toggle-hiding) (bind-key "C-h C-k" 'hs-hide-block) (bind-key "C-h C-n" 'hs-hide-all) (bind-key "C-h C-y" 'hs-show-all) (bind-key "C-h C-l" 'hs-hide-level)#2022-10-1908:33macrobartfastI actually weirdly went the route of using chords to toggle…
(key-chord-define-global "fs" (lambda () (interactive) (hs-toggle-all)))
(key-chord-define-global "fd" (lambda () (interactive) (hs-toggle-hiding)))
#2022-10-1908:33macrobartfastIt feels strange but it’s super fast to use them.#2022-10-1516:51lilactownanyone use doom and have a replacement for spacemac's "lisp state"?#2022-10-1516:57respatializedhttps://github.com/syl20bnr/evil-lisp-state It seems like it's available as a standalone library#2022-10-1517:02lilactownthe setup wasn't straightforward. looks like others are confused how to configure it https://github.com/syl20bnr/evil-lisp-state/issues/48#2022-10-1517:02lilactownso I'm looking for if there's a "blessed" way#2022-10-1517:03ag@U4YGF4NGM scroll through #doom-emacs there was a discussion not long ago#2022-10-1517:03lilactownI'm trying to figure out how to use the "lispy" doom module but, the documentation is lacking#2022-10-1517:03lilactownah ty#2022-10-1518:31BenjaminI made a home inside lispy. There is also symex and a few others#2022-10-1518:32BenjaminDavid Wilson recently made a stream about paredit https://www.youtube.com/watch?v=FiFMZwQbgOM#2022-10-1518:33Benjaminhere is also a list https://systemcrafters.net/live-streams/september-30-2022/ I didn't check out Puni myself yet#2022-10-1709:18anonimitorafI personally use symex and found it more intuitive than evil-lisp-state (but each to their own)#2022-10-1518:30BenjaminBlog post about how I ditched the scratch buffer: https://benjamin-asdf.github.io/faster-than-light-memes/scratching-in-space.html#2022-10-1522:10vemvI agree on the problem being solved. last Spring I came up with a different approach: https://clojurians.slack.com/archives/C099W16KZ/p1649608080276719 no need to compare of course, but I'm happy with mine because otherwise I'd end up with many useless files (at least for my usage patterns)#2022-10-1521:33lilactownanyone tried out meow?#2022-10-1523:38fedregyes, it's really good!! much more lightweight than evil. Used it for a while while i was getting used to vanilla keybindings#2022-10-1601:09lilactownI'm trying to get it to work using straight.el. for some reason, the setup code isn't working for me
(use-package meow
  :config
  (require 'meow)
  (meow-setup)
  (meow-global-mode 1))
#2022-10-1601:09lilactown
Error (use-package): meow/:config: Symbol's function definition is void: meow-setup
#2022-10-1601:15lilactownooohhh I'm an idiot, I'm supposed to define that myself#2022-10-1601:38lilactown@U5J5ME2NQ what do you use for window management?#2022-10-1602:57fedregyeah.. you define your own meow-setup but it's kind of nice because all the config is right there explicitly defined in that one fn in your config. ... no magic no WM at the moment b/c I'm on Mac. i3 in the past on linux#2022-10-1604:34lilactownsorry I meant managing windows in emacs#2022-10-1604:35lilactownI've come pretty far in the last 3 hrs. it's a big change from spacemacs#2022-10-1604:35lilactownI'm dissatisfied with the whole keypad thing. specifically, I can't figure out how to get it to show the name of the variable that a prefix is bound to#2022-10-1604:36lilactownI wish I could replace the keypad with something like general.el, but there doesn't seem to be any way to turn it off#2022-10-1616:58fedreg> sorry I meant managing windows in emacs Ah, yes, of course 😊 as for keypad I also didn't use it much, but did you see there is a discussions on the repo? They're really responsive and the lead dev, DogLooksGood is/was a clj dev so is really helpful with any cider issues as well#2022-10-1714:48lilactowninteresting, do you mainly use key chords then?#2022-10-1714:55fedregIIRC, keypad is just the thing that lets you replace C-x or C-c prefixes, right? And by default you get the spacebar as a replacement? I used that but just stuck a few common functions in that mapping, with the space leader. For everything else I was trying to use the vanilla keybindings. Here's the meow-setup I used back then
(defun meow-setup ()
  (setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
  (meow-motion-overwrite-define-key
   '("j" . meow-next)
   '("k" . meow-prev))
  (meow-leader-define-key
   ;; SPC j/k will run the original command in MOTION state.
   '("j" . "H-j")
   '("k" . "H-k")
   ;; Use SPC (0-9) for digit arguments.
   '("1" . meow-digit-argument)
   '("2" . meow-digit-argument)
   '("3" . meow-digit-argument)
   '("4" . meow-digit-argument)
   '("5" . meow-digit-argument) 
   '("6" . meow-digit-argument)
   '("7" . meow-digit-argument)
   '("8" . meow-digit-argument)
   '("9" . meow-digit-argument)
   '("0" . meow-digit-argument)
   '("/" . meow-keypad-describe-key)
   '("b" . ido-switch-buffer)
   '("f" . ag-project)
   '("g" . magit-status)
   '("G" . magit-blame-echo)
   '("l" . switch-to-previous-buffer)
   '("o" . other-window)
   '("z" . fzf-find-file)
   '(";" . comment-line)
   '(">" . sp-forward-slurp-sexp)
   '("<" . sp-forward-barf-sexp)
   '("?" . meow-cheatsheet))
  (meow-normal-define-key
   '("0" . meow-expand-0)
   '("9" . meow-expand-9)
   '("8" . meow-expand-8)
   '("7" . meow-expand-7)
   '("6" . meow-expand-6)
   '("5" . meow-expand-5)
   '("4" . meow-expand-4)
   '("3" . meow-expand-3)
   '("2" . meow-expand-2)
   '("1" . meow-expand-1)
   '("," . meow-inner-of-thing)
   '("." . meow-bounds-of-thing)
   '("[" . meow-beginning-of-thing)
   '("]" . meow-end-of-thing)
   '("/" . isearch-forward)
   '(";" . meow-reverse)
   '("'" . repeat)
   '("a" . meow-append)
   '("A" . meow-open-below)
   '("b" . meow-back-word)
   '("B" . meow-back-symbol)
   '("c" . meow-kill)
   '("e" . meow-find)
   '("f" . meow-next-word)
   '("g" . meow-cancel-selection)
   '("G" . meow-grab)
   '("h" . meow-left)
   '("H" . meow-left-expand)
   '("i" . meow-insert)
   '("I" . meow-open-above)
   '("j" . meow-next)
   '("J" . meow-next-expand)
   '("k" . meow-prev)
   '("K" . meow-prev-expand)
   '("l" . meow-right)
   '("L" . meow-right-expand)
   '("n" . meow-search)
   '("o" . meow-block)
   '("O" . meow-to-block)
   '("p" . meow-yank)
   '("q" . meow-quit)
   '("Q" . meow-goto-line)
   '("r" . meow-replace)
   '("t" . meow-till)
   '("u" . meow-undo)
   '("U" . meow-undo-in-selection)
   '("v" . meow-visit)
   '("w" . meow-mark-word)
   '("W" . meow-mark-symbol)
   '("x" . meow-delete)
   '("V" . meow-line)
    '("<escape>" . mode-line-other-buffer))) 
(now I use God mode instead)
#2022-10-1714:57fedregI thought there was some advanced usage of keypad but I never dabbled in it. Didn't have a use for it, I guess#2022-10-1715:11lilactowncool, thanks!#2022-10-1715:12lilactownI've started my journey building my own emacs config, based around meow and straight.el#2022-10-1715:13lilactownI've been using spacemacs for a few years now. never used god mode#2022-10-1715:13lilactownwhat led you to choose god mode?#2022-10-1715:22fedregI also started with spacemacs about 5 years ago (coming from Vim) but pretty quickly made my own config with heavy use of evil, general, etc... This worked great for a while but eventually I got sick of all the places where evil wasn't supported (even with evil-collection...) or where I needed to debug something.. and so wanted to get more familiar with native Emacs bindings.. It was too hard to go full on vanilla emacs after so long with vim bindings so tried Meow for a while (having also played with kakoune for a bit...) which I really enjoyed but it was always just going to be a stepping stone on the path to vanilla bindings. God-mode is a tiny package (maybe 600 loc..) that just makes it so you don't have to hold down modifier keys... So instead of doing C-f, C-b to move, i just do f or b etc.. And it's somewhat modal in that you go in and out of it to insert text but light enough that you always learn the underlying native keybindings. Keeps my config pretty small and makes it easier to pair with non-evil teammates#2022-10-1606:28teodorluHi 🙂 Org-mode help wanted. TL;DR: I have an image on a an url like this: - no jpg extension. Is it possible to hotlink to this image from an org-mode document? When I try [[, I get an a href, but I want an img src in my HTML. Any ideas? Are there org-native solutions to this that I'm not aware of? More details in thread. Thanks!#2022-10-1606:41teodorlufor reference, Here's the live page: https://play.teod.eu/kosekoding/ Here's my current full org source: https://github.com/teodorlu/play.teod.eu/blob/master/kosekoding/index.org And the text is all in Norwegian, sorry for that. Here's a https://play-teod-eu.translate.goog/kosekoding/?_x_tr_sl=auto&amp;_x_tr_tl=en&amp;_x_tr_hl=en&amp;_x_tr_pto=wapp. But the idiomatic Norwegian ("kos") carries over very poorly. (https://www.visitnorway.com/typically-norwegian/kos-means-having-a-good-time/)#2022-10-1607:08teodorluFull set of details: Normally, I just link to images like this:
[[./cat.jpg]]
But I want to hotlink to this image:

(rich explaining simple vs easy, first attached image)

But when I do this:

[[
Org-mode naturally makes a link for me, and my resulting HTML has an <a href=".." ..., which is not what I wanted (second attached image). I'm aware that I can hand code the HTML like this:
#+BEGIN_EXPORT html
<img src=""></img>
#+END_EXPORT
but I'd like to avoid that. It's tedious to write, and doesn't work when I export to other formats.
#2022-10-1611:00blak3mill3rone way to achieve this would be to write elisp that does exactly what your tedious, hand-coded HTML solution does...#2022-10-1611:01blak3mill3ryou can even do this with a saved macro (in org-mode) http://xahlee.info/emacs/emacs/emacs_macro_example.html#:~:text=Save%20Keyboard%20Macro,x%20insert%2Dkbd%2Dmacro%20.#2022-10-1611:01blak3mill3rthis is probably the easiest way#2022-10-1611:02blak3mill3rwriting an interactive elisp function would be more readable than a saved macro#2022-10-1611:09blak3mill3rbut if you just want a solution in minimal time, saving a macro is likely the most efficient way to automate some repetitive action that you do yourself (once you get used to it)#2022-10-1611:10blak3mill3rI will add that I am an org-mode noob, and this recommendation isn't specialized to org-mode ... I suspect it will work fine, but I'm not certain#2022-10-1612:26teodorluHuh, good point. I could just write myself a function. I'd still have to track the full export block in git, though.#2022-10-1612:27teodorluThank you! 💯#2022-10-1612:40blak3mill3rYeah, if you don't want to track the full export block in git, you'll need to change (or, fix?) the code in org#2022-10-2108:36Benjamindon't know if you figured it out but I see something in ox-html :html-inline-images#2022-10-2108:37Benjaminalso the docstring of org-export-inline-image-p#2022-10-2109:03teodorluLack of image preview isn't really a big problem for me. It's more that I'd like to write normal org-mode syntax, not random html blocks =/#2022-10-2109:04teodorluThat's what I meant with "org-native" - but I realize that's kind of vague....#2022-10-2109:05BenjaminI'm certain you can make it export <img> tags with normal org links#2022-10-2109:07teodorluI'd love to see a counter example to the thing I posted in the OP :) Basically - I have an image that's missing its jpg extension, and it becomes a link rather than an image in html.#2022-10-1718:55mkvlrI’m trying to live-code a completion by finding the inlined compliment namespaces bundled with my cider and add a defsource for it:
(cider.nrepl.inlined-deps.compliment.v0v3v12.compliment.sources/defsource ::my-source
  :candidates #'candidates
  :doc #'doc)
not seeing my candidates function being called though. Has anybody tried this before?
#2022-10-1718:59vemvfairly confident that it works. can retry myself if needed. @U0DJ4T5U1 was playing with this recently?#2022-10-1719:03mkvlrhmm, and should I be able to print from the candidates function or should that show up elsewhere (compared to my other print statements)?#2022-10-1719:04vemvprintlns might be swallowed - I'd go for an atom#2022-10-1719:04mkvlrok, tried that as well, I’ll try again#2022-10-1719:15mkvlrstill not seeing it (all-sources) does list it though and it has :enabled true#2022-10-1900:06vemvsorry for the delay. This works perfectly for me:
(def calls (atom []))

(defn candidates [prefix ns context]
  (swap! calls conj [prefix ns context])
  [])

(defn doc [s ns]
  (swap! calls conj [s ns])
  nil)

(blah-blah.compliment/defsource ::foo
  :candidates #'candidates
  :doc #'doc)
...after hitting m<TAB> , @calls will have a "m" in it
#2022-10-1900:06vemvso I'd suggest to start by that minimally viable snippet. build your way up iteratively - if it stops working, perhaps Compliment has some sort of try/catch#2022-11-0119:47mkvlrsorry, took me forever to get back to this. Still can’t get it to work using your snippet, here’s exactly what I have but the calls atom stays empty. Anything I should be doing except typing in Emacs?
(ns my-custom.completion-source)

(defonce calls (atom []))

(defn candidates [prefix ns context]
  (swap! calls conj [prefix ns context])
  [])

(defn doc [s ns]
  (swap! calls conj [s ns])
  nil)

(filter #(clojure.string/includes? (str %) "compliment") (all-ns))

(cider.nrepl.inlined-deps.compliment.v0v3v12.compliment.sources/defsource ::foo
  :candidates #'candidates
  :doc #'doc)
#2022-11-0122:35vemvI'd suggest starting by determining if the issue is client-side (elisp) or server-side. try triggering completions over the clojure repl (no elisp involved) after your source has been defined. Do you see the results you'd normally see in Emacs? After that, have the atoms changed?#2022-11-0601:28Drew Verleethe atom stays empty for me too after trying the same code as vemv linked.#2022-11-0601:29Drew Verleewould it be possible to do a quick huddle or something on this? I'm guessing there is something obvious i'm missing about getting the right feedback here.#2022-11-0601:37Drew Verleei see completions for m<tab> but the atom doesn't change.#2022-11-0601:37Drew Verlee@U5H74UNSF did you get anywhere with this?#2022-11-0601:42Drew Verleeif i call the clojure code directly, (candidates ....) then obviously the atom gets mutated.#2022-11-0601:46Drew VerleeI'm guessing what i'm expecting is for m<tab> to work, but it doesn't because my emacs logic isn't hooked up to complement logic i cloned down. It's been a while sense i messed with this, maybe compliment starts a server and i can tell emacs to talk to it instead of the one created off the code from the official branch.#2022-11-0602:15vemvhey! no, compliment doesn't create any servers. as indicated by the cider.nrepl.inlined-deps.compliment.v0v3v12 prefix, this namespace is 'inlined' by cider-nrepl. your emacs is only talking to cider-nrepl, through nrepl, through cider.el#2022-11-0602:17vemv> (candidates ....) then obviously the atom gets mutated. that's good news. one further experiment you can run is: instead of invoking candidates (presumably from the Compliment library), invoke the cider-nrepl code that invokes the compliment library. i.e simulate what cider-nrepl message does when receiving a completion nrepl "op"#2022-11-0602:17vemv(this code is fairly easy to navigate and comprehend - I'd encourage you to take a look since it's exactly what I'd do. I don't know it by heart!)#2022-11-0602:19vemvthis is the ns https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/complete.clj , the only non-obvious thing is that the compliment namespaces get the cider.nrepl.inlined-deps prefix at CI release time.#2022-12-0714:44Phillip Mateswas running into this issue today as well. Seems like cider-nrepl has a strict set of compliment sources it uses: https://github.com/clojure-emacs/cider-nrepl/blob/804eec7ae73ba2f0f098a57108359f68966a34c8/src/cider/nrepl/middleware/complete.clj#L25-L35 looks like it was included when clj-suitable support was added (https://github.com/clojure-emacs/cider-nrepl/pull/641) to allow toggling between clj and cljs completion sources. maybe the filtering could be done by having sources include the languages they work over. Or the :enabled map entry could be set to false (https://github.com/alexander-yakushev/compliment/blob/39d444f5d9f15d9ab8499c312e3639c9fc14489d/src/compliment/core.clj#L78)#2022-10-2206:37macrobartfastI asked a variant of this before but can’t find the answer… is there any shortcut (paredit or otherwise) that will prepend the discard symbol #_ to a form the pointer is in?#2022-10-2207:35tomdWith smart-parens:
(defun discard-form ()
  (interactive)
  (save-excursion
    (sp-backward-up-sexp)
    (insert "#_")))
#2022-10-2207:36tomdor you could use paredit-backward-up if you use paredit#2022-10-2207:49agfolks, the command you're looking for already exists in clojure-mode. it's clojure-toggle-ignore#2022-10-2207:50tomdAh, nice! Much simpler#2022-10-2208:37magnarsRegardless of what already exists, I think it is a good idea to learn some basic emacs lisp in order to start the journey of improving your own editor.#2022-10-2208:59agWhat do you mean by "it is a good idea"? I'd put it differently. It's a requirement. You don't say: "it's a good idea to learn how to be calm and control your body to learn aikido..." - that's the whole purpose of it. Emacs is like aikido - the whole purpose of it is to run Lisp. And as you said - it's a journey, just like with aikido, there's no "completion", you just keep learning it.#2022-10-2213:30lreadI feel like the grasshopper who has not yet snatched the pebble#2022-10-2218:32macrobartfastI am a grasshopper who has not grasped the pebble.#2022-10-2218:34macrobartfastI appreciate all the answers… what exists already and also examples of how to do it myself. Both are great. Thank you all!#2022-10-2218:36macrobartfastI didn’t find clojure-toggle-ignore as an option in my Emacs; I found this online, too: https://gist.github.com/yuhan0/38ac43c764017917fc3f3e5dc9104f1b#2022-10-2218:38macrobartfastI’ll try @UE1N3HAJH’s code… I’m not sure actually how to make that something I can run with a binding… diving into the init.el… send help if I’m not back in five days.#2022-10-2220:12tomdIt was added in Feb 2021, so you may need to upgrade your clojure-mode package if it's older than that. If you want to stick with my code (whose behaviour is different, and may be what you prefer) or some code that you write, running with a binding would simply look like:
(define-key clojure-mode-map (kbd "C-#") #'discard-form)
#2022-10-2207:49agfolks, the command you're looking for already exists in clojure-mode. it's clojure-toggle-ignore#2022-10-2217:04otfromanother weekend where I'm going to try to have a working and shareable emacs config that plays well with nix (and includes things like org-roam, evil, emacs 29, pdf-tools)#2022-10-2220:11jjttjji've also been fully trying to convert to nix this weekend (with mixed results so far)#2022-10-2218:21lilactownnix: not even once#2022-10-2219:05elkenIt doesn't mix well with emacs, the nix version of Emacs has always been plagued with random issues that packaged versions just don't have. It's nice for .files until I move it to guix home though#2022-10-2219:18lilactownI wish guix worked on macOS#2022-10-2219:18lukaszI'm testing switching from lsp-mode to eglot - so far so good, but one thing I'm missing is code action for adding requires to the namespace macro - is that not supported by eglot or something?#2022-10-2220:09vemvmaybe Eric @ #CPABC1H61 knows this sort of thing well?#2022-10-2315:54lukaszYeah, i figured it's better to ask here first since it's more related to Emacs, but I'll there, thanks!#2022-10-2220:11jjttjji've also been fully trying to convert to nix this weekend (with mixed results so far)#2022-10-2300:05lilactownI've attempted to use emacs for email and failed#2022-10-2300:10Drew VerleeI want to get excited about guix, because (shocker) i like lisp. But i get really nervous because i don't understand the arguments about free software and they seem to be too "consuming" for me, like if i have spare energy i'm going to go jog, not worry about nuclearwarglobalwarmingandalotofotherpain. Or at least free software issues rank fairly low on the list for me. But at the same time, i get the impression a lot of lock in services do so because they have lost their competitive edge.#2022-10-2300:12Drew VerleeI bet I could observe this in nature, if i knew how to look.#2022-10-2318:36macrobartfastI just got a lot farther with helm and projectile and it’s a game changer! The one thing I’m still struggling with is getting a buffer up that would show all functions in a project organized by file that has fuzzy narrowing by typing. I often forget which file a particular function is in and this would help me a lot. Any thoughts?#2022-10-2817:11Benjamingit-grep project wide. Personally I use consult git-grep and ripgrep. There are helm-projectile commands for this. It is good enough in clojure projects I find. Symbol names are usually unique#2022-10-2318:38lukaszhelm + ctags?#2022-10-2318:38lukasz(or etags)#2022-10-2318:40macrobartfastI’ll take a look!#2022-10-2318:42macrobartfastAnother and different need (but this is a bit out there and may not exist): is there any way to see a tree of function calls in a buffer? What I mean is, if (foo) calls (bar) and (biz)… and (biz) calls (baz)… I should be perhaps able to get a textual tree of those calls that I could navigate and jump to the defn for them. All the better if I could browse down the tree and see the defn’s in a buffer open to the side without the pointer going there… sometimes called ‘peeking’. Any other approaches to this are welcome. I spend a lot of time walking my code base with jump-to and then I have to get back. (part of the problem I am trying to solve is from my poor code organization and, probably, using functions in too imperative a style; getting better at those aspects will also help).#2022-10-2318:46fedregmaybe this? https://docs.cider.mx/cider/debugging/tracing.html not sure about jumping to def from there though...#2022-10-2318:46macrobartfastOh wow… that is sweet and in the right direction!#2022-10-2318:47macrobartfastAnd this would also help me previsualize function calls, probably, before I start writing them.#2022-10-2319:28vemvAre you seeking this? https://clojure-lsp.io/features/#call-hierarchy hierarchy is static, tracing is dynamic (both are perfectly fine and can easily complement each other)#2022-10-2319:32macrobartfastThat pretty much looks like it! I’ll play with it.#2022-10-2817:12BenjaminI you want a list of vars in a buffer imenu#2022-10-2417:55eggsyntax[EDIT - solved] Emacs/Spacemacs making me a bit crazy today. Anyone see what I'm doing wrong here? I'm defining a general binding for M-<up> like so:
(define-key evil-normal-state-map (kbd (right-mod "<up>"))
  #'(lambda () (interactive) (jump-to-same-indent -1)))
And a different binding in org-mode like so:
(evil-define-key '(normal insert) 'org-mode-map
  (kbd "M-<up>") 'outline-backward-same-level)
But the org-mode bindings are showing up in all modes. If on the other hand I wrap the org-mode binding like
(with-eval-after-load 'org-mode
  (evil-define-key '(normal insert) 'org-mode-map
   (kbd "M-<up>") 'outline-backward-same-level))
then the non org-mode bindings apply everywhere, including org-mode buffers. Anyone have a clue for me?
#2022-10-2419:52tomdif you try the evil-define-key without quoting 'org-mode-map then I don't think you'll see this binding showing up in all modes#2022-10-2419:54tomdyou don't need to do the with-eval-after-load thing because evil-define-key already handles this: > If `foo-map' has not been initialized yet, this macro adds an > entry to `after-load-functions', delaying execution as necessary.#2022-10-2419:56eggsyntax> you don't need to do the with-eval-after-load thing because evil-define-key already handles this: That's what I expected, just casting around since it wasn't working > if you try the evil-define-key without quoting 'org-mode-map then I don't think you'll see this binding showing up in all modes Ahhhh that makes total sense and now I see that that matches the evil-define-key docs. <testing>#2022-10-2419:57eggsyntaxBingo! Thank you so much, that was driving me absolutely crazy 🙏#2022-10-2419:57tomdGlad it's fixed 🙂#2022-10-2511:13maleghastDoes anyone know how to cider-jack-in from Doom Emacs..? I switched from Spacemacs (because I could not get Spacemacs to work on WSL2 any longer) and now I love the way Doom Emacs feels and behaves, but I can't get it to work with CIDER... 😞#2022-10-2511:21jkxyzIf you do M-x (or SPC :) and type cider-jack-in it shows you the keybindings 😉 They're only bound in clojure-mode though#2022-10-2511:21maleghastThx!#2022-10-2511:15otfromM-x cider-jack-in doesn't work? (not a doom user and there is a #C01GE5PD249 channel as well)#2022-10-2511:22maleghastAnswer above in thread is all I needed, but I will join the channel, thanks @otfrom#2022-10-2610:20mpenettrying out eglot today, since it was in the news lately. So far so good, most of the stuff that I used to dislike about it was fixed since last time I tried it. But there's still one important missing bit, it can't jump to defs inside a dependency like lsp-mode does.#2022-10-2610:21mpenetthen about the move to core emacs, personally I am not a fan, it makes pulling "nightly" changes a bit tricky and the discussions are scattered in 2 places now#2022-10-2610:23mpenetthere's a patch in the works for this tho : https://github.com/joaotavora/eglot/issues/661#2022-10-2610:42ericdalloYep, we are discussing some options there#2022-10-2612:39lispers-anonymousAs long as the clojure-lsp configuration value :dependency-scheme is "zipfile" (currently the default), then loading up this elisp allows you to navigate to jars https://git.sr.ht/~dannyfreeman/jarchive/tree/main/item/jarchive.el#2022-10-2614:11mpenetoh nice, I have to try it out#2022-10-2614:45mpenetthe path it sends me to seems wrong: it's something like /foo/bar/baz/file:/home/mpenet/<...>. Without the prefix (current dir, it would work)#2022-10-2614:46lispers-anonymousCan you view the contents?#2022-10-2614:46mpenetno, it creates a new buffer on that location#2022-10-2614:46mpenetIf I try to open the jar path separately I suppose it would work#2022-10-2614:47mpenetmy setup might just be broken#2022-10-2614:47mpenet
(use-package jarchive
  :straight (jarchive :type git
                      :host nil
                      :repo "")
  :hook ((clojure-mode . jarchive-setup)
         (clojurec-mode . jarchive-setup)))
#2022-10-2614:47mpenetI only did that#2022-10-2614:49lispers-anonymousI don’t know much about straight, but assuming it’s loaded, can you call M-x jarchive-setup before using xref-find-definitions ?#2022-10-2614:49mpenetyes#2022-10-2614:49mpenetjarchive--file-name-handler is first in file name handler alist#2022-10-2614:49mpenetso I guess it should work#2022-10-2615:00lispers-anonymousUpdate: resolved the issue in dm. :dependency-scheme was set to "jar".#2022-10-2615:00mpenetyes, I assumed I never modified that, but I had apparently#2022-10-2610:44ericdallo@yyoncho made a POC of A Emacs fork implementing non-blocking and async JSONRPC support. I still need to test it myself, but he said is way faster than current Emacs sync JSONRPC support https://github.com/emacs-lsp/emacs#2022-10-2614:30elkenAh glad he's here too 😁 I've posted it on doomscord for a few others to try#2022-10-2619:31CarloWhen I hover on the name of a declaration, like foo in:
(def foo
  ,,,)
emacs will suggest in the minibuffer the complete name: my.namespace/foo. How can I copy the complete name of an identifier in the clipboard?
#2022-10-2620:04lispers-anonymousI don’t have a straightforward way to get it into the clipboard, but executing the command eldoc-doc-buffer ought to open a buffer where you can copy the contents from.#2022-10-2620:07CarloThank you! So that seems to work when I have no cider open. Otherwise it returns:
def: ([def symbol doc-string? init?])
#2022-10-2620:09lispers-anonymousHuh, when cider is open does my.namespace/foo still appear in the minibuffer?#2022-10-2620:11Carloso, that def: ... stuff appear first, as I move the cursor my.namespace/foo appears again#2022-10-2620:12Carloit seems that I'm getting two streams of information, but when I actually invoke the function I only get def: ([def symbol ...])#2022-10-2620:13lispers-anonymousYeah, I think some of it is coming from cider-doc and not eldoc. You might try making sure the foo-form is evaluated by cider. And with that, using cider-doc instead of eldoc-doc-buffer#2022-10-2620:15lispers-anonymousThat’s a ways off from just wanting it dumped into the clipboard though. You might be able to write a custom function to do it with what is available in cider.#2022-10-2620:41CarloThank you for pointing me in the right direction @UDVJE9RE3! I ended up with:
(defun med/select-namespaced-symbol ()
  (interactive)
  (let* ((sym  (symbol-name (symbol-at-point)))
         (info (cider-var-info sym))
         (docstring (cider--docview-as-string sym info)))
    (kill-new (-first-item (s-lines docstring)))))
#2022-10-2620:41lispers-anonymousVery cool! Glad I could help#2022-10-2811:41dev-hartmannI am a total noob when it comes to emacs lisp, but I want to read a projects deps.edn and extract its aliases and present to ciders jack in#2022-10-2811:42motformI'm not sure if cider already have the capacity to do something like that, but you might want to look at https://github.com/clojure-emacs/parseedn to get data out of deps.edn#2022-10-2811:43dev-hartmannAwesome, you preceded my question 👌:skin-tone-4:#2022-10-2813:14teodorluYou could also shell out to babashka and write normal clojure :) I normally work with EDN like that.#2022-10-2813:15dev-hartmannThis was actually my first thought, call a script and reach for the result in emacs#2022-10-2813:16dev-hartmannI‘m looking for the how to do that atm since my emacs foo is lacking 😅#2022-10-2813:17teodorluMine too 😂 Way more comfortable in clojure.#2022-10-2813:17dev-hartmannHaha, exactly… :rolling_on_the_floor_laughing:#2022-10-2813:17teodorluI can dig up some of my code when I'm in front of a computer in an hour or so#2022-10-2813:18dev-hartmannThat‘d be awesome! #2022-10-2813:19dpsuttonCider does this for shadow I think. You could just modify that#2022-10-2813:19dev-hartmannOh, didn’t know that… will have a look there #2022-10-2813:19dev-hartmannThx#2022-10-2813:22dev-hartmannJust found it in the docs. Cider jack in cljs does parse it from the shadow-Cluster file#2022-10-2813:29dev-hartmannhttps://github.com/clojure-emacs/cider/blob/master/cider.el#L854#2022-10-2813:29dev-hartmannShould be similar to this#2022-10-2813:30dev-hartmannSry, this#2022-10-2813:30dev-hartmannhttps://github.com/clojure-emacs/cider/blob/e9324acf81391f089932c657b70031ae3c3d0824/cider.el#L863#2022-10-2814:09teodorluas I'm reading my code, I'm realizing that my approach of writing Clojure forms and parsing them as quoted Elisp is probably a very very bad idea. But I promised to post the code, so I'm posting the code 🙂
(require 's)

(defmacro t-comment (&rest _) "Do nothing."
  nil)

(defun t-str (&rest xs)
  "Join XS into string."
  (apply #'s-concat
         (mapcar (lambda (s)
                   (format "%s" s))
                 xs)))

(defun t-bb-fun (form)
  "Convert quoted FORM to Babashka shell invocation."
  (t-str "bb -e " "'" form "'"))

;; Example:
;;
;;   (t-bb-fun '(assoc *input* :message "Hello!"))

(defmacro t-bb (form)
  "Convert FORM to babashka shell invocation."
  (list 't-bb-fun (list 'quote form)))

(t-comment
 ;; here's an example:

 (shell-command-to-string
  (t-bb (+ 1 2)))
 ;; => "3\n"

 (message
  (shell-command-to-string
   (t-bb (hash-map :x 1 :y 2))))
 ;; from *Messages"
 ;;
 ;; "{:y 2, :x 1}"
 )
#2022-10-2814:10dev-hartmannthanks!#2022-10-2814:10dev-hartmannI already mimiced the cider function , but just parsing deps.edn#2022-10-2814:11dev-hartmanncider actually uses the same package you recommended for parsing edn 🙂#2022-10-2815:01dev-hartmannwohoo…. got it working 🙂#2022-10-2815:05dev-hartmann
(defun cider--deps-parse-aliases (hash)
  (let* ((builds (when (hash-table-p hash)
                   (gethash :aliases hash)))
         (build-keys (when (hash-table-p builds)
                       (hash-table-keys builds))))
    (append build-keys '(:none))))

(defun cider--deps-get-aliases ()
  (let ((deps-edn (concat (clojure-project-dir) "deps.edn")))
    (when (file-exists-p deps-edn)
      (with-temp-buffer
        (insert-file-contents deps-edn)
        (let ((hash (car (parseedn-read '((map . identity))))))
          (cider--deps-parse-aliases  hash))))))

(defun cider-get-deps-aliases ()
  (interactive)
  (let ((options (completing-read "Select alias to run: "
                                      (cider--deps-get-aliases))))))
#2022-10-2815:05dev-hartmannjust in case someone cares 🙂 feedback welcome#2022-10-2908:22Benjamin
(cider--deps-parse-aliases  hash)
there is a space too many. Here is 1 way to put it into a command:
(defun cider--deps-parse-aliases (hash)
  (let* ((builds (when (hash-table-p hash)
                   (gethash :aliases hash)))
         (build-keys (when (hash-table-p builds)
                       (hash-table-keys builds))))
    (append build-keys '(:none))))

(defun cider--deps-get-aliases (deps-edn)
  (cider--deps-parse-aliases
   (car (with-temp-buffer
	  (insert-file-contents deps-edn)
	  (parseedn-read '((map . identity)))))))

(defun cider-jack-in-with-an-alias-from-deps ()
  (interactive)
  (if-let* ((deps-edn (concat (clojure-project-dir) "deps.edn"))
	    (_ (file-exists-p deps-edn)))
      (let* ((my-alias
	      (completing-read "Select alias to run: " (cider--deps-get-aliases deps-edn)))
	     (cider-clojure-cli-aliases
	      (concat
	       cider-clojure-cli-aliases ":" my-alias)))
	(call-interactively #'cider-jack-in-clj))
    (user-error "no deps.edn file in project")))
I updated cider--deps-get-aliases to be more inside out + and it takes the file as an arg. But your version is fine
#2022-10-2908:40BenjaminI made a version using dash pattern matching
(defun cider--deps-parse-aliases (edn)
  (-when-let*
      (((m) edn)
       ((&hash :aliases aliases) m))
    (append (hash-table-keys aliases) '(:none))))

(defun cider--deps-get-aliases (deps-edn)
  (cider--deps-parse-aliases
   (with-temp-buffer
     (insert-file-contents deps-edn)
     (parseedn-read '((map . identity))))))
#2022-10-2908:53dev-hartmannNice! Looks really clean!#2022-10-2908:56dev-hartmannWill try this evening to append the result to the jack-in command#2022-10-2908:57dev-hartmannThe plan is to check the preferred-build tool var, to either parse the project.clj profiles or deps.edn aliases. Check if there’s anything that overrides the default repl command and then do the jack in#2022-10-2908:58dev-hartmannBut first trying to get the happy path working 😅#2022-10-2908:58dev-hartmannAs my emacs lisp skills are lacking #2022-10-2908:58Benjaminsounds like you can use cider-project-type#2022-10-2910:06dev-hartmannCool! Still haven’t explored the cider code enough 😅#2022-10-2816:31caumondHi guys, I have a multi repo, and my issue is that subprojects are recognized as projects. If I understand it well this is due to my projectile setting. So all searches are done in the subproject only. I would like to stick to the global mono repo and stop the auto discorvery thing, but I don't know how to do. Can you gave me a clue what's the best option to search, I tried many and failed many times already. If useful, the global repo I want to stick to is a git repo, the subrepo are recognized as clojure projects.#2022-10-2818:48lukaszSetting this: https://github.com/lukaszkorecki/command-center/blob/master/settings/lk/navigation.el#L32-L38 made it workable for me - find-file works with in a sub-project and C-c p p shows a project selector so I can jump between different codebases within a single repo#2022-10-2821:10Chris ClarkThat’s surprising that projectile is discovering the sub-projects first. Do you have .git directories in each of the subprojects or something? One thing you can do is put a .projectile file in the directory where you want projectile to consider the project.#2022-10-2913:12caumondyes, I don't get the link between the doc I read and the behavior I end up with. Maybe a behavior of setup layers I use: doom + lsp clojure... In anycase, the .projectile solution seems to work. thx @U01ERKW6F18. I keep your solution @U0JEFEZH6 in case the other one is not actually not working. Thanks for the help!#2022-10-3009:31BenjaminTrying out meow coming from evil. What is the scheme for defining keys say "lispy mode" + "meow normal" -> 1 thing "lispy mode" + "meow insert" -> 2nd thing#2022-10-3017:06lilactowndo you mean changing what the meow modes do when in a particular major or minor Emacs mode?#2022-10-3107:29Benjaminyes for instance I want to define "C-l" in normal mode to a lispy command, but only in lispy mode#2022-10-3115:57lilactownI'm not sure if you can do that, since meow uses a single global keymap for each meow state#2022-10-3115:59lilactownwhat I did is define my own meow "paren" state, which I can toggle into through a key in normal state, that has all my lisp actions#2022-10-3116:05lilactownyou could perhaps write a lambda that you bind to C-l that would read the current meow state, and run the command you want based on that#2022-10-3116:11Benjaminyea, interesting.#2022-10-3018:01ericdalloemacs Good news for doom-emacs users that use lsp-mode for any language: https://github.com/doomemacs/doomemacs/pull/6909 fixed lsp-mode prompting the project root of external dependencies, now it should consider external files as part of the current workspace 🎉#2022-10-3022:58Carloin the new parens of the dead series, @magnars can get completion for functions in external modules by only writing the alias and the slash. What function allows me to do that? edit: it works now, I had to call lsp-workspace-restart#2022-10-3023:23ericdalloThis is a feature that is available from clojure-lsp or via clj-refactor, it should work properly with clojure-lsp, LMK if otherwise#2022-10-3101:19vemvfor completeness: clj-refactor's is named cljr-slash . it's very well-maintained as it's our #1 feature!#2022-10-3123:50agDoes anyone know why lsp-mode won't respect :cljfmt :indents option? I have .lsp/config.edn in the project root. It has something like:
{:cljfmt {:indents
          {my-macro [[:inner 0]]}}}
Now, I expect (and I think it used to work) that if I run M-x lsp-format-buffer it would format it this way:
(my-macro foo bar
   (let [],,, )
but it still does this:
(my-macro foo bar
          (let [],,, )
Anyone knows how to diagnose and fix this?
#2022-10-3123:53ericdalloIt's a clojure-lsp feature, could you paste lsp-clojure-server-info?#2022-10-3123:56ag@UKFSJSM38 I figured it out#2022-11-0100:01agI'm using worktrees, and when you have a tree like this: . └── work └── my-project └── worktree 1 └── worktree 2 It expects the ~/.lsp/config.edn to be at my-project, not at "worktree 1" level. I dunno know why though. Maybe because there was ~/.lsp folder there already. Maybe I should try removing it.#2022-11-0100:04agnope, deleting it doesn't help. I had to to remove the root folder "my-project" from the workspaces.#2022-11-0100:04agit got confused because there was a workspace at "my-project" root, and then "sub-projects"/workspace folders inside.#2022-11-0100:07ericdalloClojure-lsp will check in the server root, which you configured lsp-mode previously#2022-11-0100:08agRight. Sorry for the noise.#2022-11-0122:29weavejesterDoes anyone know how lsp-mode determines whether or not to activate for a major mode? I'm taking my first steps writing a major mode, and the first issue I'm having is that LSP expects to know about it.#2022-11-0122:34ericdalloYes, on lsp-mode.el there are specific major modes that will trigger specific lsps, I think it's customizable and later you could add your major mode there as default if you want#2022-11-0122:35weavejesterBut I don't want LSP to trigger at all.#2022-11-0122:36ericdalloHum, if doesn't know about that major mode it should not ask for anything, what exactly happens?#2022-11-0122:38ericdallohere you can see a lsp declares what major modes should be activated: https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-clojure.el#L439#2022-11-0122:40ericdalloAnd https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-mode.el#L730 is the variable that you could customize it, maybe your file extension is matching some of those?#2022-11-0122:42weavejesterThat's what I'd have assumed - that it would ignore modes it doesn't know about. Instead it says "Unable to calculate the languageId" and "The language you are trying to use may not have built-in support for LSP".#2022-11-0122:42weavejesterI suspect it's occurring because I'm deriving my mode from clojure-mode.#2022-11-0122:42ericdalloMaybe something is triggering the minor-mode lsp?#2022-11-0122:42ericdalloOh, maybe#2022-11-0122:43ericdalloHum, I didn't know derived modes would trigger lsp-mode#2022-11-0122:43weavejesterBut there's nothing in clojure-mode.el that would suggest it's linked to LSP directly...#2022-11-0122:43ericdalloMakes sense though, as in the end is a clojure-mode too#2022-11-0122:45weavejesterI guess there must be something tied to LSP that the mode inherits, but I'm not sure where to begin looking for it.#2022-11-0122:47weavejesterLooks like other people have had similar problems. It appears to be an issue with LSP not handling derived modes well.#2022-11-0122:49weavejesterI guess LSP mode is activated via a hook, and derived major modes inherit hooks. I could no inherit from Clojure-mode and just copy the parts I need, I guess.#2022-11-0122:51ericdallomaybe you could try to include your major-mode to lsp-disabled-clients#2022-11-0122:52weavejesterYeah, though I don't want to tie it to LSP.#2022-11-0122:53ericdalloYeah seems like a limitation indeed: https://github.com/emacs-lsp/lsp-mode/issues/3053#issuecomment-903655032#2022-11-0122:54ericdalloSo maybe support LSP on your major mode, or add do the black list variable 😕#2022-11-0123:15weavejesterI'll ask on the LSP Discord server they have, see if they have any ideas. Otherwise I might try copying the pieces I need from clojure-mode.#2022-11-0123:20ericdalloI'm following your thread there, probably only yoncho will know, he will be available only in about 4-5 hours though#2022-11-0123:21weavejesterI'm in no hurry#2022-11-0123:22weavejesterI've been playing around with a superset of edn, and I wanted to make a major mode to handle syntax highlighting.#2022-11-0123:23ericdalloSounds cool!#2022-11-0123:23weavejesterIt's an excuse to learn more about emacs modes, syntax tables and font locking at least!#2022-11-0123:24ericdalloHaha Nice, I learned a lot about it when coding lsp-mode's semantic tokens#2022-11-0315:32Matthew TwomeySurvey Q: I find that I use sp-wrap-round allthe_time_ but I have not yet bound it to anything keywise. What do other folks do here? (I’m using doom fwiw)#2022-11-0315:39jkxyzWith evil-cleverparens it's called by the binding for M-(#2022-11-0315:40jkxyzYou also get M-[ and M-{ for wrapping in a map or vector#2022-11-0316:02magnarsYes, these are the bindings ☝️ ❤️#2022-11-0316:03Matthew TwomeyNice. Sounds like a couple solid votes for evil-cleverparens (I hadn’t heard of it)#2022-11-0316:09magnarsI'm not using evil-cleveparens, but I do approve of those bindings 😅#2022-11-0316:22otfromwould sp-wrap-around be in visual mode?#2022-11-0317:10Matthew TwomeyI use it typically by positioning point at the start of the form#2022-11-0318:29ag> (I’m using doom fwiw) @U0250GGJGAE we had related discussion not too long ago here in #doom-emacs: https://clojurians.slack.com/archives/C01GE5PD249/p1664832575526619#2022-11-0403:51Matthew TwomeyThanks all! Some good ideas here and things to check out 🙂#2022-11-0316:53DiegoDoes anyone else runs into problems with “Too many open files” while using lsp on a mac?#2022-11-0316:55ericdalloMaybe lsp file watch is scanning folders which shouldn't#2022-11-0316:56Diegohow can I know what is it watching?#2022-11-0316:57ericdalloWe used to have on lsp-mode a way to check that but I don't find it anymore#2022-11-0316:57ericdallomaybe try disabling for now and check if it keeps happening#2022-11-0316:58ericdallolsp-enable-file-watchers#2022-11-0317:05Diegothank, I’ll try that. What happens if I disable that?#2022-11-0317:07ericdalloEmacs will not know when a file was changed outside the editor, for example git branch switches#2022-11-0317:07ericdalloand then lsp may become outdated in its analysis, requiring a restart#2022-11-0317:07ericdalloI never disable that or suggest to do that#2022-11-0317:07ericdalloit was a suggestion just to check if the too many open files was related to file watchers#2022-11-0317:09DiegoI see. I’ll report back if it happens again#2022-11-0318:06mpenetno issue here, on some pretty large (mono)repos#2022-11-0318:11ag@U7AMPCPU2 next time it happens try running (file-notify-rm-all-watches)#2022-11-0318:20DiegoThanks for the tip @U0G75ARHC#2022-11-0318:26agOf course. And if the version of emacs you have doesn't have that function, here it is, you can probably just copy it into your config:
(defun file-notify-rm-all-watches ()
  "Remove all existing file notification watches from Emacs."
  (interactive)
  (maphash
   (lambda (key _value)
     (file-notify-rm-watch key))
   file-notify-descriptors))
#2022-11-0320:33Diegothank you#2022-11-0511:05CaseyAt the bottom of many namespaces I tend to have a "rich comment", one of the first forms in this comment is a do form pulling state out of the integrant repl system. I usually mark the end of this sexp with a ;; rcf comment. I'd like to bind a key in emacs/cider that jumps to that form, evals it, then puts the point back where i was editing. I've no idea how to go about this in elisp. Any pointers or prior work here?#2022-11-0518:37tomdSomething like this?
(defun eval-rcf ()
  (interactive) ;; you have to do this to be able to bind it to a key or M-x it
  (save-excursion ;; this is what returns the point to where you started
    (goto-char (point-max)) ;; go to end of buffer
    (if (re-search-backward " *;; rcf" nil t) ;; search backward, don't throw an error
        (cider-eval-last-sexp) ;; the cider fn which evals the last form
      (message "No rcf found!")))) ;; if the search fails, show a message in the echo area

(define-key cider-mode-map (kbd "<f8>") #'eval-rcf)
you may have to adjust the regexp to find the exact point where you want to execute the eval, and of course the keybinding to your liking
#2022-11-0521:38CaseyWow yes, that worked right away. Thanks a bunch, especially for the comments. It's very readable and straightforward.#2022-11-0615:30Cora (she/her)ooooh#2022-11-0611:25Drew VerleeAre you (anyone interested) able to follow these https://docs.cider.mx/cider/usage/code_completion.html#fuzzy-candidate-matching and get it working? If so, let me know, then I'll know the issue is on my end...#2022-11-0621:00Drew Verleeand now it (fuzzy search) works, though i changed nothing. wtf.#2022-11-0621:02Drew Verleewhats happening is i seem to get getting two sets of completion the later is "helm completion" i think the former might be offered up by lsp?#2022-11-0621:03Drew Verleei don't know if thats a problem or what, but it's probably a hint.#2022-11-0621:04Drew Verleei still get both if i set "lsp-competion-enable" to nil#2022-11-0621:12Drew Verleeyou know what, i think it literally does take like 30 seconds to warm up or something. On a fresh restart i don't get the fuzzy search the first couple times then it kicks in.#2022-11-0621:14Drew VerleeI might have some weird issue where sometimes some things don't get loaded in properly or something. That would make a lot of sense given how random my experience with autocomplete seems to be.#2022-11-0613:16ericdallo#2022-11-0618:46Matthew DiLoretoFor those who use yasnippet, but can never remember the syntax, you might find this useful: https://mjdiloreto.github.io/posts/yasnippet-helpful-buffer/#2022-11-0721:29Drew VerleeWhat command would i run post git merge to walk through all the git 3 way merge conflicts and resolve them with that 3 way split window?#2022-11-0721:38Drew Verleei'm so confused, i just did a three way merge, hit save session, and when i get back to the git status window it's still there like i did nothing. Oh i need to refresh#2022-11-0721:38Drew Verleeits 2022 why do i need to refresh#2022-11-0721:41Drew Verleei'm shocked spacemacs didn't have these auto save variables set to true. https://magit.vc/manual/magit/Automatic-Refreshing-of-Magit-Buffers.html#2022-11-0722:01vemvis this what you're looking for? https://clojurians.slack.com/archives/C099W16KZ/p1652185550397489#2022-11-0722:29Drew Verleei have that set already, im worried its actually messing with my other settings. I mean look at this nonsense:#2022-11-0722:29Drew Verleethats the result of "magit-ediff" > staging#2022-11-0722:31Drew Verleeyeah lol, i think that setting is whats messing with my head so much. It's like putting the 3 way merge in such a way that i can't use built in emacs ediffing.#2022-11-0722:35Drew Verlee@U45T93RA6 yes, that's what i wanted. What i wanted to uninstall :lol. I had no idea it had that effect. This has been driving me nuts for a couple months now!#2022-11-0721:59Drew VerleeI feel like i have to hunt down the files with conflicts and call magit-ediff on all of them.#2022-11-0814:45CaseyI have a buffer that is constantly hanging emacs. When I toggle-debug-on-quit and C-gduring the hang, I get this backtrace. I suspect the problem is related to the fact that I am using local vars named comment (shadowing clojure.core/comment). Based off this backtrace can anyone point me in the direction of which project I should report this to? (FWIW I'm using latest doom emacs)#2022-11-0814:53dpsuttonmost likely clojure-mode.#2022-11-0814:53dpsuttonOne thing is check if clojure-toplevel-inside-comment-form is t. Try setting it to nil and seeing if that helps#2022-11-0814:54dpsuttonI think this could be the “top of defun” feature is breaking with the overload of comment#2022-11-0814:54CaseyOh it's definitely t I use that feature alot#2022-11-0814:54CaseyI'll try disabling it and see if the hangs stop.#2022-11-0814:54dpsuttonagree. I do as well#2022-11-0814:54vemvit look like a good mixture of things 🌀 lsp, markdown, clojure-mode#2022-11-0814:55Caseyi'm not sure where the markdown is coming from 😕 aside from the fact that the doom markdown package is enabled. not sure why it's running in my clojure-mode though#2022-11-0814:56vemvthe root of your stacktrace says lsp-fontlock. you might want to disable it. CIDER already provides sweet font-locking which is not exclusive at all with clojure-lsp#2022-11-0814:58Caseywhat is font locking exactly?#2022-11-0815:03vemvhttps://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html syntax highlighting basically#2022-11-0815:06dpsuttonI suspect this might be related to lsp ui? Maybe the doc popups? Perhaps it grabs the source and puts it inside of a markdown string and renders that?#2022-11-0815:26ericdalloNot really, it's a lsp-mode core feature, that when hovering in a element, it shows the docs of the symbol, so we font-lock the clojure code#2022-11-0815:26ericdallobut I do see clojure-mode on the exception, and my guess is there the issue#2022-11-0815:27ericdallolsp font-locking just called clojure-mode font locking#2022-11-0815:27vemvbut it's wrapped in markdown (as seen in the stacktrace), surely that makes it unparsable to clojure-mode#2022-11-0815:30ericdallohum, odd, I think it should not cause any issue as all other LSP langs do the same#2022-11-0815:30ericdalloclojure-mode should at least ignore I think#2022-11-0815:34vemvignore what - arbitrary markdown syntax? seems an odd requirement :thinking_face: I'm hypothesizing about how this stuff works, just by judging the stacktrace, but if markdown is passed to clojure-mode, better to strip the markdown delimiters beforehand#2022-11-0815:36ericdalloExplaining better the feature: • client requests information about the symbol, docs, clojure code example etc via lsp hover request • server response with custom markdown showing all the docs + clojure code as a string. • client(Emacs) just delegate to the major mode to apply font locking on what is inside the clojure markdown, but AFAIK it should not send markdown to clojure-mode#2022-11-0815:38vemvchecking out the stacktrace again, the string starts with comment not (comment that's the issue - unbalanced parentheses (either on the buffer itself, or due to some bug in the responsible code)#2022-11-0815:42ericdalloI think it's expected to have invalid code all the time while developing, shouldn' t clojure-mode handle that better?#2022-11-0815:44vemvdepends on the definition of invalid code you should have balanced parentheses 99% of the time which emacs makes really easy although it is to be confirmed that @U70QFSCG2’s buffer actually has unbalanced parentheses#2022-11-0815:46ericdalloI think we should not expect user has a paren tool or something like that, at least o clojure-lsp, clj-kondo we always need to handle invalid code which is more common that we think#2022-11-0815:46vemvlet's keep it simple and determine first the actual issue :)#2022-11-0816:06CaseyI use lispyville and lispy to prevent unbalanced parens.#2022-11-0816:07CaseySo no.. there aren't unbalanced parens in this case (though it can happen if you paste in text containing unbalanced parens, but that wasn't the case here)#2022-11-0816:09Casey> One thing is check if clojure-toplevel-inside-comment-form is t. Try setting it to nil and seeing if that helps This definitely fixed it.. when nil I don't get any hanging#2022-11-0816:09Caseyhere is a full stacktrace (the previous was cutoff)#2022-11-0816:10dpsuttonnice. if we can figure out a minimal case we can solve it. don’t think we can use runtime information to know that comment is not clojure.core/comment though#2022-11-0816:11Casey
(ns app.bug
  (:refer-clojure :exclude [comment]))


(def comment {:comment/body "I probably shouldn't be using comment"})
#2022-11-0816:11CaseyI can trigger the bug with just this code#2022-11-0816:12dpsuttonok. we can make it smarter by ignoring comment forms that don’t have a ( immediately preceding them#2022-11-0816:12CaseyI'm not sure how exactly to trigger it.. simply editing things in and round the def seems to trigger it sometimes. Even just using the mouse to place the point somewhere in that form will cause it#2022-11-0816:13CaseyThat sound reasonable.. until we go and use a comment var as a function xD. But at least in this codebase I don't see myself doing that heh.#2022-11-0816:14dpsuttonyeah. but then if you do that its on you to not use the “comment acts as top level” then i guess#2022-11-0816:14Caseyindeed#2022-11-0816:14Caseythat sounds fair to me#2022-11-0816:15CaseyShould I open a ticket on github?#2022-11-0816:15dpsuttonsure#2022-11-0816:22CaseyDone https://github.com/clojure-emacs/clojure-mode/issues/639 Thanks for the assistance folks#2022-11-0818:36vemv> don’t think we can use runtime information to know that comment is not clojure.core/comment though (ns-resolve 'comment)? and friends e.g. ns-interns (maybe you know this well and mean that clojure-mode can't do this without cider?)#2022-11-0818:44dpsuttonthis is clojure-mode so we have no connection to a runtime#2022-11-0816:14Applewhen i connect to a shadow-cljs repl initially, cider thinks that i'm connected to a clj repl. all good. then if i does a switch like this
shadow.user> (shadow/repl :app)
To quit, type: :cljs/quit
[:selected :app]
cljs.user> 
then cider notices that i'm connected to a cljs repl while at the same time thinks i'm disconnected from a clj repl i can start a second clj repl to the same shadow-cljs and leave it in clj mode, but cider is not to be able to recognize that i'm connected to both clj and cljs repl. when i activate either the clj or cljs repl buffer, cider thinks i'm connected to the respective repl but disconnected from the other. how to make emacs cider support both repls at the same time?
#2022-11-0816:17agI think you shouldn't start second REPL. You need to use cider-connect-sibling-cljs command#2022-11-0816:31AppleTHANK YOU SO MUCH!!!#2022-11-0819:28agmatter of fact you should probably figure out the way to use cider-jack-in-clj&cljs that way it would automatically create two REPLs for you. And what's great about it that in .cljc files, if you set the major mode to clojure-mode - it will eval things in clj REPL, if you change it to clojurescript-mode - it will eval things in cljs-repl#2022-11-0908:52Valentin MouretI am struggling to do this. I run cider-jack-in-clj&cljs and the Clojure REPL boots ok, but the ClojureScript one says: > error in process filter: ClojureScript is not available. See https://docs.cider.mx/cider/basics/clojurescript for details The docs are not very helpful there. Most likely my configuration is wrong, so I looked up full-stack projects on GitHub and mostly copied https://github.com/schnaq/cljs-re-frame-full-stack but the results are the same. Would you happen to have pointers to help me out here?#2022-11-0914:00Applehere what i do with shadow-cljs: somewhere in your code just require these two lines
[shadow.cljs.devtools.api :as shadow]
   [shadow.cljs.devtools.server :as server]
then add
(server/start!)
(shadow/watch :app)
also in your deps add this
cider/cider-nrepl                    {:mvn/version "0.28.7"}
then you can get rid of all your other repl setup, just fire up the clojure, from within emacs do cider-connect then do cider-connect-sibling-cljs
#2022-11-0915:07Valentin MouretCheers! I will try that.#2022-11-0907:41jumarDoes anybody have an idea why I'm getting this weird indentation ? I'm not sure when it started happening but it wasn't like that some time ago.#2022-11-0907:41jumarThis happens when I simply press enter to add the second arg.#2022-11-0913:51Applenot able to replicate#2022-11-0916:01hifumi123Same here. I'm unable to replicate this. What is your current setup? I'm using Emacs 28.2 with CIDER 1.6.0-snapshot#2022-11-1004:59jumarI'm using Emacs 28.1 with cider 1.5.0-snapshot. This is #spacemacs distribution. Oddly enough, it seems to happen for namespaced symbols but not simple symbols (in this case)#2022-11-1005:01jumarBut the aformentioned problem still happens too#2022-11-1005:29hifumi123Are you using clojure-lsp? That may be interfering with indentation. Just to see if it is, what happens to indentation when you disconnect from the LSP server?#2022-11-1005:31jumarNo. But I've just updated to Emacs 28.2 and also to latest spacemacs/develop and the problem went away!#2022-11-1006:00hifumi123That's good to hear. 🙂#2022-11-1007:55teodorluHi! Is it possible to escape 14. august in the beginning of a paragraph? Quick context: in Norwegian, we write "August 14th" as "1. august". I've got a paragraph starting with that. And when I run my HTML export, I get $FIRST_IMAGE. I really want $SECOND_IMAGE. I'm aware I can work around this with $THIRD_IMAGE. Any ideas?#2022-11-1009:37TMacThis is a hack, and I look forward to somebody posting a real answer, but I have
(defun insert-zero-width-space ()
  (interactive)
  (insert-char #x200b))
defined, and putting a zero-width space before the 14 solves your problem. The reason I have it is for when I need to format parts of a word (and org-mode expects formatting characters to have whitespace on the side)
#2022-11-1012:33teodorluAaaah, nice! That's a great idea. I think I can use this for something else I've been struggling with too. Thank you! 😊#2022-11-1010:24TMacIf I run emacs foo.clj from the terminal, I get an Emacs with three buffers: *scratch*, *Messages*, and foo.clj and have to q out of the first two before I see the Clojure file. This is despite inhibit-startup-screen being t and initial-buffer-choice being nil. How do I set it so that the file passed in on the command line is the first buffer to be shown?#2022-11-1012:02dakraIt's probably something in your config. If I run /usr/bin/emacs -nw -Q foo.clj the first buffer is foo.clj. It also works for me with my config (without -Q). That's not helping you fix your problem but at least a pointer that it's not normal ;)#2022-11-1012:13CaseyI'm looking for the lispy/lispyville function to "promote" an sexp, that is replace the parent sexp with the current sexp. Anyone know what that's called?#2022-11-1012:15magnarsIt's "raise"#2022-11-1012:16CaseyAha!#2022-11-1012:16magnarsSo cljr-raise-sexp for instance, or paredit-raise-sexp#2022-11-1012:16magnarsThe difference between these two is that the clj-refactor version knows that #inst "2022" is one expression, as an example.#2022-11-1112:28CaseyThanks magnars!#2022-11-1114:05Benjaminyou can mark symbol into < > to select multiple like #inst "2022" , then raise will raise them together. I do this a lot. Also there is 2 flavors to raise r and R, both are useful 😛#2022-11-1114:07Benjaminwhile you are marking things, d is still available to swap the direction, < and > swap their meaning then, it's joyful#2022-11-1112:04BenjaminWhat if you use metadata and maybe clj kondo analysis to fontify all "actions" (vs calculations) red or something?#2022-11-1408:18pavlosmelissinosApparently if you're using authinfo.gpg, you have to use (setf epg-pinentry-mode 'loopback) now so that emacs doesn't error out (it asks for the passphrase instead - that was the default behaviour before). This wasn't the case until recently, so I'm wondering if I messed up something and this was just a symptom... 😄#2022-11-1616:35devni seem to be having issues with a fresh install of doom emacs#2022-11-1616:35devnnamely, I cannot complete (System/g|) for example in the buffer, but it will complete in the cider REPL buffer#2022-11-1616:59jkxyzAre you using clojure-lsp? I’m not sure if it supports Java method completions yet, and with (clojure +lsp) in init.el, it now disables cider completion in Clojure buffers in favor of just lsp. It’s kinda frustrating when doing interop work so I wrote a function to toggle between cider and lsp completion. Can’t guarantee it works 100%.
(defun jk/toggle-cider-completion ()
  "Toggle between lsp-mode and cider-mode completion in the current buffer."
  (interactive)
  (if (-contains-p completion-at-point-functions #'cider-complete-at-point)
      (progn
        (remove-hook 'completion-at-point-functions #'cider-complete-at-point t)
        (add-hook 'completion-at-point-functions #'lsp-completion-at-point nil t))
    (progn
      (add-hook 'completion-at-point-functions #'cider-complete-at-point nil t)
      (remove-hook 'completion-at-point-functions #'lsp-completion-at-point t))))
#2022-11-1617:00devni have both cider and lsp#2022-11-1617:00devnso i assumed i’d get cider AND lsp#2022-11-1617:01devnin my init.el i only have clojure, not (clojure +lsp)#2022-11-1617:01devnand then i configure clojure-lsp in config.el#2022-11-1617:02devnmaybe one is clobbering the other#2022-11-1617:04jkxyzIf you’re configuring clojure-lsp manually then I would imagine that you’d get both completions by default. Doom explicitly disables cider completions but only with +lsp afaik. It may be that they’re clobbering each other somehow, yeah. #2022-11-1617:05devnhmmm, thanks for your help. will try to explicitly turn off lsp’s completions, though i guess i was hoping for both to work magically together 🙂#2022-11-1617:07jkxyzNo problem. If you find a good solution please share :) I’ve been doing a lot of interop lately and this workaround was my quick solution. You could try to describe-variable on completion-at-point-functions to see if cider is there or if it’s being removed somehow #2022-11-1617:12devnyep that was it#2022-11-1617:13devn(setq lsp-enable-completion-at-point nil)#2022-11-1617:13devnand now it is using cider completion#2022-11-1617:17jkxyzSo I guess lsp-mode is disabling cider completion. I wish there was an easy way to get the best of both worlds… #2022-11-1617:17devnsame here 😕#2022-11-1617:18devnit may also just be the order that the modes are loaded in or how i have my hooks executing#2022-11-1617:18devnso perhaps lsp doesn’t actively disable cider completion, it just sets itself up to handle completion#2022-11-1617:23jkxyzI think that’s probably it #2022-11-1704:27Cora (she/her)calva tries to use both, fwiw, but doesn't surprise me that the clojure module leans hard on lsp when it's enabled. I don't actually use company mode myself#2022-11-1704:29Cora (she/her)also, fwiw @U06DQC6MA there's a #doom-emacs channel#2022-11-1708:40djmI think you can get the best of both worlds with https://github.com/minad/cape. Something like
(setq-local completion-at-point-functions (list (cape-super-capf #'cider-complete-at-point
                                                                 #'lsp-completion-at-point)))
to set it up temporarily in the current buffer. (May or maybe not do anything useful in Doom)
#2022-11-1616:58jimmyI am getting really weird behavior from moving my mouse in the terminal. I think this is emacs misinterpreting escape sequences it is getting? Here is a gif of me just moving my mouse, no keypresses or anything. It just starts inserting "M" and ";" and random numbers. I think this started when I updated emacs. I have (xterm-mouse-mode 1). My term is set to xterm-256color. Anyone run into this issue? Any idea how to fix it?#2022-11-1617:06dpsuttonwhich terminal? And can you try in another terminal? (i have no idea but what a fascinating bug)#2022-11-1617:07jimmyMacOS terminal. Will try iterm2#2022-11-1617:09enn@U5K8NTHEZ I have had the same problem since some recent upgrade of something (emacs? iterm? not sure). So has @U0GTWEP96. Neither of us has found a solution yet (except to disable xterm-mouse-mode which is not really a solution). If you figure it out please let me know!#2022-11-1617:10jimmyMust be emacs since I don't use iterm#2022-11-1617:11jimmyYep. I can recreate in iterm#2022-11-1617:11jimmySo happy to hear others are having the problem!#2022-11-1617:11ennYes, I get it in all terminal emulators so must not be iterm. It happened at the same time that the values reported by M-x list-colors-display changed (I know because it broke my color theme). I used to have 256 colors with names like color102. Now I have 556 colors with names like lightsalmon3. I suspect a relationship but I don’t know enough about Emacs and ANSI color stuff to say for sure.#2022-11-1617:12jimmyYes, my color scheme broke as well#2022-11-1618:06César OleaWhat would be the steps to reproduce? Run emacs in terminal, M-x xterm-mouse-mode and start moving the mouse? I'd like to try and reproduce.#2022-11-1618:37jimmyIt is hard for me to make a minimal reproducible case. Because the gif is the exception it usually doesn't happen that frequently. I can get it to happen in different modes, different files etc. One thing that seems to make it happen more often is doing a cider jack-in on a clojure repl. This is emacs init.el btw https://github.com/jimmyhmiller/dotfiles/blob/master/.emacs.d/init.el#2022-11-1618:59enn@U02DNF3TW3E it only happens in Clojure buffers (including CIDER repls) for me.#2022-11-1619:01jimmyDoing some testing, I can get it to work in other modes, but only after a cider jack-in has been run in my emacs session.#2022-11-1619:07César OleaIt might have something with cider or emacs-mode and not necessarily with emacs. I can't reproduce starting emacs with -Q but I haven't tried loading cider with an emacs instance started with -Q. I'll try later.#2022-11-1619:23jimmyYes it does seem to be cider. At the very least, as soon as I cider-jack-in I can reliably recreate it.#2022-11-1619:26dpsuttonthat is… strange#2022-11-1619:28jimmyIf you do c-h k and move the mouse around, you can see how the coordinates are sent for the mouse. Those seem to somehow be making their way into the buffer and misunderstood.#2022-11-1621:32CaseyWow this is a fascinating bug. I haven't experienced this issue but I'll be watching to see what the cause is. 🍿#2022-11-1700:07César OleaI'm running emacs -Q -nw in a terminal (alacritty) in Ubuntu and eval'ed the following code:
(let ((frame-background-mode 'dark))
  (frame-set-background-mode nil))

(defvar bootstrap-version)

(let ((bootstrap-file
      (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
        ""
        'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)

(setq straight-use-package-by-default t)

(use-package clojure-mode)
(use-package cider)
Feel free to ignore the straight.el parts. I then M-x xterm-mouse-mode and M-x cider-jack-in move my mouse like crazy and can't reproduce 😞 I was kinda hoping that I could see it in my computer.
#2022-11-1713:54ennjust curious, what color space do you see with M-x list-colors-display?#2022-11-1715:43jimmyI see 256 colors. Is there other information you need from that command?#2022-11-1715:47jimmy@U02DNF3TW3E I ran your commands and evaled that and was able to recreate it. So maybe its a mac thing?#2022-11-1716:03César OleaMaybe. I have a mac M1 available I'll try to replicate there as well.#2022-11-1722:18César OleaUnfortunately I was unable to replicate on Mac either. MacOS Monterey w/ Emacs 29 (self compiled) running in Alacritty as terminal. Sorry I’m not of much help.#2022-11-1813:02ennJimmy: thanks. I had this hypothesis that this problem was related to a change in color space, because I thought I was seeing ANSI color codes, but if you still have 256 colors it sounds like probably not. I think your explanation of mouse movement cursor control codes making it into the buffer makes more sense.#2022-12-1013:50tcrawleyI did some debugging here, and I think it is caused by something that changed in emacs 28. Using cider 1.5.0 & clojure-mode 5.15.1, I can recreate this in emacs 28.1 (only after running cider-jack-in) , but can't in emacs 27.1. I'm on linux.#2022-12-1014:01tcrawleyThough using @U02DNF3TW3E’s code above and starting emacs with -Q (with the addition of (xterm-mouse-mode 1) ), I can't recreate it. So it may be from an interaction with some other package I have installed.#2022-12-1015:28jimmy@U06SGCEHJ that sounds right to me. I have another Mac that is still on 27 that had no problems. #2022-11-1919:49macrobartfastM-x package-install doesn’t show clojure-mode, even after M-x package-refresh-contents… thoughts?#2022-11-1920:24dpsuttonwhich repositories do you have registered? elpa, melpa, etc?#2022-11-1920:41macrobartfastI seem to have both these, for starters (both are here because I was, I’m sure, flailing in the past and copy-pasta’ing duplicate variations into my init.el):
(add-to-list 'package-archives '("tromey" . "") t)

(add-to-list 'package-archives '("melpa" . "") t)

(add-to-list 'package-archives '("melpa-stable" . "") t)

(add-to-list 'package-archives '("melpa" . "") t)

(add-to-list 'package-archives '("melpa" . ""))

(add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
lol. I’m open to suggestions of what to cull.
#2022-11-1920:55Cora (she/her)I'm not sure how to fix this directly but straight.el lets you install from github which is really nice#2022-11-1920:56Cora (she/her)combined with use-package you can get the latest of everything with some nice syntax for hooks and stuff#2022-11-2001:40macrobartfastThanks! I’ll try to figure that out.#2022-11-2018:42Benjaminwhat is the most built in way to do snippets?#2022-11-2018:48hifumi123I've only seen people use yasnippet, if anything at all. I don't think there is any built-in way besides making your own ad-hoc functions that invoke save-excursion.#2022-11-2019:05mpenetI like tempel personally #2022-11-2019:05mpenetIt is inspired by a builtin, tempo #2022-11-2019:05mpenethttps://github.com/minad/tempel#2022-11-2112:08pavlosmelissinosMildly interesting trivia, τεμπέλης (tempel ish) means "lazy person" in modern greek (the word probably has turkish origins? not sure), which -unintentionally- kinda describes the purpose of snippet templates, you're too lazy to type it all yourself 😄#2022-11-2019:06mpenetThere are many builtin ways, some quite ancient #2022-11-2019:07mpenetI have a bunch of templates for clojure that I can package for melpa tomorrow #2022-11-2416:26Lyn HeadleyI would love to see them!#2022-11-2416:26Lyn HeadleyOops there they are#2022-11-2416:43mpenet:) I am trying to get them on melpa too#2022-11-2109:31mpenethere you go: https://github.com/mpenet/tempel-clojure#2022-11-2109:31mpenetI opened a pr on melpa as well. I also happen to maintain the yasnippets repo for clojure, I want to port all of these to tempel in time fyi.#2022-11-2112:14Benjaminnice#2022-11-2113:29djmMaybe some of those could be done with abbrev, e.g. (define-abbrev-table 'clojure-mode-abbrev-table '(("when" "(when)" backward-char))) would make when expand to (when |) (where | is the point) - might be annoying if you type “when” in a comment though 😁#2022-11-2115:27CaseyI'd like to use more structural editing commands.. Over the past months I've gotten comfortable with slurp and barf, insert-at-end-of-list, and raise/promote. What other structural commands do ya'll use most often? (I use lispyville fwiw)#2022-11-2119:13BenjaminC convolute is so kingly when you start using it and comes every now and then c clone into f 's into r then ; the old bigger form lispy-symbol-ace, lispy-ace-paren moving the cursor is only the simplest action to take. Use ? to get a list. t , x, y I use a lot. lispy ~`x` into ~ I end up doing a lot. It is for moving the current sexp "out" I meant o into h / l . lispy-split I end up doing a lot for strings, wrapping str around it and putting some variable names lispy: when you mark symbol, < > and d behave intuitively. This is awesome when you want to select some forms together and want to raise or teleport. Teleport is (prefix arg to get whole screen) q (lispy ace paren) then t then type the cand paren. The other way to teleport is t when special. While you are growing the selection from mark-symbol h l and i mean "grow left" "grow right" and "shrink back"#2022-11-2115:40nwjsmithI don't use Lispyville, but left/right movement of an "element" – a form, string, symbol etc. – is really useful#2022-11-2116:52Caseyrather than character by character?#2022-11-2116:55russmatneyi think he means 'dragging' forms around - it's very convenient to be able to reorder elements in a list, or whole forms (ex. re-arranging divs when working with hiccup, or re-ordering expressions in threads)#2022-11-2116:56russmatneyfor me this is via lispyville-drag-forward/backward#2022-11-2212:54ericdallo#2022-11-2215:59Darrick WiebeDo you ever run into the issue where you've overridden a dep from the main :deps list in :extra-deps in an alias with a locally checked out version? Usually lsp still looks at the original one, which gets messed up if any changes happen in the local version.#2022-11-2216:04ericdalloif you don't restart lsp via lsp-workspace-restart , clojure-lsp will use the old classpath, did you restart it?#2022-11-2216:05Darrick WiebeI don't think that's the reason because my project has been set up like that long-term as I develop a group of libraries in parallel.#2022-11-2216:12ericdalloif you manage to create a simple repro where I can test maybe we could find the reason, it could be a bug somewhere#2022-11-2219:04Darrick WiebeOk, I'll do that, but may be a bit of time before I can get to it.#2022-11-2300:35BenjaminIs there a simple way to alter the contents being saved from a buffer to a file without changing the buffer itself? Backstory on this is that I really like using https://github.com/AbhinavOmprakash/snitch as I am developing, but I'd like to automatically replace all the defn*s and *lets with defn s and let s respectively.#2022-11-2300:41vemvnormally (unless disabling auto-revert-mode, which seems generally undesirable if not dangerous for data loss) almost as soon as you would persist to disk, emacs would pick up those changes from disk and apply them to the buffer again. i.e. how emacs distinguish between "normal" changes from outside and the "hacked" changes? ref https://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Revert.html#2022-11-2300:58BenjaminAh, okay. Probably makes sense to just add it before certain commands then, most notably magit-commit :P#2022-11-2301:09vemvthere are many approaches to debugging of course. A quick one that would come to mind is a custom nrepl middleware such that for each Var that is defined, an add-watch is performed capturing args and ret. Or automatically walkthe forms and Tufte them. The sky is the limit :)#2022-11-2302:45Georgehi, I'm wondering if I have my org-mode Clojure highlighting in source blocks set up correctly. It seems to work but doesn't highlight all the core forms, so for example it highlights def and fn but not coll? -- right now I'm requiring ob-clojure, have fontify-natively set to true and insert the source block as #+begin_src clojure ... . Does it seem like I'm missing anything?#2022-11-2303:48jumarWhat's the correct way to enable multiple flycheck checks in the same file? I have my own checker that I would like to enable for several major modes without having to flycheck-select-checker
(flycheck-define-checker my-checker
    "A checker"
    :command ("my-checker" "check" source)
    :error-patterns
    ()
    :modes (clojure-mode js-mode java-mode))
This sort of works but I need to flycheck-select-checker manually and only one checker is active at the time. What I want, is have them active both/all - for example both clj-kondo and my-checker for clojure-mode. I tried this but it doesn't seem to work: https://emacs.stackexchange.com/questions/13392/using-multiple-flycheck-syntax-checkers-in-web-mode
(with-eval-after-load 'flycheck
    (flycheck-add-mode 'codescene 'clojure-mode)
    (flycheck-add-mode 'codescene 'java-mode)
    (flycheck-add-mode 'codescene 'js-mode)
    )
#2022-11-2309:03borkdudeflycheck has something called chains for this. how to use this you can find in the flycheck-clj-kondo README#2022-11-2309:04borkdudehttps://github.com/borkdude/flycheck-clj-kondo#multiple-linters#2022-11-2308:47olyJust started watching this video https://youtu.be/AYKIR1oh62Y?t=794 about repl development, noticed it has number of references a function has curious what I need to make that work ? anyone able to point me in the right direction ?#2022-11-2308:56HermannThat is lsp-mode, requires the proper clojure-lsp-server (emacs will offer to install the server when you activate the mode)#2022-11-2308:59olyah I see I always thought clojure lsp was an alternative to cider#2022-11-2309:00olyas you get a lot of functionality from cider like auto complete and jump to definition, so felt like they would conflict#2022-11-2309:01olyI will add it in and give it a try, thanks for the tip @U03KLA1A00K#2022-11-2311:06ericdallo@UU67HFS2X https://clojure-lsp.io/features/#code-lenses-showing-symbol-references the code lens feature you are looking for https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/ a post explaining about lsp and using with cider, for more info check #CPABC1H61#2022-11-2319:14Drew Verleedoes anyone have this linter working https://github.com/aws-cloudformation/cfn-lint if so, can you share your install steps?#2022-11-2319:22Drew Verleei'm at that point where i'm just going to use vscode when i can't get something working in an hour. Like, installing packages that i'm not customizing shouldn't require special attention. In vs code you just install the extension.#2022-11-2319:27Drew Verleeok after some random looking around, fly check tells me this:
Syntax checker in buffer fix-etl-centriq-cluster.yaml in yaml-mode:

  cfn-lint
    - major mode: `yaml-mode' not supported
    - may enable: yes
    - executable: Found at /home/linuxbrew/.linuxbrew/bin/cfn-lint

Flycheck cannot use this syntax checker for this buffer.

Flycheck Mode is enabled. Use SPC u SPC e d to enable disabled checkers.

--------------------

Flycheck version: 33snapshot (package: 20221104.549)
Emacs version:    28.2
System:           x86_64-pc-linux-gnu
Window system:    x
#2022-11-2320:13valtteriDid you try with this already? https://github.com/emacsmirror/cfn-mode#2022-11-2320:34Drew VerleeI can enable cfn mode, so yes? It doesn't seem to do anything#2022-11-2320:34Drew VerleeDoes it work for you?#2022-11-2322:25Drew VerleeI was able to get the linting after enabling cfn-mode then enabling flycheck-mode i'm not sure why i have to take those steps.#2022-11-2319:39mkvlrFeature/tree-sitter merged into master https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg01443.html#2022-11-2410:13olyI notice Clojure is not in the list https://tree-sitter.github.io/tree-sitter/ :(#2022-11-2410:35mkvlrthere's https://github.com/sogaiu/tree-sitter-clojure (but I haven't tried it)#2022-11-2414:55BenjaminThe Bork 😅#2022-11-2411:30Benjamin"undo" can "break" for me with some combination of commands sometimes. I always end up undoing with git#2022-11-2415:17HermannEmacs undo/redo is famous for being able to break unexpectedly (you can see some rant at http://xahlee.info/emacs/emacs/emacs_undo_cult_problem.html ). That is also true for packages like undo-tree. The only thing I have never run into problems with is undo-fu, but I might just have been lucky for some years ;)
#2022-11-2417:08hifumi123There's also some package called undo-tree iirc which is very useful because it lets you store an entire tree of changes and even inspect every node of the tree#2022-11-2417:10BenjaminI used undo-tree for quite a while and it also has this issue. Using vundo right now. I suspect the underlying data is cleared. It is interesting that undo-fu worked for years. Maybe I check it#2022-11-2417:11Benjaminbuffer-undo-list#2022-11-2420:46BenjaminI run into this mysteriously from time to time, really curious if you find a solution! I'm really fond of vundo. But sometimes even that can't get it back. On the plus side, I'm learning to commit more often... :P#2022-11-2421:09BenjaminBack when I was first learning emacs a couple years ago I found this: https://www.reddit.com/r/emacs/comments/mgkbsk/complex_undo_local_history_gif_demo_inside/ I was able to get it to work after some tweaking, and I really like how well it would work when it did, but it there were some annoying problems I was unable to solve with my dismal skills in elisp at the time so I set it aside. I think the idea has a lot of potential, though.#2022-11-2508:40Benjaminyank pop, git commit and for the worst case backup-each-save. Still yea would be nice to at least know what is going on when it breaks.#2022-11-2509:09HermannI think it's undoing undos when it starts to confuse people and emacs alike...#2022-11-2519:44Juλian (he/him)Magit problem: I'm just trying out Emacs for a project and am quite happy with it. I can commit and it even used my gpg key to sign the commit. But when I try to push to the remote server, it doesn't seem to use my ssh key and fails. Is there anything I have to set up for ssh+pubkey auth?#2022-11-2519:53Juλian (he/him)
128 git … push -v codeberg refs/heads/main\:refs/heads/main
Pushing to 

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
#2022-11-2519:53Juλian (he/him)that's the error I get#2022-11-2520:06hiredmanYou should check the URL for the repo and make sure it is using ssh#2022-11-2520:10Juλian (he/him)looks like it did miss an environment variable after all. since gpg-signing worked, including pinentry, I thought those were okay. I solved it adding the SSH_AUTH_SOCK variable: export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)#2022-11-2520:13Juλian (he/him)sorry for the noise#2022-11-2717:57dev-hartmannAny else here using an m1 Mac? On my intel machine cua works like a charm, I can cmd +s to save etc. On my company m1 Mac it doesn’t work, anyone encountered this before?#2022-11-2803:09Young-il ChooNo problems. Did you check what cmd+s is bound to?#2022-11-2816:47codeasoneYesterday I rebuilt emacs from the HEAD of https://github.com/emacs-mirror and I've noticed an ugly (default?) font appearing in various places in the UI e.g. within org-capture as shown below. Does anyone know which font is being displayed here, and how I can customise it? Presently, I configure which font is used in my Emacs config via this one line in my config: (push '(font . "FuraMono Nerd Font-12") default-frame-alist) and this used to work fine IIRC. It's possible that I just didn't notice the crusty font before though tbh. Now I have noticed it, I can't unsee it 😆#2022-11-2817:57ag• check the frame parameter, make sure it's being set: (frame-parameter nil 'font) • use describe-char to figure out what font you're looking at the point • make sure the font itself is installed#2022-11-2817:59agalso, I'm not sure, but this could be relevant. Sometime ago they've changed the way how font in modeline is rendered: see, https://github.com/doomemacs/doomemacs/issues/5891#issuecomment-992758572#2022-11-2911:10codeasoneThanks for sharing your ideas @U0G75ARHC I've managed to mitigate the issue by adding the following to my init.el
(set-face-attribute 'fixed-pitch nil :font "FuraMono Nerd Font-12") ;; this face was used in the header-line of org-capture
(set-face-attribute 'fixed-pitch-serif nil :font "FuraMono Nerd Font-12") ;; this face is used in info docs, which was another place the crusty font was appearing for me 
#2022-11-2911:11codeasone#2022-11-2912:46teodorluTIL Does anybody know how to increase the output width of cider-pprint-eval-last-sexp? Yes! duckie There's an Emacs lisp var for that. The following allowed my maps to be shown on a single line:
(setq cider-print-options '(("length" 70) ("right-margin" 120)))
More info in https://docs.cider.mx/cider/usage/pretty_printing.html.
#2022-11-2912:49teodorluAt first, I tried changing clojure.pprint's config:
(set! clojure.pprint/*print-miser-width* 60)
That didn't do anything for CIDER's output. Reading the correct docs helped! 😄
#2022-11-2913:19otfromTIL. Thx!#2022-11-3020:10Cora (she/her)looks like evil-cleverparens is getting some love! https://github.com/emacs-evil/evil-cleverparens/pull/84#2022-11-3020:12tomdYeah I finally managed to get hold of the original author. Now it’s part of emacs-evil, issues should get responses and PRs can get merged 🤞#2022-11-3020:16Cora (she/her)ohai!#2022-12-0122:36licht1steinWhat do you think about using org tables in Clojure docstrings?#2022-12-0123:07Jeongsoo LeeI would be so grateful and full of joy at the same time if I were to find this in our codebase#2022-12-0123:17vemvThe downside is that it's fairly unreadable when rendered as some sort of IDE tooltip. Too long. Instead I'd create a (spec/malli) schema for each key, and add a "docstring" to each such key. (for Spec you'll need a custom solution - probably with Malli it's easier)#2022-12-0123:19vemvindividual docstrings are also amenable to jump-to-definition e.g. I see a call to (convert ::convert/quality 100) , then I should be able to jump to the ::convert/quality keyword and see what it has attached (docstring, spec/schema, examples... whatever metadata you please)#2022-12-0123:26lreadIf you do decide to use tables, if you use a github markdown compatible syntax, then tools like cljdoc will render them real pretty.#2022-12-0123:37vemvThere's the fun middle ground of doing both, e.g. you document spec keys individually, and then programatically generate the table: (alter-meta #'convert assoc :doc (make-table-for ::convert-spec)) (cljdoc would pick it up since its analysis is runtime-based)#2022-12-0201:25hiredmanThis table is great documentation(something for people to read), everything else proposed makes it worse documentation#2022-12-0201:49vemvIt's not, it's a bunch of text that gets easily outdated. I've actually done this exact stuff for years (within team settings) Bunches of static text are best left for non-lisps - we know better.#2022-12-0213:31lreadNot saying anybody is wrong or right, but my personal preference is static docstrings. If I were to update a table in a docstring programatically, I'd do so on the original source and check that into version control, rather than updating docstrings at load time.#2022-12-0214:32Chris ClarkCool thread! One consideration is that a cell in a markdown table can’t be multiple lines, so tables tend to get really wide. While many people don’t seem to care about that, standardizing on something that precludes reasonable line widths seemed underpowered, to me anyway. We still use tables when we feel like it, but well-formatted bulleted lists are my go-to for documenting keys and values, for now anyway.#2022-12-0214:37lreadYeah @U01ERKW6F18 good point, I'll often start with a table and when it gets too wide, switch to a bulleted list.#2022-12-0214:39lreadThe bulleted list can nest deeply too, which can be useful.#2022-12-0214:41respatializedGiven that Clojure vars can have arbitrary metadata associated with them, to me it seems like a missed opportunity to put structured information about code inside of a string. #2022-12-0214:43respatializedhttps://danielgregoire.dev/posts/2021-10-15-clojure-src-test-meta/ I think this approach could be quite useful for separating “dev-time” metadata like structured examples from metadata actually needed at runtime when code is in production.#2022-12-0806:20Ben SlessShoot, I wanted to do something like metazoa and looks like someone beat me to the punch#2022-12-0806:22Ben SlessConnect it with Clerk and we get something like Unison's view#2022-12-0215:13kokonutI think I need some help on cider for clojurescript (shadow-cljs). It once worked but somehow it doesn't anymore. I am able to do cider-jack-in-cljs and then shadow and my app is opened in the browser (cider asks me y or n), but the REPL doesn't work at all. When I type a primitive value like 123 and then I enter, then no response. Does anyone have a clue?#2022-12-0215:17kokonutAnd my set up is really basic.
{:source-paths ["src/cljs" "src/cljc" "test/cljs" "test/cljc"]
 :dependencies [[cider/cider-nrepl "0.28.7"]
                [cljs-ajax "0.8.4"]
                [reagent "1.1.1"]]
 :dev-http {8000 "resources/public"}
 :builds {:frontend {:target :browser
                     :output-dir "resources/public/js"
                     :asset-path "/js/compiled"
                     :modules {:main {:entries [pet.frontend.core]
                                      :init-fn pet.frontend.core/run}}}}}
#2022-12-0215:25AppleDid you try C+RET?#2022-12-0215:30kokonutOh, lol, it works. I didn't know about c+ret. what a silly question it was. 😅#2022-12-0216:16Appleyou probably have the latest paredit and it breaks cider somehow.#2022-12-0216:17kokonutI see. And right, I installed my emacs configs today.#2022-12-0216:17Applehttps://clojurians.slack.com/archives/C0617A8PQ/p1669499882069549#2022-12-0216:17Applewe touched on this earlier#2022-12-0216:50ennIs anyone aware of a mode or setting that will make backward-word (`M-<left-arrow>`) treat non-alphanumeric Clojure symbols as words? To illustrate, with | indicating point: (foo (bar| baz)) -> (foo (|bar baz)) (correct behavior) (foo (->| baz)) -> (|foo (-> baz)) (wrong IMO)#2022-12-0217:10vemvit works the 'correct' way for me. I don't remember if I had to do something for it to happen googling emacs "backward-word" word definition returns plenty of results. It appears to be related to the "syntax table". clojure-mode should provide a high-quality one?#2022-12-0217:42GeorgeMy emacs works like yours @U060QM7AA, I have a pretty stock newish install.#2022-12-0218:54ennhmmm … I do have clojure-mode and haven’t done anything to defeat it that I know of. Interesting vemv! Thanks for the data point.#2022-12-0219:13slipsetNot sure this is what you’re asking for, but I tend to use backward-sexp a lot. Bound to C-M-b on my machine#2022-12-0219:19ennWhere this really bites me is with paredit-backward-kill-word, where it actually skips over the previous non-alpha symbol to kill the preceding word: (foo (->| baz)) -> (|(-> baz)) A little surprisingly to me, there doesn’t appear to be a paredit-backward-kill-sexp … that would solve my main problem#2022-12-0512:24AkizHi, does somebody use corfu and lsp-mode? I have configured LSP-Mode and Corfu according to https://github.com/minad/corfu/wiki and I am missing autocompletion for “extra” symbols. When i write something like (xxx yyy) I would like to have xxx in autocompletion candidates next time (this is default behaviour in VSCODE btw.).#2022-12-0610:58Benjamindepends on the completion providers set. Have you tried hippie? I find it covers this case for me. By default it completes from lisp symbols in all buffers.#2022-12-0614:51AkizI tried to configure cape to work together with lsp and corfu but i wasn’t really sucesfull. Let me take a look at Hippie. I just tried Eglot and was surprised that it is missing that feature by default as well.#2022-12-0709:29sw1nnCan anyone suggest why clojure-lsp is creating a directory ? (i.e. a single question mark) at top level of the project and using that for it's .lsp directory (containing the .cache directory). I don't have any settings in ~/.config/clojure-lsp or local $PROJECT_ROOT/.lsp/config.edn (this is using the version of clojure lsp installed via arch pacman
$ clojure-lsp --version
clojure-lsp 2022.11.03-00.14.57
clj-kondo 2022.11.02
#2022-12-0709:33lassemaattafyi: there's also #CPABC1H61 for clojure-lsp related discussions and questions#2022-12-0709:34sw1nnthanks - i had missed that.#2022-12-0815:24Lyn HeadleyIs there an LSP command to move a def into a different namespace?#2022-12-0815:25ericdalloyes, lsp-clojure-move-form , but it has limitations#2022-12-0815:25ericdalloFor more details, check https://github.com/clojure-lsp/clojure-lsp/issues/566#2022-12-0815:51Lyn HeadleyThank you, painlessly upgraded my LSP version and am now happily using the feature#2022-12-0815:52ericdalloI would like to improve it and make it available as a code action, but needs to address those points mentioned in the issue first#2022-12-0815:52ericdalloit's not a trivial feature#2022-12-0815:54Lyn HeadleyDoes it throw errors in the unimplemented cases or silently fail?#2022-12-0815:55ericdalloprobably silently fail, we could improve the command to show messages for each case too#2022-12-0919:25Lyn HeadleyIs there a keyboard shortcut to get LSP to jump to the next squiggly warning or error across the entire project?#2022-12-0919:29ericdalloyes, not a LSP one, but a flycheck/flymake one#2022-12-0919:30ericdalloflycheck-next-error for example, shortcut ] e on my emacs (maybe from doom)#2022-12-0919:32Lyn HeadleyThat gives me 'no more flycheck errors', but I see yellow squigglies at the top of my window showing the parent directories of my current namespace, so I know there are warnings.#2022-12-0919:33ericdallooh, so it comes from the headerline-breadrumb#2022-12-0919:33ericdallothey are errors on the project, usually lsp-treemacs-error-list works for that#2022-12-1013:24Lyn HeadleyCan anyone post a use-package snippet for getting lsp-treemacs to work? The package is failing to load for me, apparently due to a version mismatch with a new version of treemacs. Do I need to pin the packages somehow?#2022-12-1013:26ericdalloI use doom but it should be pretty similar to https://github.com/ericdallo/dotfiles/blob/master/.doom.d/config.el#L161-L163, also I https://github.com/ericdallo/dotfiles/blob/master/.doom.d/packages.el#L16-L17both lsp-treemacs and treemacs#2022-12-1013:26ericdallowhich means I'm using both latest of those packages#2022-12-1013:26Lyn HeadleyHitting this: https://github.com/emacs-lsp/lsp-treemacs/issues/141#2022-12-1013:26ericdalloProbably outdated package/bad compilation in your side#2022-12-1013:36Lyn HeadleyWhat versions do you have and are they from melpa?#2022-12-1013:55ericdallomelpa-unstable both current master of their repos#2022-12-1014:23Lyn HeadleyInteresting, thank you#2022-12-1018:56Lyn HeadleyGoing with helm-lsp-diagnostics#2022-12-1018:57ericdallothat works too, also there is consult something IIRC#2022-12-1107:49Darrick WiebeI occasionally end up with a non-responsive emacs... 😳 When I do that and find that repeatedly pressing Ctrl-g does nothing, I go for the killall -USR2 emacs , which usually breaks out, pops a debugger and lets me recover. The problem is, after I do that, emacs starts throwing up debugger windows as I'm working. For instance in this state if I do projectile find file, it pops up an ivy file finder, and if I change my mind and press Esc, up pops the debugger. This is annoying, and I haven't been able to figure out how to stop it except by restarting emacs, which I don't want to do. I've tried all of these, but none of them fix the problem. Anyone have any idea what could try?
(setq debug-on-error nil)
(setq debug-on-event nil)
(setq debug-ignored-errors ())
(setq debug-on-message nil)
#2022-12-1107:51Benjamin(setq debug-on-quit nil) ?#2022-12-1108:18Darrick WiebeOh, that was it, thanks! Somehow I missed the existence of that one!#2022-12-1112:28borkdudeIn clojure-mode, can I fold an if "then" branch if it becomes to large? so I can see the "else" branch?#2022-12-1121:29lispers-anonymousHave you tried hs-minor-mode? if enabled, a command call hs-hide-block should work#2022-12-1121:30lispers-anonymoushs-show-block would then reveal it#2022-12-1121:49borkdudeexcellent, that works :)#2022-12-1112:28borkdudeI don't use vi keybindings#2022-12-1118:52Jeongsoo LeeWhy is this elisp expression evaluating to "it's hoho" ?
(cond ((equal 'hihi 'hihi) "it's hihi"
       (equal 'hihi 'hoho) "it's hoho"))
#2022-12-1118:53Jeongsoo Lee
(equal 'hihi 'hihi)  ; => t
(equal 'hihi 'hoho)  ; => nil
so, the above expr should evaluate to "it's hihi"!
#2022-12-1118:57Jeongsoo LeeAh, stupid me. The correct syntax is#2022-12-1118:57Jeongsoo Lee
(cond ((equal 'hihi 'hihi) "hihi")
      ((equal 'hihi 'hoho) "hoho"))
#2022-12-1208:42HermannIn fact it should be
(cond
  (equal 'hihi 'hihi) "hihi"
  (equal 'hihi 'hoho) "why's it hoho?"
  :else        "we're in trouble")
#2022-12-1217:43Jeongsoo LeeNope, the clauses should be separated in their own forms:
(cond
  ((equal 'hihi 'hihi) "hihi")
  ((equal 'hihi 'hoho) "why's it hoho?")
  (:else        "we're in trouble"))
Note the extra parens.
#2022-12-1219:56Erick G. Islas OsunaThe @U03KLA1A00K version is the Clojure syntax 😞 yours is emacs-lisp as you said, just keep adding parentheses until it works.#2022-12-1507:20HermannYes, I overlooked it's elisp - my bad 😁#2022-12-1118:57Jeongsoo LeeSyntax for cond in Clojure and Elisp got mixed in my brain#2022-12-1409:26bozhidarFYI - https://github.com/clojure-emacs/clojure-mode/releases/tag/v5.16.0#2022-12-1417:15standI did a package refresh last night and now my prelude install chokes on start up. Can't load helm-config . It happens with a fresh prelude install also. Anyone else having this problem? Emacs 27.1#2022-12-1422:06Byron ClarkIt’s this commit from helm causing the issue: https://github.com/emacs-helm/helm/commit/e81fbbc687705595ab65ae5cd3bdf93c17a90743 Looks like helm-config hasn’t been needed for a while… https://github.com/emacs-helm/helm/blob/v3.9.0/helm-config.el#L20#2022-12-1422:06Byron ClarkThis change to prelude got my config working again:
diff --git a/modules/prelude-helm.el b/modules/prelude-helm.el
index 93ce2aa..75b0e5f 100644
--- a/modules/prelude-helm.el
+++ b/modules/prelude-helm.el
@@ -33,7 +33,6 @@

 (prelude-require-packages '(helm helm-projectile))

-(require 'helm-config)
 (require 'helm-projectile)

 (when (executable-find "curl")
#2022-12-1422:09Byron ClarkI’ll make a PR for prelude with the details.#2022-12-1422:24Byron Clarkhttps://github.com/bbatsov/prelude/pull/1390#2022-12-1422:25standThanks, Byron!#2022-12-1421:02Drew Verleewill anything do this re-formatting for me?
{:a :b :c :d} -> {:a :b
                  :c :d}
                      
#2022-12-1422:27russmatneyif you're willing to go all the way into aggressive-indent-mode, this is would be done just by adding a newline after :b - definitely an opinionated route though!#2022-12-1423:12pavlosmelissinosI use cider-format-edn-region a lot: https://docs.cider.mx/cider/usage/misc_features.html#formatting-edn (it requires an active REPL, obviously 🙂)#2022-12-1423:14Drew VerleeAwesome thanks for the help.#2022-12-1919:36DiegoI use lispy, M over one of the curly braces will do that.#2022-12-1421:19alandipertnot that i'm aware of, but if you make the newlines yourself you could use align-regexp on the result to align the keywords into columns#2022-12-1422:50escherizealign-regexp is king 👑#2022-12-1510:18djmI saw interactive-align recently (https://github.com/mkcms/interactive-align) that looks nice, but I haven’t tried it yet.#2022-12-1510:18djm(It’s an interactive version of align-regexp)#2022-12-1512:09solfI should push my own align snippet, that works using multiple-cursors#2022-12-1515:09Mario GiampietriHi there, I've been using Emacs for over a year now. For what concerns Clojure, I started with vanilla Emacs+Cider bindings, more recently (for a couple of months) I switched to Spacemacs/hybrid. I'm happy with the journey and the learning so far, but with my current evil-esque setup I struggle to find a satisfying flow/way of working specifically with Clojure (none of that with other languages or plain text). The friction lies in having to navigate the transition between the three states (normal/lisp/insert). Sometimes I expect jump back from insert to lisp state (if I got into insert from lisp state). I also wish to have a smoother way to transition between normal and lisp (both directions) but this is not fully clear in my head yet :D I did my internet surfing and I see that there's a nice mixture of people having had similar concerns and adopting different approaches. I'd like to hear more, collect ideas and know of other people experiences and approaches, and in particular: - if you default to Vim bindings, what is your favourite/default Evil setup (Spacemacs or not Spacemacs); - if you played with Vim bindings within Emacs then opted for Emacs binding, I'd like to hear of your journey too (and THIS is why I put this message in the general Emacs channel and not in the specific Spacemacs one). Thanks#2022-12-1515:32tomdAh I suppose as a spacemacs user, you use the evil-lisp-state package? I've never used it, but the idea seems like a bad one to me. evil-cleverparens and lispyville don't give you another state to deal with - they just sit on top of normal state. Maybe give one of those a try? Sounds like it could address your issues.#2022-12-1515:35tomdDisclaimer - I'm the new maintainer of evil-cleverparens. I'm not its original author, so I don't know it that well, but I've used it for many years and like it. There are a few bugs, so if you do end up using it, please report any you find.#2022-12-1517:46practicalli-johnI started with Emacs Live config, then Prelude and finally Spacemacs. Initially using Emacs(holy) mode for the first few months and then to Evil. Using evil felt more natural especially with the way the which key key bindings work - sequential keys rather than chorded keys.#2022-12-1517:50practicalli-johnI use a few key bindings from the Lisp state, such as raise. Most of the navigation and manipulation I use Evil normal mode. I quckly learned to press ESC or actually I use the fd key binding for escappe to get out of Insert mode when not typing new stuff. So most of the time I am in normal mode, which is the vim way#2022-12-1517:55practicalli-johnhttps://practical.li/spacemacs/spacemacs-basics/evil/ i wrote to help me get used to multi-modal editing, learning to speak/think in vim terms does take practice, although I found it paid back in a big way, especially for clojure. I do recommend using evil-cleverparens with Evil so that evil respects the structure of Clojure and Lisp code...#2022-12-1518:37Cora (she/her)doom emacs ftw#2022-12-1518:37Cora (she/her)w/ evil-cleverparens#2022-12-1607:48Benjamincrafting your own config is not hard. The pro is you know exactly what package does what.#2022-12-1609:06Mario GiampietriI find your comment rather judgmental and annoying, considering I messed with vanilla Emacs for over an year in my own time. Learning Emacs can be rewarding (it is certainly for me) but it's challenging and takes its time, maybe something that folks with more milage tend to forget. For sure, at this stage it's not acceptable that I waste too much work time toying with Emacs Lisp. I'm collecting ideas - thanks everyone who offered some - and that can be beneficial even if the outcome is do it myself from scratch.#2022-12-1611:49practicalli-johnFor a Emacs approach (rather than Evil) then I would recommend using https://github.com/bbatsov/prelude (maintained by the CIDER maintainer, so it always works with Clojure) I wouldnt encourage anyone to create their own Emacs config unless it was their main intent to learn eLisp and the machinations of how Emacs works (maintaining your own config is a major investment). So if the focus is to learn / develop Clojure, then use Prelude or Spacemacs in holy mode (via the initial install option as then Evil modes are not included) seem more appropriate.#2022-12-1612:55Mario GiampietriI'll probably play with cleverparens (or another similar option) and avoid lisp state to see if that helps circumvent getting lost between normal/lisp/insert states transitions. I honestly like lisp state and having that option itself, but the beauty of different nice alternative options is that we don't have to use all of them at all costs 😄#2022-12-1613:01BenjaminOh I am sorry you took this wrongly. Since there was spacemacs and doom in thread I just wanted to post another alternative with it's pro argument. Instead of "not hard" I might have said "a path that requires some commitment, but easy. For example following https://systemcrafters.net/emacs-from-scratch/ "#2022-12-1613:31Mario GiampietriThat's a great resource (I think I watched half or more of those videos over the last months); I also think to be way past that stage (while being conscious of the limitations of my own Emacs self assessment trollface)#2022-12-1613:48Benjamini can highly recommend lispy for structural editing. It is possible to use a mix with vim using lispyville. I currently use meow in the middleground of evil and default binds#2022-12-1611:39TMacIf I have
(foo
  (bar baz))
and I want
(bar
  (foo baz))
what's the best way of going about it? transpose-sexp isn't quite right, and neither is paredit-splice-sexp-killing-backward or paredit-raise-sexp (since both are destructive)
#2022-12-1611:56tomdconvolute with cursor on baz ?#2022-12-1612:08TMacawesome, thanks. Strange to me that the point has to be on b specifically, e.g. if it's on the a of baz I get (bar b (foo az)). But I can totally work with that, thank you!#2022-12-1612:21tomdah, that doesn't happen with smartparens. I'm not sure which one is right. glad that's helpful#2022-12-1612:02slipsetDear lazyweb. We have some macros which we’ve annotated with
{:style/indent 1}
Sometimes(TM) this is honored by my emacs, other times it is not. It seems to be honored when I manually use TAB to indent, but when eg slurping and barfing with paredit (which causes reindentation) the :style/indent seems not to be honored. I use Clojure mode and clojure-lsp. I’m not asking for a full debug of this, I’m just sort of curious if eg clojure-lsp doesn’t honor the :style/indent or something?
#2022-12-1612:14ericdalloNever heard about that 😅 even so, clojure-lsp delegates format to cljfmt, so it should be supported there (if it really makes sense)#2022-12-1612:23slipset:style/indent is a super neat idea 🙂#2022-12-1612:24slipsetBut thanks, I’ll have a look at cljfmt then to see if it lies there.#2022-12-1612:26slipsethttps://github.com/weavejester/cljfmt/issues/49 🙂#2022-12-1612:34ericdalloCool, sounds like a good addition#2022-12-1612:35slipsetIssue been open since 2015 🙂#2022-12-1613:15vemv@UKFSJSM38 just in case, :style/indent is a CIDER thing. But it's pretty easy to translate from its format (https://docs.cider.mx/cider/indent_spec.html) to cljfmt's. So it's something clojure-lsp could do by analyzing the defmacros in the codebase, fetching all this metadata and then invoking cljfmt with this dynamically-built config That way, both worlds would be bridged cider clojure-lsp#2022-12-1613:17slipsetI’d nuance it a bit. I believe style/indent originated with CIDER, but the hope/intent was that it would be a cross IDE/formatter/whatever way to express indentation needs.#2022-12-1613:17vemv> Issue been open since 2015 yeah I doubt it will be fixed from their side - analyzing var metadata surely exceeds cljfmt's intended scope so either cider or clojure-lsp would do it#2022-12-1613:18slipset@U0BKWMG5B seemed positive to the idea, but was lacking time?#2022-12-1613:29ericdallothe issue with that is that clojure-lsp just pass the string to cljfmt, if we need to parse it and check every call macro, get kondo analysis for that and check if has metadata would probably affect performance and since format is something that is called automatically in some editors it needs to be fast :/#2022-12-1613:29ericdallosupporting that on cljfmt would probably be the best as it already parses the node#2022-12-1613:35vemv> the issue with that is that clojure-lsp just pass the string to cljfmt, if we need to parse it and check every call macro, get kondo analysis for that and check if has metadata would probably affect performance and since format is something that is called automatically in some editors it needs to be fast :/ I'd assume this can be cached like various other things in lsp? In CIDER it's fast becase it's runtime-powered, but we also could/should cache it for offline invocation. ...The key insight is that if you believe that :style/indent is useful, generally you have to perform some analysis. Under the clojure-mode/cider/style-indent philosophy, formatting isn't something homogeneous/mechanical (a la Tonsky), but codebase-specific. So, yes, there's no speedy formatting without caching or some other 'cheating' (runtime introspection) - CIDER users have lived under this constraint/tradeoff for years and it has worked perfectly :)#2022-12-1613:36vemv> supporting that on cljfmt would probably be the best as it already parses the node Sounds pretty neat, however it misses metadata mutation performed via other means#2022-12-1613:38ericdallocaching does not help that much here as user keeps changing the code, so we need to re-analyze the clojure and invalidate the cache. I can see how convenient it is to support that for the final user, would be perfect to have that on cljfmt IMO, but we could start with a issue on clojure-lsp to discuss more about it, maybe we can find something in between that could work.#2022-12-1613:39vemvWill create it - good timing (just joined a lsp-heavy job with cljfmt also in the mix 😃)#2022-12-1613:40ericdalloTBH I'd like to support other formatters in the future, cljfmt seems to be a little bit stagnant#2022-12-1613:48slipsetYou mean done 😉#2022-12-1710:30Benjaminhttps://github.com/benjamin-asdf/codex-play#2022-12-1710:33BenjaminI wanted to make a quick fib demo, turns out there is a learning curve to doing the right prompts#2022-12-1912:56Mario Giampietri(maybe oldie but goldie) I spotted this on reddit yesterday https://www.reddit.com/r/ProgrammerHumor/comments/zjvjjg/imagine_running_vscode_inside_emacs/#2022-12-1915:01ericdalloOr "My OS window manager is Emacs" https://github.com/ch11ng/exwm/wiki/Screenshots#2022-12-1917:16DerekAnyone use the dumb-jump package? It doesn’t appear to work for me, and I recall it working just a few months ago#2022-12-1917:21DerekLooks like it may be related to a possible change in git-grep. Forcing the searcher to ripgrep (setq dumb-jump-force-searcher 'rg) seems to fix it#2022-12-2113:56pesterhazyUsed to love this package, but now clojure-lsp/eglot works reliably enough to make it obsolete for me#2022-12-2115:11DerekThat makes sense, I still have some places where I rely on it where I should really look into a language server#2022-12-1920:59Darrick WiebeWhat's the best way to search within a project in emacs? Right now I use projectile's default but find it frustrating because it has fairly broken regex support and it's not super fast either.#2022-12-1921:01DerekI like projectile’s (with rg.el and ripgrep on your exec-path) command projectile-ripgrep#2022-12-2005:09Darrick WiebeThanks, I'll check it out#2022-12-2009:41MacrozI use helm-projectile-grep. I think I wouldn't want to start writing anything complicated in a search most of the time. A search is something I do quickly, so I bash something words interactively like foo def priv and get something out of it. What would really float my boat would be sexp-grep because a line is just not so interesting a unit in lisps.#2022-12-2013:27practicalli-johnprojectile with ripgrep is really fast and has some useful options to help narrow down a search https://practical.li/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html#ripgrep-search-tool-options#2022-12-2017:36Darrick WiebeSimple search is great for small projects but searching the JDK source tree, with on the order of 1M files, you really need to narrow things down sometimes. I've been using projectile+ivy with the default search, but it seems like there's some double escaping or something happening that breaks most regex functionality. The only thing keeping me sane is that after initial search results come back I can press S-SPC and do a narrowing search within the results using emacs regexps, but unfortunately there is no way to filter things out (negative lookaheads, etc) so I need to find something better. I'm always scared to mess with my config during a large project but I may need to... 😨#2022-12-2005:35Drew Verleeyet another idea. A cider-eval command that printed the current timestamp along with the output value to the editor that way it was easy to tell when you ran something if you like that kind of thing.#2022-12-2210:57pesterhazyEglot experience report: here's what I had to do to get jump-to-definition to work for external, jar-based dependencies • Install https://elpa.gnu.org/devel/jarchive.html(jarchive-setup)(jarchive-patch-eglot) (not necessary if you're on emacs 29+)#2022-12-2210:59pesterhazyNow I can xref-find-definition in Clojure or Babashka projects (clojure.core, deps shipped with babashka, external deps)#2022-12-2211:24ericdalloThanks for the summary!#2022-12-2211:24borkdudeWorth another blog post ;)#2022-12-2218:10lispers-anonymousGlad you find my package useful. Let me know if you find any issues with it#2022-12-2220:48pesterhazyThanks for writing it @UDVJE9RE3! Works well for me so far. I appreciate the shim for emacs 28#2022-12-2220:50lispers-anonymousYep, the shim wont be necessary soon, even in emacs 28. The next version of Eglot that is released won't need it. But not everyone will upgrade, and it won't hurt to use it anyways.#2022-12-2212:59pesterhazyFound a better way to find a project root in a monorepo, by looking for a "sentinel file" (like deps.edn, bb.edn, package.json, etc). Updated this gist https://gist.github.com/pesterhazy/e8e445e6715f5d8bae3c62bc9db32469#2022-12-2214:06teodorluI usually shell out to git:
git rev-parse --show-toplevel
but that requires git to be installed, and breaks if you copy your files without bringing the .git folder with you!
#2022-12-2220:49pesterhazyIn my case the project folder is not the git root but a subfolder #2022-12-2213:00pesterhazyIncidentally, what does #' mean in elisp? Is it really needed?
(add-hook 'project-find-functions
          #'(lambda (d)
              (let ((dir (find-enclosing-project d)))
                (if dir (cons 'vc dir) nil))))
#2022-12-2218:45alandipertto answer your question, that particular use of #' was necessary in historical Lisps in which lambda expressions did not evaluate to a function object - (function (lambda ...)) was necessary, wihch #' is shorthand for. for the full story see https://stackoverflow.com/a/29346982 people who learned lisp a long time ago use it (accidentally?) but then I think it gets copied by others who don't know any different#2022-12-2220:46pesterhazyThanks that's very helpful #2022-12-2221:21alandipert... and while i have your attention, perhaps i can interest you in a talk i gave recently-ish about how CL compares to Clojure, which might be helpful to the extent CL and elisp are close cousins https://www.youtube.com/watch?v=44Q9ew9JH_U#2022-12-2221:37pesterhazyVery interesting, will definitely watch this (I'm a fan of your work on boot / hoplon etc btw)#2022-12-2222:24alandipertthank you! yes i think i remember your name from stuff simple_smile . lmk if you have any questions#2022-12-2213:01pesterhazyIn fact, I really feel I'm hurting because my elisp is so weak. Is there a good intro to elisp (ideally for people who know Clojure)?#2022-12-2300:05Matti UusitaloThe built in manual is pretty good. You can normally access it with C-h r and there’s a link to the Emacs lisp manual.#2022-12-2213:04elkenNot for a lamda no, it's function quote#2022-12-2213:05elkenexercism has some good elisp exercises, and system crafters have a small series on elisp#2022-12-2213:06pesterhazyInteresting! Do you mean these? https://systemcrafters.net/emacs-from-scratch/#2022-12-2213:06pesterhazyhttps://exercism.org/tracks/emacs-lisp#2022-12-2213:06elkenI do! Specifically https://www.youtube.com/watch?v=RQK_DaaX34Q&amp;list=PLEoMzSkcN8oPQtn7FQEF3D7sroZbXuPZ7#2022-12-2213:07pesterhazyVery good! Will watch this for sure#2022-12-2213:08pesterhazyIt's confusing because elisp is so close to clojure, and yet you can't rely on your clojure skills because things are every so slightly different#2022-12-2213:09elkenYeah it is ever so slightly different 😛#2022-12-2305:45BenjaminWow, for me as an elisp newbie, this is actually saving me a lot of time, even if it might be easy to find this stuff with a simple online search: > me: can you write me an emacs function to copy the current file link to the kill ring? > > chatgpg: Certainly! Here is an Emacs Lisp function that you can use to copy the link to the current file to the kill ring: >
(defun copy-current-file-link ()
>   "Copy the link to the current file to the kill ring."
>   (interactive)
>   (let ((file-name (buffer-file-name)))
>     (when file-name
>       (kill-new (concat "file://" file-name))
>       (message "Copied link to current file: %s" file-name))))
> me: Can you also have it make it an org-mode link? > Certainly! Here is an updated version of the function that converts the file link to an org-mode link before copying it to the kill ring: >
(defun copy-current-file-link-as-org-link ()
>   "Copy the link to the current file as an org-mode link to the kill ring."
>   (interactive)
>   (let ((file-name (buffer-file-name)))
>     (when file-name
>       (kill-new (concat "[[file://" file-name "][" (file-name-nondirectory file-name) "]]"))
>       (message "Copied link to current file as org-mode link: %s" file-name))))
#2022-12-2309:42Benjaminhttps://github.com/benjamin-asdf/openai-api.el I had quite some fun with having the api in emacs. It is great for when you don't know a lang so well. You can also ask things like "what does x do?" And just "explain this".#2022-12-2317:18alandipertheck yeah, love it#2022-12-2317:19alandipertbeing able to program stuff: A+#2022-12-2320:58jakemccI've used ChatGPT to help with some elisp as well. It was quite useful#2022-12-2409:00bozhidar@benjamin.schwerdtner The Crux package has a lot of similar functions that you might want to check out.#2022-12-2409:19BenjaminSweet, thanks! I'm taking a bit of time to wrinkle out the kinks in my workflow, and this looks quite useful for that 🙂 .#2022-12-2409:00bozhidarhttps://github.com/bbatsov/crux#2022-12-2409:00bozhidar(there are also a lot of articles about such utility functions over at http://emacsredux.com)